summaryrefslogtreecommitdiff
path: root/forms/source
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-06-25 10:52:55 +0000
committerKurt Zenker <kz@openoffice.org>2008-06-25 10:52:55 +0000
commit1929060d42bb7e22089a64fe85d329d5a6297d92 (patch)
treefd8861f3fc6b91d6b2fb4bbcec56ba1c57f4e7d5 /forms/source
parenta6160da75e6c552bd0e5ab9491d4d4c82631515b (diff)
INTEGRATION: CWS dba30d (1.26.18); FILE MERGED
2008/05/27 12:28:02 fs 1.26.18.1: #i89657# refactoring, so that our binding's getValue is only called when our mutex is not locked
Diffstat (limited to 'forms/source')
-rw-r--r--forms/source/component/Date.cxx26
1 files changed, 8 insertions, 18 deletions
diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx
index a539461f38ba..33332ae82908 100644
--- a/forms/source/component/Date.cxx
+++ b/forms/source/component/Date.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: Date.cxx,v $
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
* This file is part of OpenOffice.org.
*
@@ -308,21 +308,14 @@ Any ODateModel::translateControlValueToExternalValue( ) const
}
//------------------------------------------------------------------------------
-Any ODateModel::translateExternalValueToControlValue( ) const
+Any ODateModel::translateExternalValueToControlValue( const Any& _rExternalValue ) const
{
- OSL_PRECOND( hasExternalValueBinding(),
- "ODateModel::translateExternalValueToControlValue: precondition not met!" );
-
Any aControlValue;
- if ( hasExternalValueBinding() )
+ if ( _rExternalValue.hasValue() )
{
- Any aExternalValue = getExternalValueBinding()->getValue( ::getCppuType( static_cast< util::Date* >( NULL ) ) );
- if ( aExternalValue.hasValue() )
- {
- util::Date aDate;
- OSL_VERIFY( aExternalValue >>= aDate );
- aControlValue <<= DBTypeConversion::toINT32( aDate );
- }
+ util::Date aDate;
+ OSL_VERIFY( _rExternalValue >>= aDate );
+ aControlValue <<= DBTypeConversion::toINT32( aDate );
}
return aControlValue;
}
@@ -355,12 +348,9 @@ Any ODateModel::getDefaultForReset() const
}
//------------------------------------------------------------------------------
-sal_Bool ODateModel::approveValueBinding( const Reference< binding::XValueBinding >& _rxBinding )
+Sequence< Type > ODateModel::getSupportedBindingTypes()
{
- OSL_PRECOND( _rxBinding.is(), "ODateModel::approveValueBinding: invalid binding!" );
-
- return _rxBinding.is()
- && _rxBinding->supportsType( ::getCppuType( static_cast< util::Date* >( NULL ) ) );
+ return Sequence< Type >( &::getCppuType( static_cast< util::Date* >( NULL ) ), 1 );
}
//.........................................................................