X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d2d0adc7765dfe904f0f7e97d85a2638c934a7d6..1934a64e10df502a7930e97767e213e235fe551b:/src/richtext/richtexthtml.cpp diff --git a/src/richtext/richtexthtml.cpp b/src/richtext/richtexthtml.cpp index eaf0343aea..965bbd4630 100644 --- a/src/richtext/richtexthtml.cpp +++ b/src/richtext/richtexthtml.cpp @@ -100,8 +100,13 @@ bool wxRichTextHTMLHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& { wxTextAttrEx charStyle(para->GetCombinedAttributes(obj->GetAttributes())); BeginCharacterFormatting(currentCharStyle, charStyle, paraStyle, stream); + + wxString text = textObj->GetText(); - str << textObj->GetText(); + if (charStyle.HasTextEffects() && (charStyle.GetTextEffects() & wxTEXT_ATTR_EFFECT_CAPITALS)) + text.MakeUpper(); + + str << text; EndCharacterFormatting(currentCharStyle, charStyle, paraStyle, stream); } @@ -321,6 +326,12 @@ void wxRichTextHTMLHandler::OutputParagraphFormatting(const wxTextAttrEx& WXUNUS wxString align = GetAlignment(thisStyle); str << wxString::Format(wxT("
"), align.c_str()); } + + if (thisStyle.HasPageBreak()) + { + wxTextOutputStream str(stream); + str << wxT("
\n"); + } } void wxRichTextHTMLHandler::NavigateToListPosition(const wxTextAttrEx& thisStyle, wxTextOutputStream& str) @@ -520,7 +531,7 @@ void wxRichTextHTMLHandler::WriteImage(wxRichTextImage* image, wxOutputStream& s tempDir = wxFileName::GetTempDir(); wxString ext(image->GetImageBlock().GetExtension()); - wxString tempFilename(wxString::Format(wxT("%s/image%d.%s"), tempDir, sm_fileCounter, (const wxChar*) ext)); + wxString tempFilename(wxString::Format(wxT("%s/image%d.%s"), (const wxChar*) tempDir, sm_fileCounter, (const wxChar*) ext)); image->GetImageBlock().Write(tempFilename); m_imageLocations.Add(tempFilename);