]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/clipbrd.cpp
fixed LastRead() after Read(wxOutputStream&) (patch 1658301)
[wxWidgets.git] / src / msw / clipbrd.cpp
index 23cd2cce07fc0e570f52d25c809b94d64a23f6ff..4a1518b0ff247fe687f53a67f20627cde559030b 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        clipbrd.cpp
+// Name:        src/msw/clipbrd.cpp
 // Purpose:     Clipboard functionality
 // Author:      Julian Smart
 // Modified by:
@@ -26,6 +26,8 @@
 
 #if wxUSE_CLIPBOARD
 
+#include "wx/clipbrd.h"
+
 #ifndef WX_PRECOMP
     #include "wx/object.h"
     #include "wx/event.h"
     #include "wx/bitmap.h"
     #include "wx/utils.h"
     #include "wx/intl.h"
+    #include "wx/log.h"
+    #include "wx/dataobj.h"
 #endif
 
 #if wxUSE_METAFILE
     #include "wx/metafile.h"
 #endif
 
-#include "wx/log.h"
-#include "wx/clipbrd.h"
 
 #include <string.h>
 
 // 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
@@ -557,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;
     }
@@ -578,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
@@ -931,4 +929,3 @@ bool wxClipboard::GetData( wxDataObject& data )
 }
 
 #endif // wxUSE_CLIPBOARD
-