From 8ee69b0ba13f74d1515fac71df92947eb6328ab1 Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Sun, 4 Aug 2013 01:14:22 +0200 Subject: fdo#67235 adapt form control code to time nanosecond API change, step 3 Change-Id: I4899c89ee5b2a54c9c05b531ab284365f1558e3d Reviewed-on: https://gerrit.libreoffice.org/5270 Tested-by: Lionel Elie Mamane Reviewed-by: Lionel Elie Mamane --- include/toolkit/controls/unocontrolbase.hxx | 6 +++- include/toolkit/controls/unocontrols.hxx | 48 ++++++++++++++--------------- 2 files changed, 29 insertions(+), 25 deletions(-) (limited to 'include/toolkit/controls') diff --git a/include/toolkit/controls/unocontrolbase.hxx b/include/toolkit/controls/unocontrolbase.hxx index 1fa03a8735e7..1ca1eb4cf1f3 100644 --- a/include/toolkit/controls/unocontrolbase.hxx +++ b/include/toolkit/controls/unocontrolbase.hxx @@ -21,6 +21,8 @@ #define _TOOLKIT_AWT_UNOCONTROLBASE_HXX_ #include +#include +#include #include @@ -46,7 +48,9 @@ protected: sal_Int32 ImplGetPropertyValue_INT32( sal_uInt16 nProp ); sal_Int64 ImplGetPropertyValue_INT64( sal_uInt16 nProp ); double ImplGetPropertyValue_DOUBLE( sal_uInt16 nProp ); - OUString ImplGetPropertyValue_UString( sal_uInt16 nProp ); + OUString ImplGetPropertyValue_UString( sal_uInt16 nProp ); + ::com::sun::star::util::Date ImplGetPropertyValue_Date( sal_uInt16 nProp ); + ::com::sun::star::util::Time ImplGetPropertyValue_Time( sal_uInt16 nProp ); // XLayoutConstrains (nur wenn das Control es unterstuetzt!) ::com::sun::star::awt::Size Impl_getMinimumSize(); diff --git a/include/toolkit/controls/unocontrols.hxx b/include/toolkit/controls/unocontrols.hxx index fdcb44af3197..c8a5d7ae5843 100644 --- a/include/toolkit/controls/unocontrols.hxx +++ b/include/toolkit/controls/unocontrols.hxx @@ -1081,8 +1081,8 @@ class UnoDateFieldControl : public UnoSpinFieldControl, public ::com::sun::star::awt::XDateField { private: - sal_Int32 mnFirst; - sal_Int32 mnLast; + ::com::sun::star::util::Date mnFirst; + ::com::sun::star::util::Date mnLast; sal_Bool mbLongFormat; public: UnoDateFieldControl(); @@ -1103,16 +1103,16 @@ public: void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException); //XDateField - void SAL_CALL setDate( sal_Int32 Date ) throw(::com::sun::star::uno::RuntimeException); - sal_Int32 SAL_CALL getDate( ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL setMin( sal_Int32 Date ) throw(::com::sun::star::uno::RuntimeException); - sal_Int32 SAL_CALL getMin( ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL setMax( sal_Int32 Date ) throw(::com::sun::star::uno::RuntimeException); - sal_Int32 SAL_CALL getMax( ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL setFirst( sal_Int32 Date ) throw(::com::sun::star::uno::RuntimeException); - sal_Int32 SAL_CALL getFirst( ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL setLast( sal_Int32 Date ) throw(::com::sun::star::uno::RuntimeException); - sal_Int32 SAL_CALL getLast( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setDate( const ::com::sun::star::util::Date& Date ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::util::Date SAL_CALL getDate( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setMin( const ::com::sun::star::util::Date& Date ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::util::Date SAL_CALL getMin( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setMax( const ::com::sun::star::util::Date& Date ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::util::Date SAL_CALL getMax( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setFirst( const ::com::sun::star::util::Date& Date ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::util::Date SAL_CALL getFirst( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setLast( const ::com::sun::star::util::Date& Date ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::util::Date SAL_CALL getLast( ) throw(::com::sun::star::uno::RuntimeException); void SAL_CALL setLongFormat( sal_Bool bLong ) throw(::com::sun::star::uno::RuntimeException); sal_Bool SAL_CALL isLongFormat( ) throw(::com::sun::star::uno::RuntimeException); void SAL_CALL setEmpty( ) throw(::com::sun::star::uno::RuntimeException); @@ -1157,8 +1157,8 @@ class UnoTimeFieldControl : public UnoSpinFieldControl, public ::com::sun::star::awt::XTimeField { private: - sal_Int32 mnFirst; - sal_Int32 mnLast; + ::com::sun::star::util::Time mnFirst; + ::com::sun::star::util::Time mnLast; public: UnoTimeFieldControl(); @@ -1179,16 +1179,16 @@ public: void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException); //XTimeField - void SAL_CALL setTime( sal_Int64 Time ) throw(::com::sun::star::uno::RuntimeException); - sal_Int64 SAL_CALL getTime( ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL setMin( sal_Int64 Time ) throw(::com::sun::star::uno::RuntimeException); - sal_Int64 SAL_CALL getMin( ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL setMax( sal_Int64 Time ) throw(::com::sun::star::uno::RuntimeException); - sal_Int64 SAL_CALL getMax( ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL setFirst( sal_Int64 Time ) throw(::com::sun::star::uno::RuntimeException); - sal_Int64 SAL_CALL getFirst( ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL setLast( sal_Int64 Time ) throw(::com::sun::star::uno::RuntimeException); - sal_Int64 SAL_CALL getLast( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setTime( const ::com::sun::star::util::Time& Time ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::util::Time SAL_CALL getTime( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setMin( const ::com::sun::star::util::Time& Time ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::util::Time SAL_CALL getMin( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setMax( const ::com::sun::star::util::Time& Time ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::util::Time SAL_CALL getMax( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setFirst( const ::com::sun::star::util::Time& Time ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::util::Time SAL_CALL getFirst( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setLast( const ::com::sun::star::util::Time& Time ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::util::Time SAL_CALL getLast( ) throw(::com::sun::star::uno::RuntimeException); void SAL_CALL setEmpty( ) throw(::com::sun::star::uno::RuntimeException); sal_Bool SAL_CALL isEmpty( ) throw(::com::sun::star::uno::RuntimeException); void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException); -- cgit