X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..263e3a8327f544990c7ba7edb8cd34994c908049:/src/html/htmlcell.cpp diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp index a661db2cc5..50e178a6da 100644 --- a/src/html/htmlcell.cpp +++ b/src/html/htmlcell.cpp @@ -201,11 +201,11 @@ wxCursor wxHtmlCell::GetMouseCursor(wxHtmlWindowInterface *window) const #if WXWIN_COMPATIBILITY_2_6 // NB: Older versions of wx used GetCursor() virtual method in place of // GetMouseCursor(interface). This code ensures that user code that - // overriden GetCursor() continues to work. The trick is that the base + // overridden GetCursor() continues to work. The trick is that the base // wxHtmlCell::GetCursor() method simply returns wxNullCursor, so we - // know that GetCursor() was overriden iff it returns valid cursor. + // know that GetCursor() was overridden iff it returns valid cursor. wxCursor cur = GetCursor(); - if (cur.Ok()) + if (cur.IsOk()) return cur; #endif // WXWIN_COMPATIBILITY_2_6 @@ -237,8 +237,7 @@ bool wxHtmlCell::AdjustPagebreak(int *pagebreak, void wxHtmlCell::SetLink(const wxHtmlLinkInfo& link) { - if (m_Link) delete m_Link; - m_Link = NULL; + wxDELETE(m_Link); if (link.GetHref() != wxEmptyString) m_Link = new wxHtmlLinkInfo(link); } @@ -871,7 +870,7 @@ void wxHtmlContainerCell::Layout(int w) /* - LAYOUTING : + LAYOUT : */ @@ -879,7 +878,7 @@ void wxHtmlContainerCell::Layout(int w) s_indent = (m_IndentLeft < 0) ? (-m_IndentLeft * m_Width / 100) : m_IndentLeft; s_width = m_Width - s_indent - ((m_IndentRight < 0) ? (-m_IndentRight * m_Width / 100) : m_IndentRight); - // my own layouting: + // my own layout: wxHtmlCell *cell = m_Cells, *line = m_Cells; while (cell != NULL) @@ -1126,7 +1125,7 @@ void wxHtmlContainerCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, if (m_Border == 1) { - // draw thin border using lines + // draw thin border using lines wxPen mypen1(m_BorderColour1, 1, wxPENSTYLE_SOLID); wxPen mypen2(m_BorderColour2, 1, wxPENSTYLE_SOLID); @@ -1138,10 +1137,10 @@ void wxHtmlContainerCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, dc.DrawLine(xlocal, ylocal + m_Height - 1, xlocal + m_Width, ylocal + m_Height - 1); } else if (m_Border> 0) - { + { wxBrush mybrush1(m_BorderColour1, wxBRUSHSTYLE_SOLID); wxBrush mybrush2(m_BorderColour2, wxBRUSHSTYLE_SOLID); - + // draw upper left corner // 0---------------5 // | / @@ -1149,7 +1148,7 @@ void wxHtmlContainerCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, // | | // | 2 // |/ - // 1 + // 1 wxPoint poly[6]; poly[0].x =m_PosX; poly[0].y = m_PosY ; @@ -1162,7 +1161,7 @@ void wxHtmlContainerCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, dc.SetBrush(mybrush1); dc.SetPen(*wxTRANSPARENT_PEN); dc.DrawPolygon(6, poly, x, y); - + // draw lower right corner reusing point 1,2,4 and 5 // 5 // /| @@ -1176,11 +1175,11 @@ void wxHtmlContainerCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, poly[3].x = poly[4].x; poly[3].y = poly[2].y; dc.DrawPolygon(6, poly, x, y); - // smooth color transition like firefox + // smooth color transition like firefox wxColour borderMediumColour( (m_BorderColour1.Red() + m_BorderColour2.Red()) /2 , (m_BorderColour1.Green() + m_BorderColour2.Green()) /2 , - (m_BorderColour1.Blue() + m_BorderColour2.Blue()) /2 + (m_BorderColour1.Blue() + m_BorderColour2.Blue()) /2 ); wxPen mypen3(borderMediumColour, 1, wxPENSTYLE_SOLID); dc.SetPen(mypen3);