diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-06-25 11:01:45 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-06-25 11:01:45 +0000 |
commit | 8070540d68b14f4c60477fba19eecc6f5752b33c (patch) | |
tree | ba8da3660e749ec0be61ac1d1f7a6e026cbb08d2 | |
parent | 33214bb667d95b5fbc89e3c6af0613e602b5f429 (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
-rw-r--r-- | forms/source/component/Time.cxx | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx index 53467eee6..0d857acef 100644 --- a/forms/source/component/Time.cxx +++ b/forms/source/component/Time.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: Time.cxx,v $ - * $Revision: 1.26 $ + * $Revision: 1.27 $ * * This file is part of OpenOffice.org. * @@ -310,21 +310,14 @@ Any OTimeModel::translateControlValueToExternalValue( ) const } //------------------------------------------------------------------------------ -Any OTimeModel::translateExternalValueToControlValue( ) const +Any OTimeModel::translateExternalValueToControlValue( const Any& _rExternalValue ) const { - OSL_PRECOND( hasExternalValueBinding(), - "OTimeModel::translateExternalValueToControlValue: precondition not met!" ); - Any aControlValue; - if ( hasExternalValueBinding() ) + if ( _rExternalValue.hasValue() ) { - Any aExternalValue = getExternalValueBinding()->getValue( ::getCppuType( static_cast< util::Time* >( NULL ) ) ); - if ( aExternalValue.hasValue() ) - { - util::Time aTime; - OSL_VERIFY( aExternalValue >>= aTime ); - aControlValue <<= DBTypeConversion::toINT32( aTime ); - } + util::Time aTime; + OSL_VERIFY( _rExternalValue >>= aTime ); + aControlValue <<= DBTypeConversion::toINT32( aTime ); } return aControlValue; } @@ -357,12 +350,9 @@ Any OTimeModel::getDefaultForReset() const } //------------------------------------------------------------------------------ -sal_Bool OTimeModel::approveValueBinding( const Reference< binding::XValueBinding >& _rxBinding ) +Sequence< Type > OTimeModel::getSupportedBindingTypes() { - OSL_PRECOND( _rxBinding.is(), "OTimeModel::approveValueBinding: invalid binding!" ); - - return _rxBinding.is() - && _rxBinding->supportsType( ::getCppuType( static_cast< util::Time* >( NULL ) ) ); + return Sequence< Type >( &::getCppuType( static_cast< util::Time* >( NULL ) ), 1 ); } //......................................................................... |