"),
+ currentParaStyle.GetFont().GetFaceName().c_str(), Pt_To_Size( currentParaStyle.GetFont().GetPointSize() ),
+ currentParaStyle.GetTextColour().GetAsString(wxC2S_HTML_SYNTAX).c_str());
+
+ //wxString align = GetAlignment( currentParaStyle.GetAlignment() );
+ //str << wxString::Format(wxT(""), align );
+
+ m_font = false;
+ m_indent = 0;
+ m_list = false;
+
wxRichTextObjectList::compatibility_iterator node = buffer->GetChildren().GetFirst();
while (node)
{
@@ -69,7 +98,9 @@ bool wxRichTextHTMLHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream&
if (para)
{
- OutputParagraphFormatting(currentParaStyle, para->GetAttributes(), stream, true);
+ wxTextAttrEx paraStyle(para->GetCombinedAttributes());
+
+ OutputParagraphFormatting(currentParaStyle, paraStyle, stream);
wxRichTextObjectList::compatibility_iterator node2 = para->GetChildren().GetFirst();
while (node2)
@@ -78,99 +109,484 @@ bool wxRichTextHTMLHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream&
wxRichTextPlainText* textObj = wxDynamicCast(obj, wxRichTextPlainText);
if (textObj && !textObj->IsEmpty())
{
- OutputCharacterFormatting(currentCharStyle, obj->GetAttributes(), stream, true);
+ wxTextAttrEx charStyle(para->GetCombinedAttributes(obj->GetAttributes()));
+ BeginCharacterFormatting(currentCharStyle, charStyle, paraStyle, stream);
str << textObj->GetText();
- OutputCharacterFormatting(currentCharStyle, obj->GetAttributes(), stream, false);
+ EndCharacterFormatting(currentCharStyle, charStyle, paraStyle, stream);
}
+ wxRichTextImage* image = wxDynamicCast(obj, wxRichTextImage);
+ if( image && !image->IsEmpty())
+ Image_to_Base64( image, stream );
+
node2 = node2->GetNext();
}
-
- OutputParagraphFormatting(currentParaStyle, para->GetAttributes(), stream, false);
-
- str << wxT("
\n");
+ str << wxT("\n");
+ //OutputParagraphFormatting(currentParaStyle, para->GetAttributes(), stream, false);
}
-
node = node->GetNext();
}
- str << wxT("\n");
+ str << wxT("