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:
Włodzimierz Skiba
2005-10-22 07:45:54 +00:00
parent d21423356e
commit 39a1c2f2dd

View File

@@ -3823,12 +3823,16 @@ bool wxRichTextBuffer::SaveFile(wxOutputStream& stream, int type)
bool wxRichTextBuffer::CopyToClipboard(const wxRichTextRange& range) bool wxRichTextBuffer::CopyToClipboard(const wxRichTextRange& range)
{ {
bool success = false; bool success = false;
#if wxUSE_CLIPBOARD
wxString text = GetTextForRange(range); wxString text = GetTextForRange(range);
if (!wxTheClipboard->IsOpened() && wxTheClipboard->Open()) if (!wxTheClipboard->IsOpened() && wxTheClipboard->Open())
{ {
success = wxTheClipboard->SetData(new wxTextDataObject(text)); success = wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->Close(); wxTheClipboard->Close();
} }
#else
wxUnusedVar(range);
#endif
return success; return success;
} }
@@ -3836,6 +3840,7 @@ bool wxRichTextBuffer::CopyToClipboard(const wxRichTextRange& range)
bool wxRichTextBuffer::PasteFromClipboard(long position) bool wxRichTextBuffer::PasteFromClipboard(long position)
{ {
bool success = false; bool success = false;
#if wxUSE_CLIPBOARD
if (CanPasteFromClipboard()) if (CanPasteFromClipboard())
{ {
if (wxTheClipboard->Open()) if (wxTheClipboard->Open())
@@ -3876,6 +3881,9 @@ bool wxRichTextBuffer::PasteFromClipboard(long position)
wxTheClipboard->Close(); wxTheClipboard->Close();
} }
} }
#else
wxUnusedVar(position);
#endif
return success; return success;
} }
@@ -3883,6 +3891,7 @@ bool wxRichTextBuffer::PasteFromClipboard(long position)
bool wxRichTextBuffer::CanPasteFromClipboard() const bool wxRichTextBuffer::CanPasteFromClipboard() const
{ {
bool canPaste = false; bool canPaste = false;
#if wxUSE_CLIPBOARD
if (!wxTheClipboard->IsOpened() && wxTheClipboard->Open()) if (!wxTheClipboard->IsOpened() && wxTheClipboard->Open())
{ {
if (wxTheClipboard->IsSupported(wxDF_TEXT) || wxTheClipboard->IsSupported(wxDF_BITMAP)) if (wxTheClipboard->IsSupported(wxDF_TEXT) || wxTheClipboard->IsSupported(wxDF_BITMAP))
@@ -3891,6 +3900,7 @@ bool wxRichTextBuffer::CanPasteFromClipboard() const
} }
wxTheClipboard->Close(); wxTheClipboard->Close();
} }
#endif
return canPaste; return canPaste;
} }
@@ -5203,4 +5213,3 @@ bool wxRichTextImageBlock::WriteBlock(const wxString& filename, unsigned char* b
#endif #endif
// wxUSE_RICHTEXT // wxUSE_RICHTEXT