"),
+ 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 +99,7 @@ bool wxRichTextHTMLHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream&
if (para)
{
- OutputParagraphFormatting(currentParaStyle, para->GetAttributes(), stream, true);
+ OutputParagraphFormatting(currentParaStyle, para->GetAttributes(), stream);
wxRichTextObjectList::compatibility_iterator node2 = para->GetChildren().GetFirst();
while (node2)
@@ -78,99 +108,483 @@ bool wxRichTextHTMLHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream&
wxRichTextPlainText* textObj = wxDynamicCast(obj, wxRichTextPlainText);
if (textObj && !textObj->IsEmpty())
{
- OutputCharacterFormatting(currentCharStyle, obj->GetAttributes(), stream, true);
+ BeginCharacterFormatting(currentCharStyle, obj->GetAttributes(), stream);
str << textObj->GetText();
- OutputCharacterFormatting(currentCharStyle, obj->GetAttributes(), stream, false);
+ EndCharacterFormatting(currentCharStyle, obj->GetAttributes(), 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("