-/// Output character formatting
-void wxRichTextHTMLHandler::OutputCharacterFormatting(const wxTextAttrEx& WXUNUSED(currentStyle), const wxTextAttrEx& thisStyle, wxOutputStream& stream, bool start)
-{
- wxTextOutputStream str(stream);
-
- bool isBold = false;
- bool isItalic = false;
- bool isUnderline = false;
- wxString faceName;
-
- if (thisStyle.GetFont().Ok())
- {
- if (thisStyle.GetFont().GetWeight() == wxBOLD)
- isBold = true;
- if (thisStyle.GetFont().GetStyle() == wxITALIC)
- isItalic = true;
- if (thisStyle.GetFont().GetUnderlined())
- isUnderline = true;
-
- faceName = thisStyle.GetFont().GetFaceName();
- }
-
- if (start)
- {
- if (isBold)
- str << wxT("<b>");
- if (isItalic)
- str << wxT("<i>");
- if (isUnderline)
- str << wxT("<u>");
- }
- else
- {
- if (isUnderline)
- str << wxT("</u>");
- if (isItalic)
- str << wxT("</i>");
- if (isBold)
- str << wxT("</b>");
- }
-}
-
-/// Output paragraph formatting
-void wxRichTextHTMLHandler::OutputParagraphFormatting(const wxTextAttrEx& WXUNUSED(currentStyle), const wxTextAttrEx& thisStyle, wxOutputStream& stream, bool start)
-{
- // TODO: lists, indentation (using tables), fonts, right-align, ...
-
- wxTextOutputStream str(stream);
- bool isCentered = false;
-
- if (thisStyle.GetAlignment() == wxTEXT_ALIGNMENT_CENTRE)
- {
- isCentered = true;
- }
-
- if (start)
- {
- if (isCentered)
- str << wxT("<center>");
- }
- else
- {
- if (isCentered)
- str << wxT("</center>");
- }
-}
-