Don't check for wxDF_UNICODETEXT support in ANSI builds.
wxDF_UNICODETEXT clipboard format can't be even constructed without provoking an assert in ANSI build of wxGTK, so avoid using it, we don't support it anyhow. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -6535,7 +6535,11 @@ bool wxRichTextBuffer::PasteFromClipboard(long position)
|
|||||||
delete richTextBuffer;
|
delete richTextBuffer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (wxTheClipboard->IsSupported(wxDF_TEXT) || wxTheClipboard->IsSupported(wxDF_UNICODETEXT))
|
else if (wxTheClipboard->IsSupported(wxDF_TEXT)
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
|| wxTheClipboard->IsSupported(wxDF_UNICODETEXT)
|
||||||
|
#endif // wxUSE_UNICODE
|
||||||
|
)
|
||||||
{
|
{
|
||||||
wxTextDataObject data;
|
wxTextDataObject data;
|
||||||
wxTheClipboard->GetData(data);
|
wxTheClipboard->GetData(data);
|
||||||
@@ -6599,9 +6603,12 @@ bool wxRichTextBuffer::CanPasteFromClipboard() const
|
|||||||
#if wxUSE_CLIPBOARD && wxUSE_DATAOBJ
|
#if wxUSE_CLIPBOARD && wxUSE_DATAOBJ
|
||||||
if (!wxTheClipboard->IsOpened() && wxTheClipboard->Open())
|
if (!wxTheClipboard->IsOpened() && wxTheClipboard->Open())
|
||||||
{
|
{
|
||||||
if (wxTheClipboard->IsSupported(wxDF_TEXT) || wxTheClipboard->IsSupported(wxDF_UNICODETEXT) ||
|
if (wxTheClipboard->IsSupported(wxDF_TEXT)
|
||||||
wxTheClipboard->IsSupported(wxDataFormat(wxRichTextBufferDataObject::GetRichTextBufferFormatId())) ||
|
#if wxUSE_UNICODE
|
||||||
wxTheClipboard->IsSupported(wxDF_BITMAP))
|
|| wxTheClipboard->IsSupported(wxDF_UNICODETEXT)
|
||||||
|
#endif // wxUSE_UNICODE
|
||||||
|
|| wxTheClipboard->IsSupported(wxDataFormat(wxRichTextBufferDataObject::GetRichTextBufferFormatId()))
|
||||||
|
|| wxTheClipboard->IsSupported(wxDF_BITMAP))
|
||||||
{
|
{
|
||||||
canPaste = true;
|
canPaste = true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user