diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-09-09 20:00:48 +0200 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-09-11 20:40:19 +0000 |
commit | b31f33bcc1e5b8d1f791867358b5b4ad1df6e71e (patch) | |
tree | 50b297ee4a5187e120b7898afff52fcde18f3c52 /include/basic | |
parent | 20238b8fa63b8754d14b69467842f8c49fe3bb2b (diff) |
Easier conversion between Basic Date and UNO Date/Time
Utility functions to convert between Basic Date type
and the representations of Date and Time in UNO, namely:
- com.sun.star.util.Date
- com.sun.star.util.Time
- com.sun.star.util.DateTime
Name of new functions:
- CDateToUnoDate
- CDateFromUnoDate
- CDateToUnoTime
- CDateFromUnoTime
- CDateToUnoDateTime
- CDateFromUnoDateTime
Change-Id: I2b971df20df1c0351d071023e042169b548894f1
Reviewed-on: https://gerrit.libreoffice.org/5897
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'include/basic')
-rw-r--r-- | include/basic/sbuno.hxx | 6 | ||||
-rw-r--r-- | include/basic/sbxvar.hxx | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/basic/sbuno.hxx b/include/basic/sbuno.hxx index 55d487a48b75..30148690d188 100644 --- a/include/basic/sbuno.hxx +++ b/include/basic/sbuno.hxx @@ -20,6 +20,9 @@ #ifndef _SB_SBUNO_HXX #define _SB_SBUNO_HXX +#include <com/sun/star/beans/Property.hpp> +#include <com/sun/star/uno/Any.hxx> +#include <com/sun/star/uno/Type.hxx> #include <basic/sbxobj.hxx> #include "basicdllapi.h" @@ -33,7 +36,8 @@ BASIC_DLLPUBLIC SbxObjectRef GetSbUnoObject( const OUString& aName, const com::s BASIC_DLLPUBLIC void createAllObjectProperties( SbxObject* pObj ); BASIC_DLLPUBLIC void SetSbUnoObjectDfltPropName( SbxObject* pObj ); -BASIC_DLLPUBLIC ::com::sun::star::uno::Any sbxToUnoValue( SbxVariable* pVar ); +BASIC_DLLPUBLIC ::com::sun::star::uno::Any sbxToUnoValue( const SbxValue* pVar ); +BASIC_DLLPUBLIC ::com::sun::star::uno::Any sbxToUnoValue( const SbxValue* pVar, const ::com::sun::star::uno::Type& rType, com::sun::star::beans::Property* pUnoProperty = NULL ); BASIC_DLLPUBLIC void unoToSbxValue( SbxVariable* pVar, const ::com::sun::star::uno::Any& aValue ); diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx index 4d4a8b625bc3..a81836f125f6 100644 --- a/include/basic/sbxvar.hxx +++ b/include/basic/sbxvar.hxx @@ -189,7 +189,7 @@ public: // Special methods sal_Bool PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ); sal_Bool PutDecimal( SbxDecimal* pDecimal ); // This function is needed for Windows build, don't remove - sal_Bool fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ); + sal_Bool fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ) const; sal_Bool PutCurrency( const sal_Int64& ); // Interface for CDbl in Basic static SbxError ScanNumIntnl( const OUString& rSrc, double& nVal, bool bSingle = false ); |