diff options
Diffstat (limited to 'WebCore/platform/wx/PasteboardWx.cpp')
-rw-r--r-- | WebCore/platform/wx/PasteboardWx.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/WebCore/platform/wx/PasteboardWx.cpp b/WebCore/platform/wx/PasteboardWx.cpp index 3b71e9a..67697de 100644 --- a/WebCore/platform/wx/PasteboardWx.cpp +++ b/WebCore/platform/wx/PasteboardWx.cpp @@ -31,6 +31,7 @@ #include "Frame.h" #include "KURL.h" #include "markup.h" +#include "NotImplemented.h" #include "PlatformString.h" #include <wx/defs.h> @@ -53,27 +54,39 @@ void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete, { if (wxTheClipboard->Open()) { - String text = frame->selectedText(); - text.replace('\\', frame->backslashAsCurrencySymbol()); - - wxTheClipboard->SetData( new wxTextDataObject(text) ); + wxTheClipboard->SetData( new wxTextDataObject(frame->selectedText()) ); wxTheClipboard->Close(); } } bool Pasteboard::canSmartReplace() { + notImplemented(); return false; } String Pasteboard::plainText(Frame* frame) { + notImplemented(); return String(); } PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefPtr<Range> context, bool allowPlainText, bool& chosePlainText) { + RefPtr<DocumentFragment> fragment = 0; + if (wxTheClipboard->Open()) { + if (allowPlainText && wxTheClipboard->IsSupported( wxDF_TEXT )) { + wxTextDataObject data; + wxTheClipboard->GetData( data ); + chosePlainText = true; + fragment = createFragmentFromText(context.get(), data.GetText()); + } + wxTheClipboard->Close(); + } + if (fragment) + return fragment.release(); + return 0; } @@ -93,6 +106,7 @@ void Pasteboard::clear() void Pasteboard::writeImage(Node*, const KURL&, const String& title) { + notImplemented(); } } |