diff options
author | John LeMoyne Castle <jlc@mail2lee.com> | 2010-12-21 15:47:53 +0000 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2010-12-21 15:47:53 +0000 |
commit | c631cf94e468d6f5ced5cacda3600c683c44dca2 (patch) | |
tree | b8824cae67c3b143dc70ba52f04797a87d09fb85 /basic/source/classes/sbunoobj.cxx | |
parent | 9cc9b6dccbdecfe2877a5735672d7f9bb38d0235 (diff) |
68bit currency enhancement
Diffstat (limited to 'basic/source/classes/sbunoobj.cxx')
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 3a2a0dac6b78..c97945515db3 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -781,13 +781,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) oleautomation::Currency aCurrency; if( (aValue >>= aCurrency) ) { - sal_Int64 nValue64 = aCurrency.Value; - SbxINT64 aInt64; - aInt64.nHigh = - sal::static_int_cast< INT32 >( - nValue64 >> 32); - aInt64.nLow = (UINT32)( nValue64 & 0xffffffff ); - pVar->PutCurrency( aInt64 ); + pVar->PutCurrency( aCurrency.Value ); break; } } @@ -960,8 +954,6 @@ Type getUnoTypeForSbxBaseType( SbxDataType eType ) case SbxBYTE: aRetType = ::getCppuType( (sal_Int8*)0 ); break; case SbxUSHORT: aRetType = ::getCppuType( (sal_uInt16*)0 ); break; case SbxULONG: aRetType = ::getCppuType( (sal_uInt32*)0 ); break; - //case SbxLONG64: break; - //case SbxULONG64: break; // map machine-dependent ones on hyper for secureness case SbxINT: aRetType = ::getCppuType( (sal_Int32*)0 ); break; case SbxUINT: aRetType = ::getCppuType( (sal_uInt32*)0 ); break; @@ -1103,7 +1095,7 @@ Type getUnoTypeForSbxValue( SbxValue* pVal ) } // Otherwise it is a No-Uno-Basic-Object -> default==deliver void } - // No objekt, convert basic type + // No object, convert basic type else { aRetType = getUnoTypeForSbxBaseType( eBaseType ); @@ -1192,6 +1184,7 @@ Any sbxToUnoValueImpl( SbxVariable* pVar, bool bBlockConversionToSmallestType = aType = ::getCppuType( (sal_uInt16*)0 ); break; } + // TODO: need to add hyper types ? default: break; } } @@ -1324,13 +1317,8 @@ Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty } else if( rType == ::getCppuType( (oleautomation::Currency*)0 ) ) { - SbxINT64 aInt64 = pVar->GetCurrency(); - oleautomation::Currency aCurrency; - sal_Int64& rnValue64 = aCurrency.Value; - rnValue64 = aInt64.nHigh; - rnValue64 <<= 32; - rnValue64 |= aInt64.nLow; - aRetVal <<= aCurrency; + // assumes per previous code that ole Currency is Int64 + aRetVal <<= (sal_Int64)( pVar->GetInt64() ); break; } else if( rType == ::getCppuType( (oleautomation::Date*)0 ) ) @@ -1363,11 +1351,9 @@ Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty case TypeClass_CLASS: break; case TypeClass_TYPEDEF: break; case TypeClass_UNION: break; - case TypeClass_ENUM: break; case TypeClass_ARRAY: break; */ - // Array -> Sequence case TypeClass_ENUM: { aRetVal = int2enum( pVar->GetLong(), rType ); @@ -1888,8 +1874,6 @@ String Dbg_SbxDataType2String( SbxDataType eType ) case SbxBYTE: aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxBYTE") ); break; case SbxUSHORT: aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxUSHORT") ); break; case SbxULONG: aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxULONG") ); break; - case SbxLONG64: aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxLONG64") ); break; - case SbxULONG64: aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxULONG64") ); break; case SbxSALINT64: aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxINT64") ); break; case SbxSALUINT64: aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxUINT64") ); break; case SbxINT: aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxINT") ); break; |