X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..e3dbf5934e997729c6f4f5154b1b7f29d5d22149:/src/msw/ole/automtn.cpp diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index 9ea5f213aa..ac4e48776d 100644 --- a/src/msw/ole/automtn.cpp +++ b/src/msw/ole/automtn.cpp @@ -24,7 +24,7 @@ // Watcom C++ gives a linker error if this is compiled in. // With Borland C++, all samples crash if this is compiled in. -#if !defined(__WATCOMC__) && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) +#if wxUSE_OLE &&!defined(__WATCOMC__) && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) && !defined(__CYGWIN10__) #include "wx/log.h" #include "wx/msw/ole/automtn.h" @@ -85,9 +85,11 @@ static wxString ConvertStringFromOle(BSTR bStr); static int rgMonthDays[13] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}; +#if wxUSE_TIMEDATE static BOOL OleDateFromTm(WORD wYear, WORD wMonth, WORD wDay, WORD wHour, WORD wMinute, WORD wSecond, DATE& dtDest); static BOOL TmFromOleDate(DATE dtSrc, struct tm& tmDest); +#endif // wxUSE_TIMEDATE static void ClearVariant(VARIANTARG *pvarg) ; static void ReleaseVariant(VARIANTARG *pvarg) ; @@ -435,13 +437,9 @@ WXIDISPATCH* wxAutomationObject::GetDispatchProperty(const wxString& property, i { return (WXIDISPATCH*) retVariant.GetVoidPtr(); } - else - { - return (WXIDISPATCH*) NULL; - } } - else - return (WXIDISPATCH*) NULL; + + return (WXIDISPATCH*) NULL; } // A way of initialising another wxAutomationObject with a dispatch object