void wxClipboard::Clear()
{
+ if ( IsUsingPrimarySelection() )
+ return;
+
#if wxUSE_OLE_CLIPBOARD
if (m_lastDataObject)
{
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;
}
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
bool wxClipboard::SetData( wxDataObject *data )
{
+ if ( IsUsingPrimarySelection() )
+ return false;
+
#if !wxUSE_OLE_CLIPBOARD
(void)wxEmptyClipboard();
#endif // wxUSE_OLE_CLIPBOARD
bool wxClipboard::AddData( wxDataObject *data )
{
+ if ( IsUsingPrimarySelection() )
+ return false;
+
wxCHECK_MSG( data, false, wxT("data is invalid") );
#if wxUSE_OLE_CLIPBOARD
bool wxClipboard::IsSupported( const wxDataFormat& format )
{
- return wxIsClipboardFormatAvailable(format);
+ return !IsUsingPrimarySelection() && wxIsClipboardFormatAvailable(format);
}
bool wxClipboard::GetData( wxDataObject& data )
{
+ if ( IsUsingPrimarySelection() )
+ return false;
+
#if wxUSE_OLE_CLIPBOARD
IDataObject *pDataObject = NULL;
HRESULT hr = OleGetClipboard(&pDataObject);