X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/69941f05864fa8b37856ccc1338124bfac756a2b..60869eaf7e74b44ffd3ab9433541b8927fdd042e:/src/html/m_hline.cpp?ds=inline diff --git a/src/html/m_hline.cpp b/src/html/m_hline.cpp index 76130b09d3..3eee42e318 100644 --- a/src/html/m_hline.cpp +++ b/src/html/m_hline.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: mod_hline.cpp +// Name: m_hline.cpp // Purpose: wxHtml module for horizontal line (HR tag) // Author: Vaclav Slavik // RCS-ID: $Id$ @@ -11,17 +11,17 @@ #pragma implementation #endif -#include +#include "wx/wxprec.h" #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop #endif #ifndef WXPRECOMP -#include +#include "wx/wx.h" #endif @@ -31,7 +31,7 @@ #include "wx/html/htmlcell.h" -FORCE_LINK_ME(mod_hline) +FORCE_LINK_ME(m_hline) //----------------------------------------------------------------------------- @@ -43,7 +43,7 @@ class wxHtmlLineCell : public wxHtmlCell public: wxHtmlLineCell(int size) : wxHtmlCell() {m_Height = size;} void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2); - void Layout(int w) {m_Width = w; if (m_Next) m_Next -> Layout(w);} + void Layout(int w) {m_Width = w; if (m_Next) m_Next->Layout(w);} }; @@ -72,19 +72,19 @@ TAG_HANDLER_BEGIN(HR, "HR") wxHtmlContainerCell *c; int sz; - m_WParser -> CloseContainer(); - c = m_WParser -> OpenContainer(); + m_WParser->CloseContainer(); + c = m_WParser->OpenContainer(); - c -> SetIndent(m_WParser -> GetCharHeight(), HTML_INDENT_VERTICAL); - c -> SetAlignHor(HTML_ALIGN_CENTER); - c -> SetAlign(tag); - c -> SetWidthFloat(tag); - if (tag.HasParam("SIZE") && tag.ScanParam("SIZE", "%i", &sz) == 1) {} - else sz = 1; - c -> InsertCell(new wxHtmlLineCell(sz)); + c->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_VERTICAL); + c->SetAlignHor(wxHTML_ALIGN_CENTER); + c->SetAlign(tag); + c->SetWidthFloat(tag); + sz = 1; + if (tag.HasParam(wxT("SIZE")) && tag.ScanParam(wxT("SIZE"), wxT("%i"), &sz) == 1) {} + c->InsertCell(new wxHtmlLineCell((int)((double)sz * m_WParser->GetPixelScale()))); - m_WParser -> CloseContainer(); - m_WParser -> OpenContainer(); + m_WParser->CloseContainer(); + m_WParser->OpenContainer(); return FALSE; }