/////////////////////////////////////////////////////////////////////////////
-// Name: automtn.cpp
+// Name: src/msw/ole/automtn.cpp
// Purpose: OLE automation utilities
// Author: Julian Smart
// Modified by:
}
-bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant)
+WXDLLEXPORT bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant)
{
ClearVariant(&oleVariant);
if (variant.IsNull())
oleVariant.vt = VT_DATE;
long dosDateTime = date.GetAsDOS();
- short dosDate = (dosDateTime & 0xFFFF0000) >> 16;
- short dosTime = dosDateTime & 0xFFFF;
+ short dosDate = short((dosDateTime & 0xFFFF0000) >> 16);
+ short dosTime = short(dosDateTime & 0xFFFF);
DosDateTimeToVariantTime(dosDate, dosTime, & oleVariant.date);
}
#define VT_TYPEMASK 0xfff
#endif
-bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant)
+WXDLLEXPORT bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant)
{
switch (oleVariant.vt & VT_TYPEMASK)
{
break;
case VT_I2:
+ case VT_I4:
case VT_BOOL:
case VT_R8:
case VT_ERROR: // to avoid erroring on an error return from Excel
+ case VT_EMPTY:
// no work for these types
break;
#endif
#endif // wxUSE_OLE && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) && !defined(__CYGWIN10__)
-