/////////////////////////////////////////////////////////////////////////////
-// Name: src/mac/carbon/clipbrd.cpp
+// Name: src/osx/carbon/clipbrd.cpp
// Purpose: Clipboard functionality
// Author: Stefan Csomor;
// Generalized clipboard implementation by Matthew Flatt
#include "wx/metafile.h"
-#include "wx/osx/uma.h"
+#include "wx/osx/private.h"
#define wxUSE_DATAOBJ 1
// the trace mask we use with wxLogTrace() - call
// wxLog::AddTraceMask(TRACE_CLIPBOARD) to enable the trace messages from here
// (there will be a *lot* of them!)
-#define TRACE_CLIPBOARD _T("clipboard")
+#define TRACE_CLIPBOARD wxT("clipboard")
IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject)
void wxClipboard::Clear()
{
- if (m_data != NULL)
- {
- delete m_data;
- m_data = NULL;
- }
+ wxDELETE(m_data);
+
+ wxCHECK_RET( m_pasteboard, "Clipboard creation failed." );
OSStatus err = PasteboardClear( m_pasteboard );
if (err != noErr)
// Get rid of cached object.
// If this is not done, copying data from
// another application will only work once
- if (m_data)
- {
- delete m_data;
- m_data = (wxDataObject*) NULL;
- }
+ wxDELETE(m_data);
}
bool wxClipboard::IsSupported( const wxDataFormat &dataFormat )