- // does the item have an indentation ?
- if( paraStyle.GetLeftIndent() )
- {
- if (paraStyle.GetBulletStyle() == wxTEXT_ATTR_BULLET_STYLE_NONE)
- {
- if (m_indent)
- {
- if ((paraStyle.GetLeftIndent() + paraStyle.GetLeftSubIndent()) == m_indent)
- {
- if (paraStyle.GetLeftSubIndent() < 0)
- {
- str << SymbolicIndent(~paraStyle.GetLeftSubIndent());
- }
- }
- else
- {
- if (paraStyle.GetLeftIndent() + paraStyle.GetLeftSubIndent() > m_indent)
- {
- Indent(paraStyle, str);
- m_indent = paraStyle.GetLeftIndent() + paraStyle.GetLeftSubIndent();
- m_indents.Add( m_indent );
- }
- else
- {
- int i = m_indents.size() - 1;
- for (; i > -1; i--)
- {
- if (m_indent < (paraStyle.GetLeftIndent() + paraStyle.GetLeftSubIndent()))
- {
- Indent(paraStyle, str);
- m_indent = paraStyle.GetLeftIndent() + paraStyle.GetLeftSubIndent();
- m_indents.Add( m_indent );
-
- break;
- }
- else if (m_indent == (paraStyle.GetLeftIndent() + paraStyle.GetLeftSubIndent()))
- {
- if (paraStyle.GetLeftSubIndent() < 0)
- {
- str << SymbolicIndent(~paraStyle.GetLeftSubIndent());
- }
- break;
- }
- else
- {
- str << wxT("</td></tr></table>");
-
- m_indents.RemoveAt(i);
-
- if(i < 1)
- {
- m_indent=0; break;
- }
- m_indent = m_indents[i-1];
- }
- }
- }
- }
- }
- else
- {
- Indent(paraStyle, str);
- m_indent = paraStyle.GetLeftIndent() + paraStyle.GetLeftSubIndent();
- m_indents.Add( m_indent );
- }
- }
- }
- else if (m_indent)
- {
- // The item is not indented and there is a table(s) that should be closed now.
-
- for (unsigned int i = 0; i < m_indents.size(); i++)
- str << wxT("</td></tr></table>");