]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtexthtml.cpp
Fix typo with adding wxNO_BORDER to the native control.
[wxWidgets.git] / src / richtext / richtexthtml.cpp
index eaf0343aeab6c7d6fda3a2223d4801fb12b0b642..965bbd4630618ca49521b674cbc9655c1449a115 100644 (file)
@@ -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("<p align=\"%s\">"), align.c_str());
     }
+    
+    if (thisStyle.HasPageBreak())
+    {
+        wxTextOutputStream str(stream);
+        str << wxT("<div style=\"page-break-after:always\"></div>\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);