diff options
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/awt/vclxwindows.cxx | 178 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrolbase.cxx | 12 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrolmodel.cxx | 8 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrols.cxx | 60 | ||||
-rw-r--r-- | toolkit/source/helper/property.cxx | 16 |
5 files changed, 140 insertions, 134 deletions
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 898a38b40468..079b994e689b 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -4831,24 +4831,24 @@ void VCLXDateField::setProperty( const OUString& PropertyName, const ::com::sun: } else { - sal_Int32 n = 0; - if ( Value >>= n ) - setDate( n ); + util::Date d; + if ( Value >>= d ) + setDate( d ); } } break; case BASEPROPERTY_DATEMIN: { - sal_Int32 n = 0; - if ( Value >>= n ) - setMin( n ); + util::Date d; + if ( Value >>= d ) + setMin( d ); } break; case BASEPROPERTY_DATEMAX: { - sal_Int32 n = 0; - if ( Value >>= n ) - setMax( n ); + util::Date d; + if ( Value >>= d ) + setMax( d ); } break; case BASEPROPERTY_EXTDATEFORMAT: @@ -4893,17 +4893,17 @@ void VCLXDateField::setProperty( const OUString& PropertyName, const ::com::sun: { case BASEPROPERTY_DATE: { - aProp <<= (sal_Int32) getDate(); + aProp <<= getDate(); } break; case BASEPROPERTY_DATEMIN: { - aProp <<= (sal_Int32) getMin(); + aProp <<= getMin(); } break; case BASEPROPERTY_DATEMAX: { - aProp <<= (sal_Int32) getMax(); + aProp <<= getMax(); } break; case BASEPROPERTY_DATESHOWCENTURY: @@ -4926,14 +4926,14 @@ void VCLXDateField::setProperty( const OUString& PropertyName, const ::com::sun: } -void VCLXDateField::setDate( sal_Int32 nDate ) throw(::com::sun::star::uno::RuntimeException) +void VCLXDateField::setDate( const util::Date& aDate ) throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) { - pDateField->SetDate( nDate ); + pDateField->SetDate( aDate ); // #107218# Call same listeners like VCL would do after user interaction SetSynthesizingVCLEvent( sal_True ); @@ -4943,100 +4943,95 @@ void VCLXDateField::setDate( sal_Int32 nDate ) throw(::com::sun::star::uno::Runt } } -sal_Int32 VCLXDateField::getDate() throw(::com::sun::star::uno::RuntimeException) +util::Date VCLXDateField::getDate() throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; - sal_Int32 nDate = 0; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) - nDate = pDateField->GetDate().GetDate(); - - return nDate; + return pDateField->GetDate().GetUNODate(); + else + return util::Date(); } -void VCLXDateField::setMin( sal_Int32 nDate ) throw(::com::sun::star::uno::RuntimeException) +void VCLXDateField::setMin( const util::Date& aDate ) throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) - pDateField->SetMin( nDate ); + pDateField->SetMin( aDate ); } -sal_Int32 VCLXDateField::getMin() throw(::com::sun::star::uno::RuntimeException) +util::Date VCLXDateField::getMin() throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; - sal_Int32 nDate = 0; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) - nDate = pDateField->GetMin().GetDate(); - - return nDate; + return pDateField->GetMin().GetUNODate(); + else + return util::Date(); } -void VCLXDateField::setMax( sal_Int32 nDate ) throw(::com::sun::star::uno::RuntimeException) +void VCLXDateField::setMax( const util::Date& aDate ) throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) - pDateField->SetMax( nDate ); + pDateField->SetMax( aDate ); } -sal_Int32 VCLXDateField::getMax() throw(::com::sun::star::uno::RuntimeException) +util::Date VCLXDateField::getMax() throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; - sal_Int32 nDate = 0; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) - nDate = pDateField->GetMax().GetDate(); - - return nDate; + return pDateField->GetMax().GetUNODate(); + else + return util::Date(); } -void VCLXDateField::setFirst( sal_Int32 nDate ) throw(::com::sun::star::uno::RuntimeException) +void VCLXDateField::setFirst( const util::Date& aDate ) throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) - pDateField->SetFirst( nDate ); + pDateField->SetFirst( aDate ); } -sal_Int32 VCLXDateField::getFirst() throw(::com::sun::star::uno::RuntimeException) +util::Date VCLXDateField::getFirst() throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; - sal_Int32 nDate = 0; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) - nDate = pDateField->GetFirst().GetDate(); - - return nDate; + return pDateField->GetFirst().GetUNODate(); + else + return util::Date(); } -void VCLXDateField::setLast( sal_Int32 nDate ) throw(::com::sun::star::uno::RuntimeException) +void VCLXDateField::setLast( const util::Date& aDate ) throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) - pDateField->SetLast( nDate ); + pDateField->SetLast( aDate ); } -sal_Int32 VCLXDateField::getLast() throw(::com::sun::star::uno::RuntimeException) +util::Date VCLXDateField::getLast() throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; - sal_Int32 nDate = 0; DateField* pDateField = (DateField*) GetWindow(); if ( pDateField ) - nDate = pDateField->GetLast().GetDate(); - - return nDate; + return pDateField->GetLast().GetUNODate(); + else + return util::Date(); } void VCLXDateField::setLongFormat( sal_Bool bLong ) throw(::com::sun::star::uno::RuntimeException) @@ -5153,14 +5148,14 @@ IMPL_XTYPEPROVIDER_START( VCLXTimeField ) VCLXFormattedSpinField::getTypes() IMPL_XTYPEPROVIDER_END -void VCLXTimeField::setTime( sal_Int64 nTime ) throw(::com::sun::star::uno::RuntimeException) +void VCLXTimeField::setTime( const util::Time& aTime ) throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) { - pTimeField->SetTime( nTime ); + pTimeField->SetTime( aTime ); // #107218# Call same listeners like VCL would do after user interaction SetSynthesizingVCLEvent( sal_True ); @@ -5170,100 +5165,95 @@ void VCLXTimeField::setTime( sal_Int64 nTime ) throw(::com::sun::star::uno::Runt } } -sal_Int64 VCLXTimeField::getTime() throw(::com::sun::star::uno::RuntimeException) +util::Time VCLXTimeField::getTime() throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; - sal_Int64 nTime = 0; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) - nTime = pTimeField->GetTime().GetTime(); - - return nTime; + return pTimeField->GetTime().GetUNOTime(); + else + return util::Time(); } -void VCLXTimeField::setMin( sal_Int64 nTime ) throw(::com::sun::star::uno::RuntimeException) +void VCLXTimeField::setMin( const util::Time& aTime ) throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) - pTimeField->SetMin( nTime ); + pTimeField->SetMin( aTime ); } -sal_Int64 VCLXTimeField::getMin() throw(::com::sun::star::uno::RuntimeException) +util::Time VCLXTimeField::getMin() throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; - sal_Int64 nTime = 0; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) - nTime = pTimeField->GetMin().GetTime(); - - return nTime; + return pTimeField->GetMin().GetUNOTime(); + else + return util::Time(); } -void VCLXTimeField::setMax( sal_Int64 nTime ) throw(::com::sun::star::uno::RuntimeException) +void VCLXTimeField::setMax( const util::Time& aTime ) throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) - pTimeField->SetMax( nTime ); + pTimeField->SetMax( aTime ); } -sal_Int64 VCLXTimeField::getMax() throw(::com::sun::star::uno::RuntimeException) +util::Time VCLXTimeField::getMax() throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; - sal_Int64 nTime = 0; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) - nTime = pTimeField->GetMax().GetTime(); - - return nTime; + return pTimeField->GetMax().GetUNOTime(); + else + return util::Time(); } -void VCLXTimeField::setFirst( sal_Int64 nTime ) throw(::com::sun::star::uno::RuntimeException) +void VCLXTimeField::setFirst( const util::Time& aTime ) throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) - pTimeField->SetFirst( nTime ); + pTimeField->SetFirst( aTime ); } -sal_Int64 VCLXTimeField::getFirst() throw(::com::sun::star::uno::RuntimeException) +util::Time VCLXTimeField::getFirst() throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; - sal_Int64 nTime = 0; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) - nTime = pTimeField->GetFirst().GetTime(); - - return nTime; + return pTimeField->GetFirst().GetUNOTime(); + else + return util::Time(); } -void VCLXTimeField::setLast( sal_Int64 nTime ) throw(::com::sun::star::uno::RuntimeException) +void VCLXTimeField::setLast( const util::Time& aTime ) throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) - pTimeField->SetLast( nTime ); + pTimeField->SetLast( aTime ); } -sal_Int64 VCLXTimeField::getLast() throw(::com::sun::star::uno::RuntimeException) +util::Time VCLXTimeField::getLast() throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aGuard; - sal_Int64 nTime = 0; TimeField* pTimeField = (TimeField*) GetWindow(); if ( pTimeField ) - nTime = pTimeField->GetLast().GetTime(); - - return nTime; + return pTimeField->GetLast().GetUNOTime(); + else + return util::Time(); } void VCLXTimeField::setEmpty() throw(::com::sun::star::uno::RuntimeException) @@ -5314,24 +5304,24 @@ void VCLXTimeField::setProperty( const OUString& PropertyName, const ::com::sun: } else { - sal_Int64 n = 0; - if ( Value >>= n ) - setTime( n ); + util::Time t; + if ( Value >>= t ) + setTime( t ); } } break; case BASEPROPERTY_TIMEMIN: { - sal_Int64 n = 0; - if ( Value >>= n ) - setMin( n ); + util::Time t; + if ( Value >>= t ) + setMin( t ); } break; case BASEPROPERTY_TIMEMAX: { - sal_Int64 n = 0; - if ( Value >>= n ) - setMax( n ); + util::Time t; + if ( Value >>= t ) + setMax( t ); } break; case BASEPROPERTY_EXTTIMEFORMAT: @@ -5368,17 +5358,17 @@ void VCLXTimeField::setProperty( const OUString& PropertyName, const ::com::sun: { case BASEPROPERTY_TIME: { - aProp <<= (sal_Int64) getTime(); + aProp <<= getTime(); } break; case BASEPROPERTY_TIMEMIN: { - aProp <<= (sal_Int64) getMin(); + aProp <<= getMin(); } break; case BASEPROPERTY_TIMEMAX: { - aProp <<= (sal_Int64) getMax(); + aProp <<= getMax(); } break; case BASEPROPERTY_ENFORCE_FORMAT: diff --git a/toolkit/source/controls/unocontrolbase.cxx b/toolkit/source/controls/unocontrolbase.cxx index 4f0cb43ace7f..26f06be28c1a 100644 --- a/toolkit/source/controls/unocontrolbase.cxx +++ b/toolkit/source/controls/unocontrolbase.cxx @@ -26,6 +26,8 @@ #include <tools/debug.hxx> +using namespace com::sun::star; + // ---------------------------------------------------- // class UnoControlBase // ---------------------------------------------------- @@ -164,6 +166,16 @@ OUString UnoControlBase::ImplGetPropertyValue_UString( sal_uInt16 nProp ) return ImplGetPropertyValueClass<OUString>(nProp); } +util::Date UnoControlBase::ImplGetPropertyValue_Date( sal_uInt16 nProp ) +{ + return ImplGetPropertyValueClass<util::Date>(nProp); +} + +util::Time UnoControlBase::ImplGetPropertyValue_Time( sal_uInt16 nProp ) +{ + return ImplGetPropertyValueClass<util::Time>(nProp); +} + ::com::sun::star::awt::Size UnoControlBase::Impl_getMinimumSize() { ::com::sun::star::awt::Size aSz; diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index c2aa7b73a6a4..0578e2c81db0 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -232,10 +232,10 @@ sal_Bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const case BASEPROPERTY_PUSHBUTTONTYPE: aDefault <<= (sal_Int16) 0 /*PushButtonType::STANDARD*/; break; case BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR:aDefault <<= (sal_Int16) awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY; break; - case BASEPROPERTY_DATEMAX: aDefault <<= (sal_Int32) Date( 31, 12, 2200 ).GetDate(); break; - case BASEPROPERTY_DATEMIN: aDefault <<= (sal_Int32) Date( 1, 1, 1900 ).GetDate(); break; - case BASEPROPERTY_TIMEMAX: aDefault <<= (sal_Int64) Time( 23, 59 ).GetTime(); break; - case BASEPROPERTY_TIMEMIN: aDefault <<= (sal_Int64) 0; break; + case BASEPROPERTY_DATEMAX: aDefault <<= util::Date( 31, 12, 2200 ); break; + case BASEPROPERTY_DATEMIN: aDefault <<= util::Date( 1, 1, 1900 ); break; + case BASEPROPERTY_TIMEMAX: aDefault <<= util::Time(0, 0, 59, 23, false); break; + case BASEPROPERTY_TIMEMIN: aDefault <<= util::Time(); break; case BASEPROPERTY_VALUEMAX_DOUBLE: aDefault <<= (double) 1000000; break; case BASEPROPERTY_VALUEMIN_DOUBLE: aDefault <<= (double) -1000000; break; case BASEPROPERTY_VALUESTEP_DOUBLE: aDefault <<= (double ) 1; break; diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index c9d7f354cc2f..e2503cfc2001 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -3246,8 +3246,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlDateFieldModel::getPropertyS UnoDateFieldControl::UnoDateFieldControl() :UnoSpinFieldControl() { - mnFirst = Date( 1, 1, 1900 ).GetDate(); - mnLast = Date( 31, 12, 2200 ).GetDate(); + mnFirst = util::Date( 1, 1, 1900 ); + mnLast = util::Date( 31, 12, 2200 ); mbLongFormat = 2; } @@ -3323,43 +3323,43 @@ void UnoDateFieldControl::textChanged( const awt::TextEvent& e ) throw(uno::Runt GetTextListeners().textChanged( e ); } -void UnoDateFieldControl::setDate( sal_Int32 Date ) throw(uno::RuntimeException) +void UnoDateFieldControl::setDate( const util::Date& Date ) throw(uno::RuntimeException) { uno::Any aAny; aAny <<= Date; ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_DATE ), aAny, sal_True ); } -sal_Int32 UnoDateFieldControl::getDate() throw(uno::RuntimeException) +util::Date UnoDateFieldControl::getDate() throw(uno::RuntimeException) { - return ImplGetPropertyValue_INT32( BASEPROPERTY_DATE ); + return ImplGetPropertyValue_Date( BASEPROPERTY_DATE ); } -void UnoDateFieldControl::setMin( sal_Int32 Date ) throw(uno::RuntimeException) +void UnoDateFieldControl::setMin( const util::Date& Date ) throw(uno::RuntimeException) { uno::Any aAny; aAny <<= Date; ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_DATEMIN ), aAny, sal_True ); } -sal_Int32 UnoDateFieldControl::getMin() throw(uno::RuntimeException) +util::Date UnoDateFieldControl::getMin() throw(uno::RuntimeException) { - return ImplGetPropertyValue_INT32( BASEPROPERTY_DATEMIN ); + return ImplGetPropertyValue_Date( BASEPROPERTY_DATEMIN ); } -void UnoDateFieldControl::setMax( sal_Int32 Date ) throw(uno::RuntimeException) +void UnoDateFieldControl::setMax( const util::Date& Date ) throw(uno::RuntimeException) { uno::Any aAny; aAny <<= Date; ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_DATEMAX ), aAny, sal_True ); } -sal_Int32 UnoDateFieldControl::getMax() throw(uno::RuntimeException) +util::Date UnoDateFieldControl::getMax() throw(uno::RuntimeException) { - return ImplGetPropertyValue_INT32( BASEPROPERTY_DATEMAX ); + return ImplGetPropertyValue_Date( BASEPROPERTY_DATEMAX ); } -void UnoDateFieldControl::setFirst( sal_Int32 Date ) throw(uno::RuntimeException) +void UnoDateFieldControl::setFirst( const util::Date& Date ) throw(uno::RuntimeException) { mnFirst = Date; if ( getPeer().is() ) @@ -3369,12 +3369,12 @@ void UnoDateFieldControl::setFirst( sal_Int32 Date ) throw(uno::RuntimeException } } -sal_Int32 UnoDateFieldControl::getFirst() throw(uno::RuntimeException) +util::Date UnoDateFieldControl::getFirst() throw(uno::RuntimeException) { return mnFirst; } -void UnoDateFieldControl::setLast( sal_Int32 Date ) throw(uno::RuntimeException) +void UnoDateFieldControl::setLast( const util::Date& Date ) throw(uno::RuntimeException) { mnLast = Date; if ( getPeer().is() ) @@ -3384,7 +3384,7 @@ void UnoDateFieldControl::setLast( sal_Int32 Date ) throw(uno::RuntimeException) } } -sal_Int32 UnoDateFieldControl::getLast() throw(uno::RuntimeException) +util::Date UnoDateFieldControl::getLast() throw(uno::RuntimeException) { return mnLast; } @@ -3488,8 +3488,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlTimeFieldModel::getPropertyS UnoTimeFieldControl::UnoTimeFieldControl() :UnoSpinFieldControl() { - mnFirst = Time( 0, 0 ).GetTime(); - mnLast = Time( 23, 59, 59, 99 ).GetTime(); + mnFirst = util::Time( 0, 0, 0, 0, false ); + mnLast = util::Time( 999999999, 59, 59, 23, false ); } OUString UnoTimeFieldControl::GetComponentServiceName() @@ -3539,43 +3539,43 @@ void UnoTimeFieldControl::textChanged( const awt::TextEvent& e ) throw(uno::Runt GetTextListeners().textChanged( e ); } -void UnoTimeFieldControl::setTime( sal_Int64 Time ) throw(uno::RuntimeException) +void UnoTimeFieldControl::setTime( const util::Time& Time ) throw(uno::RuntimeException) { uno::Any aAny; aAny <<= Time; ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TIME ), aAny, sal_True ); } -sal_Int64 UnoTimeFieldControl::getTime() throw(uno::RuntimeException) +util::Time UnoTimeFieldControl::getTime() throw(uno::RuntimeException) { - return ImplGetPropertyValue_INT64( BASEPROPERTY_TIME ); + return ImplGetPropertyValue_Time( BASEPROPERTY_TIME ); } -void UnoTimeFieldControl::setMin( sal_Int64 Time ) throw(uno::RuntimeException) +void UnoTimeFieldControl::setMin( const util::Time& Time ) throw(uno::RuntimeException) { uno::Any aAny; aAny <<= Time; ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TIMEMIN ), aAny, sal_True ); } -sal_Int64 UnoTimeFieldControl::getMin() throw(uno::RuntimeException) +util::Time UnoTimeFieldControl::getMin() throw(uno::RuntimeException) { - return ImplGetPropertyValue_INT64( BASEPROPERTY_TIMEMIN ); + return ImplGetPropertyValue_Time( BASEPROPERTY_TIMEMIN ); } -void UnoTimeFieldControl::setMax( sal_Int64 Time ) throw(uno::RuntimeException) +void UnoTimeFieldControl::setMax( const util::Time& Time ) throw(uno::RuntimeException) { uno::Any aAny; aAny <<= Time; ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TIMEMAX ), aAny, sal_True ); } -sal_Int64 UnoTimeFieldControl::getMax() throw(uno::RuntimeException) +util::Time UnoTimeFieldControl::getMax() throw(uno::RuntimeException) { - return ImplGetPropertyValue_INT64( BASEPROPERTY_TIMEMAX ); + return ImplGetPropertyValue_Time( BASEPROPERTY_TIMEMAX ); } -void UnoTimeFieldControl::setFirst( sal_Int64 Time ) throw(uno::RuntimeException) +void UnoTimeFieldControl::setFirst( const util::Time& Time ) throw(uno::RuntimeException) { mnFirst = Time; if ( getPeer().is() ) @@ -3585,12 +3585,12 @@ void UnoTimeFieldControl::setFirst( sal_Int64 Time ) throw(uno::RuntimeException } } -sal_Int64 UnoTimeFieldControl::getFirst() throw(uno::RuntimeException) +util::Time UnoTimeFieldControl::getFirst() throw(uno::RuntimeException) { return mnFirst; } -void UnoTimeFieldControl::setLast( sal_Int64 Time ) throw(uno::RuntimeException) +void UnoTimeFieldControl::setLast( const util::Time& Time ) throw(uno::RuntimeException) { mnLast = Time; if ( getPeer().is() ) @@ -3600,7 +3600,7 @@ void UnoTimeFieldControl::setLast( sal_Int64 Time ) throw(uno::RuntimeException) } } -sal_Int64 UnoTimeFieldControl::getLast() throw(uno::RuntimeException) +util::Time UnoTimeFieldControl::getLast() throw(uno::RuntimeException) { return mnLast; } diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index 9926b3c77e71..74f0e3ac05d5 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -39,6 +39,8 @@ #include <com/sun/star/view/SelectionType.hpp> #include <com/sun/star/style/VerticalAlignment.hpp> #include <com/sun/star/util/XNumberFormatsSupplier.hpp> +#include <com/sun/star/util/Date.hpp> +#include <com/sun/star/util/Time.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/graphic/XGraphic.hpp> #include <com/sun/star/resource/XStringResourceResolver.hpp> @@ -55,6 +57,8 @@ using ::com::sun::star::awt::FontDescriptor; using ::com::sun::star::style::VerticalAlignment; using ::com::sun::star::graphic::XGraphic; +using namespace com::sun::star; + struct ImplPropertyInfo { OUString aName; @@ -119,10 +123,10 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_2 ( "Closeable", CLOSEABLE, bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "CurrencySymbol", CURRENCYSYMBOL, OUString, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "CustomUnitText", CUSTOMUNITTEXT, OUString, BOUND, MAYBEDEFAULT ), - DECL_DEP_PROP_3 ( "Date", DATE, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), + DECL_DEP_PROP_3 ( "Date", DATE, util::Date, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_2 ( "DateFormat", EXTDATEFORMAT, sal_Int16, BOUND, MAYBEDEFAULT ), - DECL_PROP_2 ( "DateMax", DATEMAX, sal_Int32, BOUND, MAYBEDEFAULT ), - DECL_PROP_2 ( "DateMin", DATEMIN, sal_Int32, BOUND, MAYBEDEFAULT ), + DECL_PROP_2 ( "DateMax", DATEMAX, util::Date, BOUND, MAYBEDEFAULT ), + DECL_PROP_2 ( "DateMin", DATEMIN, util::Date, BOUND, MAYBEDEFAULT ), DECL_PROP_3 ( "DateShowCentury", DATESHOWCENTURY, bool, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_2 ( "DecimalAccuracy", DECIMALACCURACY, sal_Int16, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "DefaultButton", DEFAULTBUTTON, bool, BOUND, MAYBEDEFAULT ), @@ -231,10 +235,10 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_2 ( "Text", TEXT, OUString, BOUND, MAYBEDEFAULT ), DECL_PROP_3 ( "TextColor", TEXTCOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_3 ( "TextLineColor", TEXTLINECOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), - DECL_DEP_PROP_3 ( "Time", TIME, sal_Int64, BOUND, MAYBEDEFAULT, MAYBEVOID ), + DECL_DEP_PROP_3 ( "Time", TIME, util::Time, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_2 ( "TimeFormat", EXTTIMEFORMAT, sal_Int16, BOUND, MAYBEDEFAULT ), - DECL_PROP_2 ( "TimeMax", TIMEMAX, sal_Int64, BOUND, MAYBEDEFAULT ), - DECL_PROP_2 ( "TimeMin", TIMEMIN, sal_Int64, BOUND, MAYBEDEFAULT ), + DECL_PROP_2 ( "TimeMax", TIMEMAX, util::Time, BOUND, MAYBEDEFAULT ), + DECL_PROP_2 ( "TimeMin", TIMEMIN, util::Time, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "Title", TITLE, OUString, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "Toggle", TOGGLE, bool, BOUND, MAYBEDEFAULT ), DECL_PROP_3 ( "TreatAsNumber", TREATASNUMBER, bool, BOUND, MAYBEDEFAULT,TRANSIENT ), |