]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/clipbrd.cpp
Minor parts from FM's wxDataViewCtrl patch.
[wxWidgets.git] / src / msw / clipbrd.cpp
index 59d6f2fcb0dc75c1afe34c553c69ccf7b0411ce4..4a1518b0ff247fe687f53a67f20627cde559030b 100644 (file)
@@ -37,6 +37,7 @@
     #include "wx/utils.h"
     #include "wx/intl.h"
     #include "wx/log.h"
+    #include "wx/dataobj.h"
 #endif
 
 #if wxUSE_METAFILE
 // the functions using wxDataObject in wxClipboard
 //#define wxUSE_DATAOBJ wxUSE_DRAG_AND_DROP
 
-#if wxUSE_DATAOBJ
-    #include "wx/dataobj.h"
-#endif
-
 #if wxUSE_OLE && !defined(__WXWINCE__)
     // use OLE clipboard
     #define wxUSE_OLE_CLIPBOARD 1
@@ -558,10 +555,10 @@ void wxClipboard::Clear()
         if (S_OK == hr)
         {
             hr = OleSetClipboard(NULL);
-    if ( FAILED(hr) )
-    {
-        wxLogApiError(wxT("OleSetClipboard(NULL)"), hr);
-    }
+            if ( FAILED(hr) )
+            {
+                wxLogApiError(wxT("OleSetClipboard(NULL)"), hr);
+            }
         }
         m_lastDataObject = NULL;
     }
@@ -579,14 +576,14 @@ bool wxClipboard::Flush()
         if (S_OK == hr)
         {
             hr = OleFlushClipboard();
-    if ( FAILED(hr) )
-    {
-        wxLogApiError(wxT("OleFlushClipboard"), hr);
+            if ( FAILED(hr) )
+            {
+                wxLogApiError(wxT("OleFlushClipboard"), hr);
 
-        return false;
-    }
-        return true;
-    }
+                return false;
+            }
+            return true;
+        }
     }
     return false;
 #else // !wxUSE_OLE_CLIPBOARD