summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-06-25 11:01:45 +0000
committerKurt Zenker <kz@openoffice.org>2008-06-25 11:01:45 +0000
commite32f5d04e9cf5bdafdf9d892462fdc1935864425 (patch)
tree2d6873b3934708630d7d6c7f8c8d7b7d03092583
parent76e01e171dd7a6f830b3991a20e4c8d31d6d69f2 (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.cxx26
1 files changed, 8 insertions, 18 deletions
diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx
index 2e13fe70ab4a..85ce1670572d 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 );
}
//.........................................................................