X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/42688aea2d1703c2942e281658ca8183f728f8fa..1ae30333bc929731802800694f85e6275986cd0a:/src/richtext/richtexthtml.cpp
diff --git a/src/richtext/richtexthtml.cpp b/src/richtext/richtexthtml.cpp
index 965bbd4630..95ed0c1d4c 100644
--- a/src/richtext/richtexthtml.cpp
+++ b/src/richtext/richtexthtml.cpp
@@ -67,9 +67,10 @@ bool wxRichTextHTMLHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream&
wxTextAttrEx currentParaStyle = buffer->GetAttributes();
wxTextAttrEx currentCharStyle = buffer->GetAttributes();
- str << wxT("
\n");
+ if ((GetFlags() & wxRICHTEXT_HANDLER_NO_HEADER_FOOTER) == 0)
+ str << wxT("\n");
- str << wxT("");
+ str << wxT("\n");
str << wxString::Format(wxT(""),
currentParaStyle.GetFont().GetFaceName().c_str(), PtToSize(currentParaStyle.GetFont().GetPointSize()),
@@ -122,7 +123,12 @@ bool wxRichTextHTMLHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream&
node = node->GetNext();
}
- str << wxT(" | \n");
+ str << wxT(" |
");
+
+ if ((GetFlags() & wxRICHTEXT_HANDLER_NO_HEADER_FOOTER) == 0)
+ str << wxT("");
+
+ str << wxT("\n");
return true;
}
@@ -174,7 +180,7 @@ void wxRichTextHTMLHandler::BeginCharacterFormatting(const wxTextAttrEx& current
}
else if( m_list )
{
- // The item is not bulleted and there is a list what should be closed now.
+ // The item is not bulleted and there is a list that should be closed now.
// So close the list
str << (m_is_ul ? wxT("") : wxT(""));