X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..830efc9b0cb87eae22d4435af7858175017522ab:/samples/oleauto/oleauto.cpp diff --git a/samples/oleauto/oleauto.cpp b/samples/oleauto/oleauto.cpp index d50c7ecd4b..1c745b8519 100644 --- a/samples/oleauto/oleauto.cpp +++ b/samples/oleauto/oleauto.cpp @@ -48,7 +48,7 @@ // ressources // ---------------------------------------------------------------------------- // the application icon -#if defined(__WXGTK__) || defined(__WXMOTIF__) +#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) #include "mondrian.xpm" #endif @@ -201,26 +201,26 @@ void MyFrame::OnTest(wxCommandEvent& WXUNUSED(event)) { wxMessageBox("Please ensure Excel is running, then press OK.\nThe active cell should then say 'wxWindows automation test!' in bold."); - wxAutomationObject excelObject, rangeObject; - if (!excelObject.GetInstance("Excel.Application")) - { + wxAutomationObject excelObject, rangeObject; + if (!excelObject.GetInstance("Excel.Application")) + { if (!excelObject.CreateInstance("Excel.Application")) { - wxMessageBox("Could not create Excel object."); - return; + wxMessageBox("Could not create Excel object."); + return; } - } - if (!excelObject.PutProperty("ActiveCell.Value", "wxWindows automation test!")) - { - wxMessageBox("Could not set active cell value."); - return; - } + } + if (!excelObject.PutProperty("ActiveCell.Value", "wxWindows automation test!")) + { + wxMessageBox("Could not set active cell value."); + return; + } #ifdef HAVE_BOOL - if (!excelObject.PutProperty("ActiveCell.Font.Bold", wxVariant((bool) TRUE)) ) - { - wxMessageBox("Could not put Bold property to active cell."); - return; - } + if (!excelObject.PutProperty("ActiveCell.Font.Bold", wxVariant((bool) TRUE)) ) + { + wxMessageBox("Could not put Bold property to active cell."); + return; + } #endif }