X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/44cc96a80c09c8572e1315be66d29f6d610cbf78..6756186271a8394db23bc817e1aa36c27c52076a:/src/richtext/richtexthtml.cpp diff --git a/src/richtext/richtexthtml.cpp b/src/richtext/richtexthtml.cpp index 2ec15138eb..2c8694d0c7 100644 --- a/src/richtext/richtexthtml.cpp +++ b/src/richtext/richtexthtml.cpp @@ -85,8 +85,6 @@ bool wxRichTextHTMLHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& if ((GetFlags() & wxRICHTEXT_HANDLER_NO_HEADER_FOOTER) == 0) str << wxT("
\n"); - str << wxT(""); - OutputFont(currentParaStyle, str); m_font = false; @@ -131,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(); @@ -148,8 +146,6 @@ bool wxRichTextHTMLHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& str << wxT(""); - str << wxT(" |
"); - if ((GetFlags() & wxRICHTEXT_HANDLER_NO_HEADER_FOOTER) == 0) str << wxT(""); @@ -219,9 +215,7 @@ void wxRichTextHTMLHandler::BeginParagraphFormatting(const wxTextAttr& WXUNUSED( { if (thisStyle.HasPageBreak()) { - str << wxT(""); str << wxT("
\n"); - str << wxT("");
}
if (thisStyle.HasLeftIndent() && thisStyle.GetLeftIndent() != 0)
@@ -245,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; } @@ -293,9 +288,11 @@ void wxRichTextHTMLHandler::EndParagraphFormatting(const wxTextAttr& WXUNUSED(cu if (thisStyle.HasFont()) stream << wxT(""); - stream << wxT(" |