+ wxTextDataObject data;
+ if (wxTheClipboard->IsSupported( data.GetFormat() )
+ && wxTheClipboard->GetData(data) )
+ {
+ wxTheClipboard->Close();
+ wxString text = data.GetText();
+ wxLayoutImportText( m_llist, text);
+ SetDirty();
+ RequestUpdate();
+ return;
+ }
+ }
+ // if everything failed we can still try the primary:
+ wxTheClipboard->Close();
+ if(! primary) // not tried before
+ {
+ wxTheClipboard->UsePrimarySelection();
+ if (wxTheClipboard->Open())