+ if (thisStyle.HasBulletStyle())
+ {
+ int indent = thisStyle.GetLeftIndent();
+
+ // Close levels high than this
+ CloseLists(indent, str);
+
+ if (m_indents.GetCount() > 0 && indent == m_indents.Last())
+ {
+ // Same level, no need to start a new list
+ }
+ else if (m_indents.GetCount() == 0 || indent > m_indents.Last())
+ {
+ m_indents.Add(indent);
+
+ wxString tag;
+ int listType = TypeOfList(thisStyle, tag);
+ m_listTypes.Add(listType);
+
+ wxString align = GetAlignment(thisStyle);
+ str << wxString::Format(wxT("<p align=\"%s\">"), align.c_str());
+
+ str << tag;
+ }
+
+ str << wxT("<li> ");
+ }
+ else
+ {
+ CloseLists(-1, str);
+
+ wxString align = GetAlignment(thisStyle);
+ str << wxString::Format(wxT("<p align=\"%s\">"), align.c_str());
+
+ // Use a table
+ int indentTenthsMM = thisStyle.GetLeftIndent() + thisStyle.GetLeftSubIndent();
+ // TODO: convert to pixels
+ int indentPixels = indentTenthsMM/4;
+ str << wxString::Format(wxT("<table border=0 cellpadding=0 cellspacing=0><tr><td width=\"%d\"></td><td>"), indentPixels);
+
+ OutputFont(thisStyle, str);
+
+ if (thisStyle.GetLeftSubIndent() < 0)
+ {
+ str << SymbolicIndent( - thisStyle.GetLeftSubIndent());
+ }
+
+ m_inTable = true;
+ }