wxTinderbox build fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d21423356e
commit
39a1c2f2dd
@ -3823,12 +3823,16 @@ bool wxRichTextBuffer::SaveFile(wxOutputStream& stream, int type)
|
||||
bool wxRichTextBuffer::CopyToClipboard(const wxRichTextRange& range)
|
||||
{
|
||||
bool success = false;
|
||||
#if wxUSE_CLIPBOARD
|
||||
wxString text = GetTextForRange(range);
|
||||
if (!wxTheClipboard->IsOpened() && wxTheClipboard->Open())
|
||||
{
|
||||
success = wxTheClipboard->SetData(new wxTextDataObject(text));
|
||||
wxTheClipboard->Close();
|
||||
}
|
||||
#else
|
||||
wxUnusedVar(range);
|
||||
#endif
|
||||
return success;
|
||||
}
|
||||
|
||||
@ -3836,6 +3840,7 @@ bool wxRichTextBuffer::CopyToClipboard(const wxRichTextRange& range)
|
||||
bool wxRichTextBuffer::PasteFromClipboard(long position)
|
||||
{
|
||||
bool success = false;
|
||||
#if wxUSE_CLIPBOARD
|
||||
if (CanPasteFromClipboard())
|
||||
{
|
||||
if (wxTheClipboard->Open())
|
||||
@ -3876,6 +3881,9 @@ bool wxRichTextBuffer::PasteFromClipboard(long position)
|
||||
wxTheClipboard->Close();
|
||||
}
|
||||
}
|
||||
#else
|
||||
wxUnusedVar(position);
|
||||
#endif
|
||||
return success;
|
||||
}
|
||||
|
||||
@ -3883,6 +3891,7 @@ bool wxRichTextBuffer::PasteFromClipboard(long position)
|
||||
bool wxRichTextBuffer::CanPasteFromClipboard() const
|
||||
{
|
||||
bool canPaste = false;
|
||||
#if wxUSE_CLIPBOARD
|
||||
if (!wxTheClipboard->IsOpened() && wxTheClipboard->Open())
|
||||
{
|
||||
if (wxTheClipboard->IsSupported(wxDF_TEXT) || wxTheClipboard->IsSupported(wxDF_BITMAP))
|
||||
@ -3891,6 +3900,7 @@ bool wxRichTextBuffer::CanPasteFromClipboard() const
|
||||
}
|
||||
wxTheClipboard->Close();
|
||||
}
|
||||
#endif
|
||||
return canPaste;
|
||||
}
|
||||
|
||||
@ -5203,4 +5213,3 @@ bool wxRichTextImageBlock::WriteBlock(const wxString& filename, unsigned char* b
|
||||
|
||||
#endif
|
||||
// wxUSE_RICHTEXT
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user