X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/44cc96a80c09c8572e1315be66d29f6d610cbf78..03f3617bf36573a7c368614191444364267ed718:/src/richtext/richtexthtml.cpp diff --git a/src/richtext/richtexthtml.cpp b/src/richtext/richtexthtml.cpp index 2ec15138eb..301065a91e 100644 --- a/src/richtext/richtexthtml.cpp +++ b/src/richtext/richtexthtml.cpp @@ -53,7 +53,7 @@ wxRichTextHTMLHandler::wxRichTextHTMLHandler(const wxString& name, const wxStrin bool wxRichTextHTMLHandler::CanHandle(const wxString& filename) const { wxString path, file, ext; - wxSplitPath(filename, & path, & file, & ext); + wxFileName::SplitPath(filename, & path, & file, & ext); return (ext.Lower() == wxT("html") || ext.Lower() == wxT("htm")); } @@ -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(" |