X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c433798e64639df7669356b55ae6de110094dcf5..f16ba4bb7ec67a12ce247d062ec14734c96aac75:/src/richtext/richtexthtml.cpp diff --git a/src/richtext/richtexthtml.cpp b/src/richtext/richtexthtml.cpp index c6bdfe9def..2c8694d0c7 100644 --- a/src/richtext/richtexthtml.cpp +++ b/src/richtext/richtexthtml.cpp @@ -129,7 +129,7 @@ bool wxRichTextHTMLHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& } wxRichTextImage* image = wxDynamicCast(obj, wxRichTextImage); - if( image && !image->IsEmpty()) + if( image && (!image->IsEmpty() || image->GetImageBlock().GetData())) WriteImage( image, stream ); node2 = node2->GetNext(); @@ -239,8 +239,9 @@ void wxRichTextHTMLHandler::BeginParagraphFormatting(const wxTextAttr& WXUNUSED( int listType = TypeOfList(thisStyle, tag); m_listTypes.Add(listType); - wxString align = GetAlignment(thisStyle); - str << wxString::Format(wxT("
"), align.c_str()); + // wxHTML needs an extra
before a list when using
...
in previous paragraphs. + // TODO: pass a flag that indicates we're using wxHTML. + str << wxT("\n"); str << tag; } @@ -290,7 +291,7 @@ void wxRichTextHTMLHandler::EndParagraphFormatting(const wxTextAttr& WXUNUSED(cu stream << wxT("
\n"); m_inTable = false; } - else + else if (!thisStyle.HasBulletStyle()) stream << wxT("\n"); }