X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/04dbb6467be8f564f380bd9a1106fbdecbd26a98..785f5eaa05195f5e44a974861864324667a3326e:/src/html/m_dflist.cpp diff --git a/src/html/m_dflist.cpp b/src/html/m_dflist.cpp index b6ec386043..e158936b78 100644 --- a/src/html/m_dflist.cpp +++ b/src/html/m_dflist.cpp @@ -7,7 +7,7 @@ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation #endif @@ -17,7 +17,7 @@ #include "wx/defs.h" #if wxUSE_HTML && wxUSE_STREAMS -#ifdef __BORDLANDC__ +#ifdef __BORLANDC__ #pragma hdrstop #endif @@ -34,7 +34,9 @@ FORCE_LINK_ME(m_dflist) -TAG_HANDLER_BEGIN(DEFLIST, "DL,DT,DD") +TAG_HANDLER_BEGIN(DEFLIST, "DL,DT,DD" ) + + TAG_HANDLER_CONSTR(DEFLIST) { } TAG_HANDLER_PROC(tag) { @@ -43,7 +45,7 @@ TAG_HANDLER_BEGIN(DEFLIST, "DL,DT,DD") if (tag.GetName() == wxT("DL")) { - if (m_WParser->GetContainer()->GetFirstCell() != NULL) + if (m_WParser->GetContainer()->GetFirstChild() != NULL) { m_WParser->CloseContainer(); m_WParser->OpenContainer(); @@ -52,7 +54,7 @@ TAG_HANDLER_BEGIN(DEFLIST, "DL,DT,DD") ParseInner(tag); - if (m_WParser->GetContainer()->GetFirstCell() != NULL) + if (m_WParser->GetContainer()->GetFirstChild() != NULL) { m_WParser->CloseContainer(); m_WParser->OpenContainer(); @@ -63,24 +65,19 @@ TAG_HANDLER_BEGIN(DEFLIST, "DL,DT,DD") } else if (tag.GetName() == wxT("DT")) { - if (!tag.IsEnding()) - { - m_WParser->CloseContainer(); - c = m_WParser->OpenContainer(); - c->SetAlignHor(wxHTML_ALIGN_LEFT); - c->SetMinHeight(m_WParser->GetCharHeight()); - } + m_WParser->CloseContainer(); + c = m_WParser->OpenContainer(); + c->SetAlignHor(wxHTML_ALIGN_LEFT); + c->SetMinHeight(m_WParser->GetCharHeight()); return FALSE; } - else if (!tag.IsEnding()) // "DD" + else // "DD" { m_WParser->CloseContainer(); c = m_WParser->OpenContainer(); c->SetIndent(5 * m_WParser->GetCharWidth(), wxHTML_INDENT_LEFT); return FALSE; } - - else return FALSE; } TAG_HANDLER_END(DEFLIST)