diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2006-03-15 08:23:17 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2006-03-15 08:23:17 +0000 |
commit | eff90dfc894d32efacbb7e7b22a81387a47391be (patch) | |
tree | 42178661e029ee3783ba4eb18da080065b7d10b5 /forms/source/component/Date.cxx | |
parent | 368ef10fae1e8745bc7f3575dcd28197b4dcbd49 (diff) |
INTEGRATION: CWS jsc3 (1.18.64); FILE MERGED
2006/02/22 15:23:33 fs 1.18.64.1: #i62418# correct translateControlValueToValidatableValue
Diffstat (limited to 'forms/source/component/Date.cxx')
-rw-r--r-- | forms/source/component/Date.cxx | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx index 50a23910ee8f..7e4943dfbec8 100644 --- a/forms/source/component/Date.cxx +++ b/forms/source/component/Date.cxx @@ -4,9 +4,9 @@ * * $RCSfile: Date.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: vg $ $Date: 2006-03-14 10:57:57 $ + * last change: $Author: vg $ $Date: 2006-03-15 09:22:40 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -318,15 +318,22 @@ sal_Bool ODateModel::commitControlValueToDbColumn( bool _bPostReset ) } //------------------------------------------------------------------------------ -Any ODateModel::translateControlValueToExternalValue( ) const +void ODateModel::impl_translateControlValueToUNODate( Any& _rUNOValue ) const { - Any aExternalValue( getControlValue() ); - if ( aExternalValue.hasValue() ) + _rUNOValue = getControlValue(); + if ( _rUNOValue.hasValue() ) { sal_Int32 nDate = 0; - OSL_VERIFY( aExternalValue >>= nDate ); - aExternalValue <<= DBTypeConversion::toDate( nDate ); + OSL_VERIFY( _rUNOValue >>= nDate ); + _rUNOValue <<= DBTypeConversion::toDate( nDate ); } +} + +//------------------------------------------------------------------------------ +Any ODateModel::translateControlValueToExternalValue( ) const +{ + Any aExternalValue; + impl_translateControlValueToUNODate( aExternalValue ); return aExternalValue; } @@ -351,6 +358,14 @@ Any ODateModel::translateExternalValueToControlValue( ) const } //------------------------------------------------------------------------------ +Any ODateModel::translateControlValueToValidatableValue( ) const +{ + Any aValidatableValue; + impl_translateControlValueToUNODate( aValidatableValue ); + return aValidatableValue; +} + +//------------------------------------------------------------------------------ Any ODateModel::translateDbColumnToControlValue() { util::Date aDate = m_xColumn->getDate(); |