]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ole/automtn.cpp
Reverted semicolons patch
[wxWidgets.git] / src / msw / ole / automtn.cpp
index e4114afd26af826aa3d3750b8cc40c688490094b..3f82d5965348ab69aaa5d8f65aa59c380df011c6 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "automtn.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -31,8 +27,7 @@
 #include "wx/msw/private.h"
 #include "wx/msw/ole/oleutils.h"
 #include "wx/msw/ole/automtn.h"
-
-#include <math.h>
+#include "wx/math.h"
 
 #ifdef __WXWINCE__
 #include "wx/msw/wince/time.h"
@@ -200,7 +195,7 @@ bool wxAutomationObject::Invoke(const wxString& member, int action,
     excep.pfnDeferredFillIn = NULL;
 
     hr = ((IDispatch*)m_dispatchPtr)->Invoke(dispIds[0], IID_NULL, LOCALE_SYSTEM_DEFAULT,
-                        action, &dispparams, vReturnPtr, &excep, &uiArgErr);
+                        (WORD)action, &dispparams, vReturnPtr, &excep, &uiArgErr);
 
     for (i = 0; i < namedArgStringCount; i++)
     {
@@ -617,7 +612,7 @@ bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant)
         wxDateTime date( variant.GetDateTime() );
         oleVariant.vt = VT_DATE;
 
-        if (!OleDateFromTm(date.GetYear(), date.GetMonth(), date.GetDay(),
+        if (!OleDateFromTm((WORD)date.GetYear(), date.GetMonth(), date.GetDay(),
                 date.GetHour(), date.GetMinute(), date.GetSecond(), oleVariant.date))
             return false;
     }
@@ -702,7 +697,12 @@ bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant)
             if (!TmFromOleDate(oleVariant.date, tmTemp))
                 return false;
 
-            wxDateTime date(tmTemp.tm_yday, (wxDateTime::Month) tmTemp.tm_mon, tmTemp.tm_year, tmTemp.tm_hour, tmTemp.tm_min, tmTemp.tm_sec);
+            wxDateTime date((wxDateTime::wxDateTime_t) tmTemp.tm_yday,
+                            (wxDateTime::Month) tmTemp.tm_mon,
+                            tmTemp.tm_year,
+                            (wxDateTime::wxDateTime_t) tmTemp.tm_hour,
+                            (wxDateTime::wxDateTime_t) tmTemp.tm_min,
+                            (wxDateTime::wxDateTime_t) tmTemp.tm_sec);
 
             variant = date;
 #endif
@@ -1108,7 +1108,7 @@ static void ReleaseVariant(VARIANTARG *pvarg)
     VARIANTARG _huge *pvargArray;
     long lLBound, lUBound, l;
 
-    vt = pvarg->vt & 0xfff;        // mask off flags
+    vt = (VARTYPE)(pvarg->vt & 0xfff);        // mask off flags
 
     // check if an array.  If so, free its contents, then the array itself.
     if (V_ISARRAY(pvarg))
@@ -1227,7 +1227,7 @@ void ShowException(LPOLESTR szMember, HRESULT hr, EXCEPINFO *pexcep, unsigned in
             break;
 
         default:
-            wsprintf(szBuf, L"%s: Unknown error occured.", szMember);
+            wsprintf(szBuf, L"%s: Unknown error occurred.", szMember);
             break;
     }