X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/945c909da9a8ee487da102b8806b6fd76b5f6849..2d61788423790686d1193a0d74b1562013246084:/src/richtext/richtexthtml.cpp?ds=sidebyside diff --git a/src/richtext/richtexthtml.cpp b/src/richtext/richtexthtml.cpp index 6af5ab0ae5..c5df308797 100644 --- a/src/richtext/richtexthtml.cpp +++ b/src/richtext/richtexthtml.cpp @@ -85,8 +85,7 @@ bool wxRichTextHTMLHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& customEncoding = new wxCSConv(GetEncoding()); if (!customEncoding->IsOk()) { - delete customEncoding; - customEncoding = NULL; + wxDELETE(customEncoding); } } if (customEncoding) @@ -331,8 +330,6 @@ void wxRichTextHTMLHandler::BeginParagraphFormatting(const wxTextAttr& WXUNUSED( m_inTable = true; } - OutputFont(thisStyle, str); - if (((GetFlags() & wxRICHTEXT_HANDLER_USE_CSS) == 0) && (thisStyle.GetLeftSubIndent() < 0)) { str << SymbolicIndent( - thisStyle.GetLeftSubIndent()); @@ -366,16 +363,17 @@ void wxRichTextHTMLHandler::BeginParagraphFormatting(const wxTextAttr& WXUNUSED( str << wxT(">"); } + OutputFont(thisStyle, str); } /// End paragraph formatting void wxRichTextHTMLHandler::EndParagraphFormatting(const wxTextAttr& WXUNUSED(currentStyle), const wxTextAttr& thisStyle, wxTextOutputStream& stream) { + if (thisStyle.HasFont()) + stream << wxT(""); + if (m_inTable) { - if (thisStyle.HasFont()) - stream << wxT(""); - stream << wxT("

\n"); m_inTable = false; }