From d956d87f2ec483e489476275ce4c02064d923f13 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Sep 2014 17:43:24 +0000 Subject: [PATCH] enable wxNEEDS_UTF8_FOR_TEXT_DATAOBJ flag for x11 TextDataObject, and add implementation of GetAllFormat function git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/dataobj.h | 2 +- src/x11/dataobj.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/wx/dataobj.h b/include/wx/dataobj.h index d407dd5149..2caee94243 100644 --- a/include/wx/dataobj.h +++ b/include/wx/dataobj.h @@ -322,7 +322,7 @@ private: // ---------------------------------------------------------------------------- #if wxUSE_UNICODE - #if defined(__WXGTK20__) + #if defined(__WXGTK20__) || defined(__WXX11__) #define wxNEEDS_UTF8_FOR_TEXT_DATAOBJ #elif defined(__WXMAC__) #define wxNEEDS_UTF16_FOR_TEXT_DATAOBJ diff --git a/src/x11/dataobj.cpp b/src/x11/dataobj.cpp index 06f650c652..ae09c0fde5 100644 --- a/src/x11/dataobj.cpp +++ b/src/x11/dataobj.cpp @@ -374,4 +374,14 @@ void wxBitmapDataObject::DoConvertToPng() #endif } +// ---------------------------------------------------------------------------- +// wxTextDataObject +// ---------------------------------------------------------------------------- + +void +wxTextDataObject::GetAllFormats(wxDataFormat *formats, + wxDataObjectBase::Direction WXUNUSED(dir)) const +{ + *formats++ = GetPreferredFormat(); +} #endif // wxUSE_DATAOBJ