Make an image block beore writing it, if there's no data in the block
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -122,6 +122,7 @@ bool wxRichTextHTMLHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream&
|
||||
|
||||
node2 = node2->GetNext();
|
||||
}
|
||||
str << wxT("\n");
|
||||
//OutputParagraphFormatting(currentParaStyle, para->GetAttributes(), stream, false);
|
||||
}
|
||||
node = node->GetNext();
|
||||
@@ -486,6 +487,9 @@ void wxRichTextHTMLHandler::Image_to_Base64(wxRichTextImage* image, wxOutputStre
|
||||
str << GetMimeType(image->GetImageBlock().GetImageType());
|
||||
str << wxT(";base64,");
|
||||
|
||||
if (image->GetImage().Ok() && !image->GetImageBlock().GetData())
|
||||
image->MakeBlock();
|
||||
|
||||
wxChar* data = b64enc( image->GetImageBlock().GetData(), image->GetImageBlock().GetDataSize() );
|
||||
str << data;
|
||||
|
||||
|
Reference in New Issue
Block a user