implemented (more) correct <pre> handling

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2001-04-24 22:05:19 +00:00
parent 3da2715fb8
commit 1309ba6c7e
3 changed files with 139 additions and 221 deletions

View File

@@ -51,24 +51,23 @@ wxObject* wxHtmlParser::Parse(const wxString& source)
return result;
}
void wxHtmlParser::InitParser(const wxString& source)
{
m_Source = source;
m_Cache = new wxHtmlTagsCache(m_Source);
SetSource(source);
}
void wxHtmlParser::DoneParser()
{
delete m_Cache;
m_Cache = NULL;
}
void wxHtmlParser::SetSource(const wxString& src)
{
m_Source = src;
delete m_Cache;
m_Cache = new wxHtmlTagsCache(m_Source);
}
void wxHtmlParser::DoParsing(int begin_pos, int end_pos)
{
@@ -117,8 +116,6 @@ void wxHtmlParser::DoParsing(int begin_pos, int end_pos)
delete[] temp;
}
void wxHtmlParser::AddTag(const wxHtmlTag& tag)
{
wxHtmlTagHandler *h;
@@ -134,8 +131,6 @@ void wxHtmlParser::AddTag(const wxHtmlTag& tag)
}
}
void wxHtmlParser::AddTagHandler(wxHtmlTagHandler *handler)
{
wxString s(handler->GetSupportedTags());
@@ -150,8 +145,6 @@ void wxHtmlParser::AddTagHandler(wxHtmlTagHandler *handler)
handler->SetParser(this);
}
void wxHtmlParser::PushTagHandler(wxHtmlTagHandler *handler, wxString tags)
{
wxStringTokenizer tokenizer(tags, ", ");
@@ -173,8 +166,6 @@ void wxHtmlParser::PushTagHandler(wxHtmlTagHandler *handler, wxString tags)
}
}
void wxHtmlParser::PopTagHandler()
{
wxNode *first;
@@ -189,8 +180,6 @@ void wxHtmlParser::PopTagHandler()
m_HandlersStack->DeleteNode(first);
}
wxHtmlParser::~wxHtmlParser()
{
if (m_HandlersStack) delete m_HandlersStack;
@@ -199,8 +188,6 @@ wxHtmlParser::~wxHtmlParser()
m_HandlersList.Clear();
}
//-----------------------------------------------------------------------------
// wxHtmlTagHandler
//-----------------------------------------------------------------------------