X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/94113cc55572d23b2c86b9140543d32858c1eee6..7d4f65e3939402a406be6669d2a71a3d7773c9a2:/src/msw/ole/automtn.cpp?ds=inline diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index 2a64cb87c1..6096c4cf78 100644 --- a/src/msw/ole/automtn.cpp +++ b/src/msw/ole/automtn.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: automtn.cpp +// Name: src/msw/ole/automtn.cpp // Purpose: OLE automation utilities // Author: Julian Smart // Modified by: @@ -544,7 +544,7 @@ bool wxAutomationObject::CreateInstance(const wxString& classId) const } -bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant) +WXDLLEXPORT bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant) { ClearVariant(&oleVariant); if (variant.IsNull()) @@ -597,8 +597,8 @@ bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant) 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); } @@ -666,7 +666,7 @@ bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant) #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) { @@ -851,9 +851,11 @@ static void ReleaseVariant(VARIANTARG *pvarg) 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; @@ -930,4 +932,3 @@ void ShowException(LPOLESTR szMember, HRESULT hr, EXCEPINFO *pexcep, unsigned in #endif #endif // wxUSE_OLE && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) && !defined(__CYGWIN10__) -