]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextbuffer.cpp
Store menus titles in menus themselves in wxOSX.
[wxWidgets.git] / src / richtext / richtextbuffer.cpp
index 9236cda997af06e259b73a722a5a21495c0a661f..621805fd25e89d8c4b90dae42b113bea5a97b10e 100644 (file)
@@ -6535,7 +6535,11 @@ bool wxRichTextBuffer::PasteFromClipboard(long position)
                     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;
                 wxTheClipboard->GetData(data);
@@ -6599,9 +6603,12 @@ bool wxRichTextBuffer::CanPasteFromClipboard() const
 #if wxUSE_CLIPBOARD && wxUSE_DATAOBJ
     if (!wxTheClipboard->IsOpened() && wxTheClipboard->Open())
     {
-        if (wxTheClipboard->IsSupported(wxDF_TEXT) || wxTheClipboard->IsSupported(wxDF_UNICODETEXT) ||
-            wxTheClipboard->IsSupported(wxDataFormat(wxRichTextBufferDataObject::GetRichTextBufferFormatId())) ||
-            wxTheClipboard->IsSupported(wxDF_BITMAP))
+        if (wxTheClipboard->IsSupported(wxDF_TEXT)
+#if wxUSE_UNICODE
+                || wxTheClipboard->IsSupported(wxDF_UNICODETEXT)
+#endif // wxUSE_UNICODE
+                || wxTheClipboard->IsSupported(wxDataFormat(wxRichTextBufferDataObject::GetRichTextBufferFormatId()))
+                || wxTheClipboard->IsSupported(wxDF_BITMAP))
         {
             canPaste = true;
         }
@@ -7837,7 +7844,7 @@ bool wxRichTextImageBlock::DoMakeImageBlock(const wxImage& image, wxBitmapType i
 
     unsigned char* block = new unsigned char[memStream.GetSize()];
     if (!block)
-        return NULL;
+        return false;
 
     if (m_data)
         delete[] m_data;