- break;
- }
- case VT_R8:
- {
- variant = oleVariant.dblVal;
- break;
- }
- case VT_ARRAY:
- {
- variant.ClearList();
-
- int cDims, cElements, i;
- VARIANTARG* pvdata;
-
- // Iterate the dimensions: number of elements is x*y*z
- for (cDims = 0, cElements = 1;
- cDims < oleVariant.parray->cDims; cDims ++)
- cElements *= oleVariant.parray->rgsabound[cDims].cElements;
-
- // Get a pointer to the data
- HRESULT hr = SafeArrayAccessData(oleVariant.parray, (void HUGEP* FAR*) & pvdata);
- if (hr != NOERROR)
- return false;
- // Iterate the data.
- for (i = 0; i < cElements; i++)
- {
- VARIANTARG& oleElement = pvdata[i];
- wxVariant vElement;
- if (!wxConvertOleToVariant(oleElement, vElement))
+ break;
+ }
+ case VT_R8:
+ {
+ variant = oleVariant.dblVal;
+ break;
+ }
+ case VT_DISPATCH:
+ {
+ variant = (void*) oleVariant.pdispVal;
+ break;
+ }
+ case VT_NULL:
+ {
+ variant.MakeNull();
+ break;
+ }
+ case VT_EMPTY:
+ {
+ break; // Ignore Empty Variant, used only during destruction of objects
+ }
+ default:
+ {
+ wxLogError(wxT("wxAutomationObject::ConvertOleToVariant: Unknown variant value type %X -> %X"),oleVariant.vt,oleVariant.vt&VT_TYPEMASK);