]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/dataobj.cpp
added missing extern "C" required for Sun CC
[wxWidgets.git] / src / os2 / dataobj.cpp
index 98031a0a7570dd05e7c385cd0a6a75e59004a782..b6738a028d52d91da7128ac36f3f3dfded8f07ac 100644 (file)
@@ -313,6 +313,7 @@ bool wxBitmapDataObject::SetData(
 
     memcpy(m_pngData, pBuf, m_pngSize);
 
+#if wxUSE_STREAMS
     wxMemoryInputStream             vMstream((char*)m_pngData, m_pngSize);
     wxImage                         vImage;
     wxPNGHandler                    vHandler;
@@ -322,7 +323,9 @@ bool wxBitmapDataObject::SetData(
         return FALSE;
     }
 
-    m_bitmap = vImage.ConvertToBitmap();
+    m_bitmap = wxBitmap(vImage);
+#endif //wxUSE_STREAMS
+
     return m_bitmap.Ok();
 }
 
@@ -331,7 +334,8 @@ void wxBitmapDataObject::DoConvertToPng()
     if (!m_bitmap.Ok())
         return;
 
-    wxImage                         vImage(m_bitmap);
+#if wxUSE_STREAMS
+    wxImage                         vImage = m_bitmap.ConvertToImage();
     wxPNGHandler                    vHandler;
     wxCountingOutputStream          vCount;
 
@@ -343,5 +347,6 @@ void wxBitmapDataObject::DoConvertToPng()
     wxMemoryOutputStream            vMstream((char*) m_pngData, m_pngSize);
 
     vHandler.SaveFile(&vImage, vMstream );
+#endif
 }