X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fbfbfb0bf19e11ec98c2c1002cd561f16bc0b72..b404a8f3b072129c107c6d9a5e0f6f53cd34807b:/src/msw/ole/oleutils.cpp diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp index 2b10b4ae04..c992ce0af5 100644 --- a/src/msw/ole/oleutils.cpp +++ b/src/msw/ole/oleutils.cpp @@ -148,14 +148,11 @@ WXDLLEXPORT bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& ole oleVariant.vt = VT_I4; oleVariant.lVal = variant.GetLong() ; } - // cVal not always present -#ifndef __GNUWIN32__ else if (type == wxT("char")) { oleVariant.vt=VT_I1; // Signed Char oleVariant.cVal=variant.GetChar(); } -#endif else if (type == wxT("double")) { oleVariant.vt = VT_R8; @@ -164,12 +161,7 @@ WXDLLEXPORT bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& ole else if (type == wxT("bool")) { oleVariant.vt = VT_BOOL; - // 'bool' required for VC++ 4 apparently -#if (defined(__VISUALC__) && (__VISUALC__ <= 1000)) - oleVariant.bool = variant.GetBool(); -#else - oleVariant.boolVal = variant.GetBool(); -#endif + oleVariant.boolVal = variant.GetBool() ? VARIANT_TRUE : VARIANT_FALSE; } else if (type == wxT("string")) { @@ -370,6 +362,10 @@ wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant) variant = oleVariant.boolVal != 0; break; + case VT_R4: + variant = oleVariant.fltVal; + break; + case VT_R8: variant = oleVariant.dblVal; break;