]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_list.cpp
renamed Number method (should be GetCount)
[wxWidgets.git] / src / html / m_list.cpp
index ba6571362bba0f3eca61f8c298398d7508845bb8..c7d7aca7ead4cd2fcb5dc2bb8c314a467cf0db2d 100644 (file)
@@ -87,34 +87,32 @@ TAG_HANDLER_BEGIN(OLULLI, "OL,UL,LI")
         // List Item:
         if (tag.GetName() == wxT("LI"))
         {
-            if (!tag.IsEnding())
+            m_WParser->GetContainer()->SetIndent(0, wxHTML_INDENT_TOP);
+                // this is to prevent indetation in <li><p> case
+            m_WParser->CloseContainer();
+            m_WParser->CloseContainer();
+
+            c = m_WParser->OpenContainer();
+            c->SetWidthFloat(2 * m_WParser->GetCharWidth(), wxHTML_UNITS_PIXELS);
+            c->SetAlignHor(wxHTML_ALIGN_RIGHT);
+            if (m_Numbering == 0)
+                c->InsertCell(new wxHtmlListmarkCell(m_WParser->GetDC(), m_WParser->GetActualColor()));
+            else
             {
-                m_WParser->GetContainer()->SetIndent(0, wxHTML_INDENT_TOP);
-                    // this is to prevent indetation in <li><p> case
-                m_WParser->CloseContainer();
-                m_WParser->CloseContainer();
+                wxString mark;
+                mark.Printf(wxT("%i."), m_Numbering);
+                c->InsertCell(new wxHtmlWordCell(mark, *(m_WParser->GetDC())));
+            }
+            m_WParser->CloseContainer();
 
-                c = m_WParser->OpenContainer();
-                c->SetWidthFloat(2 * m_WParser->GetCharWidth(), wxHTML_UNITS_PIXELS);
-                c->SetAlignHor(wxHTML_ALIGN_RIGHT);
-                if (m_Numbering == 0)
-                    c->InsertCell(new wxHtmlListmarkCell(m_WParser->GetDC(), m_WParser->GetActualColor()));
-                else
-                {
-                    wxString mark;
-                    mark.Printf(wxT("%i."), m_Numbering);
-                    c->InsertCell(new wxHtmlWordCell(mark, *(m_WParser->GetDC())));
-                }
-                m_WParser->CloseContainer();
+            c = m_WParser->OpenContainer();
+            c->SetIndent(m_WParser->GetCharWidth() / 4, wxHTML_INDENT_LEFT);
+            c->SetWidthFloat(-2 * m_WParser->GetCharWidth(), wxHTML_UNITS_PIXELS);
 
-                c = m_WParser->OpenContainer();
-                c->SetIndent(m_WParser->GetCharWidth() / 4, wxHTML_INDENT_LEFT);
-                c->SetWidthFloat(-2 * m_WParser->GetCharWidth(), wxHTML_UNITS_PIXELS);
+            m_WParser->OpenContainer();
 
-                m_WParser->OpenContainer();
+            if (m_Numbering != 0) m_Numbering++;
 
-                if (m_Numbering != 0) m_Numbering++;
-            }
             return FALSE;
         }