comphelper: add getINT64

This commit is contained in:
Lionel Elie Mamane
2012-02-14 19:39:01 +01:00
parent c1ef5ba65c
commit 034b130b90
2 changed files with 9 additions and 0 deletions

View File

@@ -156,6 +156,7 @@ namespace comphelper
// no, we don't use templates here. This would lead to a lot of implicit uses of the conversion methods, // no, we don't use templates here. This would lead to a lot of implicit uses of the conversion methods,
// which would be difficult to trace ... // which would be difficult to trace ...
COMPHELPER_DLLPUBLIC sal_Int64 getINT64(const staruno::Any& _rAny);
COMPHELPER_DLLPUBLIC sal_Int32 getINT32(const staruno::Any& _rAny); COMPHELPER_DLLPUBLIC sal_Int32 getINT32(const staruno::Any& _rAny);
COMPHELPER_DLLPUBLIC sal_Int16 getINT16(const staruno::Any& _rAny); COMPHELPER_DLLPUBLIC sal_Int16 getINT16(const staruno::Any& _rAny);
COMPHELPER_DLLPUBLIC double getDouble(const staruno::Any& _rAny); COMPHELPER_DLLPUBLIC double getDouble(const staruno::Any& _rAny);

View File

@@ -79,6 +79,14 @@ sal_Bool operator ==(const Time& _rLeft, const Time& _rRight)
( _rLeft.Hours == _rRight.Hours) ; ( _rLeft.Hours == _rRight.Hours) ;
} }
//------------------------------------------------------------------------------
sal_Int64 getINT64(const Any& _rAny)
{
sal_Int64 nReturn = 0;
OSL_VERIFY( _rAny >>= nReturn );
return nReturn;
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
sal_Int32 getINT32(const Any& _rAny) sal_Int32 getINT32(const Any& _rAny)
{ {