Version 4.3.0.0.beta1, tag libreoffice-4.3.0.0.beta1
[LibreOffice.git] / connectivity / source / drivers / ado / Aolevariant.cxx
blob02e6fa268a592ce4b7bcc178affcc3943065bb8e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "ado/Aolevariant.hxx"
21 #include "connectivity/dbconversion.hxx"
22 #include <com/sun/star/sdbc/SQLException.hpp>
23 #include <com/sun/star/util/Time.hpp>
24 #include <com/sun/star/util/Date.hpp>
25 #include <com/sun/star/util/DateTime.hpp>
26 #include "diagnose_ex.h"
27 #include "resource/sharedresources.hxx"
28 #include "resource/ado_res.hrc"
29 #include "com/sun/star/bridge/oleautomation/Date.hpp"
30 #include "com/sun/star/bridge/oleautomation/Currency.hpp"
31 #include "com/sun/star/bridge/oleautomation/SCode.hpp"
32 #include "com/sun/star/bridge/oleautomation/Decimal.hpp"
34 using namespace com::sun::star::beans;
35 using namespace com::sun::star::uno;
36 using namespace com::sun::star::bridge::oleautomation;
37 using namespace connectivity::ado;
39 OLEString::OLEString()
40 :m_sStr(NULL)
43 OLEString::OLEString(const BSTR& _sBStr)
44 :m_sStr(_sBStr)
47 OLEString::OLEString(const OUString& _sBStr)
49 m_sStr = ::SysAllocString(reinterpret_cast<LPCOLESTR>(_sBStr.getStr()));
51 OLEString::~OLEString()
53 if(m_sStr)
54 ::SysFreeString(m_sStr);
56 OLEString& OLEString::operator=(const OUString& _rSrc)
58 if(m_sStr)
59 ::SysFreeString(m_sStr);
60 m_sStr = ::SysAllocString(reinterpret_cast<LPCOLESTR>(_rSrc.getStr()));
61 return *this;
63 OLEString& OLEString::operator=(const OLEString& _rSrc)
65 if(this != &_rSrc)
67 if(m_sStr)
68 ::SysFreeString(m_sStr);
69 m_sStr = ::SysAllocString(_rSrc.m_sStr);
71 return *this;
73 OLEString& OLEString::operator=(const BSTR& _rSrc)
75 if(m_sStr)
76 ::SysFreeString(m_sStr);
77 m_sStr = _rSrc;
78 return *this;
80 OLEString::operator OUString() const
82 return (m_sStr != NULL) ? OUString(reinterpret_cast<const sal_Unicode*>(LPCOLESTR(m_sStr)),::SysStringLen(m_sStr)) : OUString();
84 OLEString::operator BSTR() const
86 return m_sStr;
88 BSTR* OLEString::operator &()
90 return &m_sStr;
92 sal_Int32 OLEString::length() const
94 return (m_sStr != NULL) ? ::SysStringLen(m_sStr) : 0;
97 OLEVariant::OLEVariant()
99 VariantInit(this);
101 OLEVariant::OLEVariant(const VARIANT& varSrc)
103 ::VariantInit(this);
104 HRESULT eRet = ::VariantCopy(this, const_cast<VARIANT*>(&varSrc));
105 OSL_ENSURE(eRet == S_OK,"Error while copying an ado variant!");
106 OSL_UNUSED(eRet);
108 OLEVariant::OLEVariant(const OLEVariant& varSrc)
110 ::VariantInit(this);
111 HRESULT eRet = ::VariantCopy(this, const_cast<VARIANT*>(static_cast<const VARIANT*>(&varSrc)));
112 OSL_ENSURE(eRet == S_OK,"Error while copying an ado variant!");
113 OSL_UNUSED(eRet);
116 OLEVariant::OLEVariant(bool x) { VariantInit(this); vt = VT_BOOL; boolVal = (x ? VARIANT_TRUE : VARIANT_FALSE);}
117 OLEVariant::OLEVariant(sal_Int8 n) { VariantInit(this); vt = VT_I1; bVal = n;}
118 OLEVariant::OLEVariant(sal_Int16 n) { VariantInit(this); vt = VT_I2; intVal = n;}
119 OLEVariant::OLEVariant(sal_Int32 n) { VariantInit(this); vt = VT_I4; lVal = n;}
120 OLEVariant::OLEVariant(sal_Int64 x) { VariantInit(this); vt = VT_I4; lVal = (LONG)x;}
122 OLEVariant::OLEVariant(const OUString& us)
124 ::VariantInit(this);
125 vt = VT_BSTR;
126 bstrVal = SysAllocString(reinterpret_cast<LPCOLESTR>(us.getStr()));
128 OLEVariant::~OLEVariant()
130 HRESULT eRet = ::VariantClear(this);
131 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
132 OSL_UNUSED(eRet);
133 } // clears all the memory that was allocated before
135 OLEVariant::OLEVariant(const ::com::sun::star::util::Date& x )
137 VariantInit(this);
138 vt = VT_DATE;
139 dblVal = ::dbtools::DBTypeConversion::toDouble(x,::com::sun::star::util::Date(30,12,1899));
141 OLEVariant::OLEVariant(const ::com::sun::star::util::Time& x )
143 VariantInit(this);
144 vt = VT_DATE;
145 dblVal = ::dbtools::DBTypeConversion::toDouble(x);
147 OLEVariant::OLEVariant(const ::com::sun::star::util::DateTime& x )
149 VariantInit(this);
150 vt = VT_DATE;
151 dblVal = ::dbtools::DBTypeConversion::toDouble(x,::com::sun::star::util::Date(30,12,1899));
153 OLEVariant::OLEVariant(const float &x)
155 VariantInit(this);
156 vt = VT_R4;
157 fltVal = x;
159 OLEVariant::OLEVariant(const double &x)
161 VariantInit(this);
162 vt = VT_R8;
163 dblVal = x;
167 OLEVariant::OLEVariant(IDispatch* pDispInterface)
169 VariantInit(this);
170 setIDispatch( pDispInterface );
173 OLEVariant::OLEVariant(const ::com::sun::star::uno::Sequence< sal_Int8 >& x)
175 VariantInit(this);
177 vt = VT_ARRAY|VT_UI1;
179 parray = SafeArrayCreateVector(VT_UI1, 0, x.getLength());
180 const sal_Int8* pBegin = x.getConstArray();
181 const sal_Int8* pEnd = pBegin + x.getLength();
183 for(sal_Int32 i=0;pBegin != pEnd;++i,++pBegin)
185 sal_Int32 nData = *pBegin;
186 HRESULT rs = SafeArrayPutElement(parray,&i,&nData);
187 OSL_ENSURE(S_OK == rs,"Error while copy byte data");
188 OSL_UNUSED(rs);
192 OLEVariant& OLEVariant::operator=(const OLEVariant& varSrc)
194 HRESULT eRet = ::VariantCopy(this, const_cast<VARIANT*>(static_cast<const VARIANT*>(&varSrc)));
195 OSL_ENSURE(eRet == S_OK,"Error while copying an ado variant!");
196 OSL_UNUSED(eRet);
197 return *this;
199 // Assign a const VARIANT& (::VariantCopy handles everything)
201 OLEVariant& OLEVariant::operator=(const tagVARIANT& varSrc)
203 HRESULT eRet = ::VariantCopy(this, const_cast<VARIANT*>(&varSrc));
204 OSL_ENSURE(eRet == S_OK,"Error while copying an ado variant!");
205 OSL_UNUSED(eRet);
207 return *this;
210 // Assign a const VARIANT* (::VariantCopy handles everything)
212 OLEVariant& OLEVariant::operator=(const VARIANT* pSrc)
214 HRESULT eRet = ::VariantCopy(this, const_cast<VARIANT*>(pSrc));
215 OSL_ENSURE(eRet == S_OK,"Error while copying an ado variant!");
216 OSL_UNUSED(eRet);
218 return *this;
221 void OLEVariant::setByte(sal_uInt8 n)
223 HRESULT eRet = VariantClear(this);
224 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
225 OSL_UNUSED(eRet);
226 vt = VT_UI1;
227 bVal = n;
229 void OLEVariant::setInt16(sal_Int16 n)
231 HRESULT eRet = VariantClear(this);
232 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
233 OSL_UNUSED(eRet);
234 vt = VT_I2;
235 iVal = n;
237 void OLEVariant::setInt32(sal_Int32 n)
239 HRESULT eRet = VariantClear(this);
240 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
241 OSL_UNUSED(eRet);
242 vt = VT_I4;
243 lVal = n;
245 void OLEVariant::setFloat(float f)
246 { HRESULT eRet = VariantClear(this);
247 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
248 OSL_UNUSED(eRet);
249 vt = VT_R4;
250 fltVal = f;
252 void OLEVariant::setDouble(double d)
254 HRESULT eRet = VariantClear(this);
255 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
256 OSL_UNUSED(eRet);
257 vt = VT_R8;
258 dblVal = d;
260 void OLEVariant::setDate(DATE d)
261 { HRESULT eRet = VariantClear(this);
262 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
263 OSL_UNUSED(eRet);
264 vt = VT_DATE;
265 date = d;
267 void OLEVariant::setChar(unsigned char a)
269 HRESULT eRet = VariantClear(this);
270 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
271 OSL_UNUSED(eRet);
272 vt = VT_UI1;
273 bVal = a;
275 void OLEVariant::setCurrency(double aCur)
277 HRESULT eRet = VariantClear(this);
278 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
279 OSL_UNUSED(eRet);
280 vt = VT_CY;
281 set(aCur*10000);
283 void OLEVariant::setBool(sal_Bool b)
285 HRESULT eRet = VariantClear(this);
286 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
287 OSL_UNUSED(eRet);
288 vt = VT_BOOL;
289 boolVal = b ? VARIANT_TRUE : VARIANT_FALSE;
291 void OLEVariant::setString(const OUString& us)
293 HRESULT eRet = VariantClear(this);
294 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
295 OSL_UNUSED(eRet);
296 vt = VT_BSTR;
297 bstrVal = ::SysAllocString(reinterpret_cast<LPCOLESTR>(us.getStr()));
299 void OLEVariant::setNoArg()
301 HRESULT eRet = VariantClear(this);
302 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
303 OSL_UNUSED(eRet);
304 vt = VT_ERROR;
305 scode = DISP_E_PARAMNOTFOUND;
308 void OLEVariant::setNull()
310 HRESULT eRet = VariantClear(this);
311 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
312 OSL_UNUSED(eRet);
313 vt = VT_NULL;
315 void OLEVariant::setEmpty()
317 HRESULT eRet = VariantClear(this);
318 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
319 OSL_UNUSED(eRet);
320 vt = VT_EMPTY;
323 void OLEVariant::setUI1SAFEARRAYPtr(SAFEARRAY* pSafeAr)
325 HRESULT eRet = VariantClear(this);
326 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
327 OSL_UNUSED(eRet);
328 vt = VT_ARRAY|VT_UI1; parray = pSafeAr;
331 void OLEVariant::setArray(SAFEARRAY* pSafeArray, VARTYPE vtType)
333 HRESULT eRet = VariantClear(this);
334 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
335 OSL_UNUSED(eRet);
336 vt = (VARTYPE)(VT_ARRAY|vtType);
337 parray = pSafeArray;
340 void OLEVariant::setIDispatch(IDispatch* pDispInterface)
342 HRESULT eRet = VariantClear(this);
343 OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!");
344 OSL_UNUSED(eRet);
346 vt = VT_DISPATCH;
347 pdispVal = pDispInterface;
349 if ( pDispInterface )
350 pDispInterface->AddRef();
354 sal_Bool OLEVariant::isNull() const { return (vt == VT_NULL); }
355 sal_Bool OLEVariant::isEmpty() const { return (vt == VT_EMPTY); }
357 VARTYPE OLEVariant::getType() const { return vt; }
359 OLEVariant::operator ::com::sun::star::util::Date() const
361 return isNull() ? ::com::sun::star::util::Date(30,12,1899) : ::dbtools::DBTypeConversion::toDate(getDate(),::com::sun::star::util::Date(30,12,1899));
363 OLEVariant::operator ::com::sun::star::util::Time() const
365 return isNull() ? ::com::sun::star::util::Time() : ::dbtools::DBTypeConversion::toTime(getDate());
367 OLEVariant::operator ::com::sun::star::util::DateTime()const
369 return isNull() ? ::com::sun::star::util::DateTime() : ::dbtools::DBTypeConversion::toDateTime(getDate(),::com::sun::star::util::Date(30,12,1899));
372 VARIANT_BOOL OLEVariant::VariantBool(sal_Bool bEinBoolean)
374 return (bEinBoolean ? VARIANT_TRUE : VARIANT_FALSE);
377 void OLEVariant::CHS()
379 cyVal.Lo ^= (sal_uInt32)-1;
380 cyVal.Hi ^= -1;
381 cyVal.Lo++;
382 if( !cyVal.Lo )
383 cyVal.Hi++;
386 void OLEVariant::set(double n)
388 if( n >= 0 )
390 cyVal.Hi = (sal_Int32)(n / (double)4294967296.0);
391 cyVal.Lo = (sal_uInt32)(n - ((double)cyVal.Hi * (double)4294967296.0));
393 else {
394 cyVal.Hi = (sal_Int32)(-n / (double)4294967296.0);
395 cyVal.Lo = (sal_uInt32)(-n - ((double)cyVal.Hi * (double)4294967296.0));
396 CHS();
400 OLEVariant::operator OUString() const
402 if (V_VT(this) == VT_BSTR)
403 return reinterpret_cast<const sal_Unicode*>(LPCOLESTR(V_BSTR(this)));
405 if(isNull())
406 return OUString();
408 OLEVariant varDest;
410 varDest.ChangeType(VT_BSTR, this);
412 return reinterpret_cast<const sal_Unicode*>(LPCOLESTR(V_BSTR(&varDest)));
416 void OLEVariant::ChangeType(VARTYPE vartype, const OLEVariant* pSrc)
419 // If pDest is NULL, convert type in place
421 if (pSrc == NULL)
422 pSrc = this;
424 if ( ( this != pSrc )
425 || ( vartype != V_VT( this ) )
428 if ( FAILED( ::VariantChangeType( static_cast< VARIANT* >( this ),
429 const_cast< VARIANT* >( static_cast< const VARIANT* >( pSrc ) ),
431 vartype ) ) )
433 ::connectivity::SharedResources aResources;
434 const OUString sError( aResources.getResourceString(STR_TYPE_NOT_CONVERT));
435 throw ::com::sun::star::sdbc::SQLException(
436 sError,
437 NULL,
438 OUString( "S1000" ),
439 1000,
440 ::com::sun::star::uno::Any()
447 OLEVariant::operator ::com::sun::star::uno::Sequence< sal_Int8 >() const
449 ::com::sun::star::uno::Sequence< sal_Int8 > aRet;
450 if(V_VT(this) == VT_BSTR)
452 OLEString sStr(V_BSTR(this));
453 aRet = ::com::sun::star::uno::Sequence<sal_Int8>(reinterpret_cast<const sal_Int8*>((const wchar_t*)sStr),sizeof(sal_Unicode)*sStr.length());
455 else if(!isNull())
457 SAFEARRAY* pArray = getUI1SAFEARRAYPtr();
459 if(pArray)
461 HRESULT hresult1,hresult2;
462 long lBound,uBound;
463 // Verify that the SafeArray is the proper shape.
464 hresult1 = ::SafeArrayGetLBound(pArray, 1, &lBound);
465 hresult2 = ::SafeArrayGetUBound(pArray, 1, &uBound);
466 if ( SUCCEEDED(hresult1) && SUCCEEDED(hresult2) )
468 long nCount = uBound-lBound+1;
469 aRet.realloc(nCount);
470 sal_Int8* pData = aRet.getArray();
471 for(long i=0; SUCCEEDED(hresult1) && lBound <= uBound ;++i,++lBound)
473 sal_Int32 nData = 0;
474 hresult1 = ::SafeArrayGetElement(pArray,&lBound,&nData);
475 if ( SUCCEEDED(hresult1) )
477 *pData = static_cast<sal_Int8>(nData);
478 ++pData;
485 return aRet;
488 OUString OLEVariant::getString() const
490 if(isNull())
491 return OUString();
492 else
493 return *this;
496 sal_Bool OLEVariant::getBool() const
498 if (V_VT(this) == VT_BOOL)
499 return V_BOOL(this) == VARIANT_TRUE ? sal_True : sal_False;
500 if(isNull())
501 return sal_False;
503 OLEVariant varDest;
505 varDest.ChangeType(VT_BOOL, this);
507 return V_BOOL(&varDest) == VARIANT_TRUE ? sal_True : sal_False;
510 IUnknown* OLEVariant::getIUnknown() const
512 if (V_VT(this) == VT_UNKNOWN)
514 return V_UNKNOWN(this);
516 if(isNull())
517 return NULL;
519 OLEVariant varDest;
521 varDest.ChangeType(VT_UNKNOWN, this);
523 V_UNKNOWN(&varDest)->AddRef();
524 return V_UNKNOWN(&varDest);
527 IDispatch* OLEVariant::getIDispatch() const
529 if (V_VT(this) == VT_DISPATCH)
531 return V_DISPATCH(this);
534 if(isNull())
535 return NULL;
537 OLEVariant varDest;
539 varDest.ChangeType(VT_DISPATCH, this);
541 V_DISPATCH(&varDest)->AddRef();
542 return V_DISPATCH(&varDest);
545 sal_uInt8 OLEVariant::getByte() const
547 if (V_VT(this) == VT_UI1)
548 return V_UI1(this);
550 if(isNull())
551 return sal_Int8(0);
552 OLEVariant varDest;
554 varDest.ChangeType(VT_UI1, this);
556 return V_UI1(&varDest);
559 sal_Int16 OLEVariant::getInt16() const
561 if (V_VT(this) == VT_I2)
562 return V_I2(this);
564 if(isNull())
565 return sal_Int16(0);
566 OLEVariant varDest;
568 varDest.ChangeType(VT_I2, this);
570 return V_I2(&varDest);
573 sal_Int8 OLEVariant::getInt8() const
575 if (V_VT(this) == VT_I1)
576 return V_I1(this);
578 if(isNull())
579 return sal_Int8(0);
581 OLEVariant varDest;
583 varDest.ChangeType(VT_I1, this);
585 return V_I1(&varDest);
588 sal_Int32 OLEVariant::getInt32() const
590 if (V_VT(this) == VT_I4)
591 return V_I4(this);
593 if(isNull())
594 return sal_Int32(0);
596 OLEVariant varDest;
598 varDest.ChangeType(VT_I4, this);
600 return V_I4(&varDest);
603 sal_uInt32 OLEVariant::getUInt32() const
605 if (V_VT(this) == VT_UI4)
606 return V_UI4(this);
608 if(isNull())
609 return sal_uInt32(0);
611 OLEVariant varDest;
613 varDest.ChangeType(VT_UI4, this);
615 return V_UI4(&varDest);
618 float OLEVariant::getFloat() const
620 if (V_VT(this) == VT_R4)
621 return V_R4(this);
623 if(isNull())
624 return float(0);
625 OLEVariant varDest;
627 varDest.ChangeType(VT_R4, this);
629 return V_R4(&varDest);
632 double OLEVariant::getDouble() const
634 if (V_VT(this) == VT_R8)
635 return V_R8(this);
637 if(isNull())
638 return double(0);
639 OLEVariant varDest;
641 varDest.ChangeType(VT_R8, this);
643 return V_R8(&varDest);
646 double OLEVariant::getDate() const
648 if (V_VT(this) == VT_DATE)
649 return V_DATE(this);
651 if(isNull())
652 return double(0);
653 OLEVariant varDest;
655 varDest.ChangeType(VT_DATE, this);
657 return V_DATE(&varDest);
660 CY OLEVariant::getCurrency() const
662 if (V_VT(this) == VT_CY)
663 return V_CY(this);
665 if(isNull())
667 CY aVar;
668 aVar.int64 = sal_Int64(0);
669 return aVar;
671 OLEVariant varDest;
673 varDest.ChangeType(VT_CY, this);
675 return V_CY(&varDest);
678 SAFEARRAY* OLEVariant::getUI1SAFEARRAYPtr() const
680 if (V_VT(this) == (VT_ARRAY|VT_UI1))
681 return V_ARRAY(this);
683 if(isNull())
684 return (0);
685 OLEVariant varDest;
687 varDest.ChangeType((VT_ARRAY|VT_UI1), this);
689 return V_ARRAY(&varDest);
692 ::com::sun::star::uno::Any OLEVariant::makeAny() const
694 ::com::sun::star::uno::Any aValue;
695 switch (V_VT(this))
697 case VT_EMPTY:
698 case VT_NULL:
699 aValue.setValue(NULL, Type());
700 break;
701 case VT_I2:
702 aValue.setValue( & iVal, cppu::UnoType<sal_Int16>::get());
703 break;
704 case VT_I4:
705 aValue.setValue( & lVal, cppu::UnoType<sal_Int32>::get());
706 break;
707 case VT_R4:
708 aValue.setValue( & fltVal, cppu::UnoType<float>::get());
709 break;
710 case VT_R8:
711 aValue.setValue(& dblVal, cppu::UnoType<double>::get());
712 break;
713 case VT_CY:
715 Currency cy(cyVal.int64);
716 aValue <<= cy;
717 break;
719 case VT_DATE:
721 aValue <<= (::com::sun::star::util::Date)*this;
722 break;
724 case VT_BSTR:
726 OUString b(reinterpret_cast<const sal_Unicode*>(bstrVal));
727 aValue.setValue( &b, getCppuType( &b));
728 break;
730 case VT_BOOL:
732 sal_Bool b= boolVal == VARIANT_TRUE;
733 aValue.setValue( &b, getCppuType( &b));
734 break;
736 case VT_I1:
737 aValue.setValue( & cVal, getCppuType((sal_Int8*)0));
738 break;
739 case VT_UI1: // there is no unsigned char in UNO
740 aValue.setValue( & bVal, getCppuType( (sal_Int8*)0));
741 break;
742 case VT_UI2:
743 aValue.setValue( & uiVal, getCppuType( (sal_uInt16*)0));
744 break;
745 case VT_UI4:
746 aValue.setValue( & ulVal, getCppuType( (sal_uInt32*)0));
747 break;
748 case VT_INT:
749 aValue.setValue( & intVal, cppu::UnoType<sal_Int32>::get());
750 break;
751 case VT_UINT:
752 aValue.setValue( & uintVal, getCppuType( (sal_uInt32*)0));
753 break;
754 case VT_VOID:
755 aValue.setValue( NULL, Type());
756 break;
757 case VT_DECIMAL:
759 Decimal dec;
760 dec.Scale = decVal.scale;
761 dec.Sign = decVal.sign;
762 dec.LowValue = decVal.Lo32;
763 dec.MiddleValue = decVal.Mid32;
764 dec.HighValue = decVal.Hi32;
765 aValue <<= dec;
766 break;
769 default:
770 break;
772 return aValue;
778 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */