X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..a8cb1a4947bbbf5e18ce52448f4c3bb4cff4daee:/src/html/m_tables.cpp diff --git a/src/html/m_tables.cpp b/src/html/m_tables.cpp index ef6fad6759..37db566dc5 100644 --- a/src/html/m_tables.cpp +++ b/src/html/m_tables.cpp @@ -4,13 +4,9 @@ // Author: Vaclav Slavik // RCS-ID: $Id$ // Copyright: (c) 1999 Vaclav Slavik -// Licence: wxWidgets Licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation -#endif - #include "wx/wxprec.h" #include "wx/defs.h" @@ -103,6 +99,9 @@ private: public: wxHtmlTableCell(wxHtmlContainerCell *parent, const wxHtmlTag& tag, double pixel_scale = 1.0); ~wxHtmlTableCell(); + + virtual void RemoveExtraSpacing(bool top, bool bottom); + virtual void Layout(int w); void AddRow(const wxHtmlTag& tag); @@ -167,6 +166,15 @@ wxHtmlTableCell::~wxHtmlTableCell() } +void wxHtmlTableCell::RemoveExtraSpacing(bool WXUNUSED(top), + bool WXUNUSED(bottom)) +{ + // Don't remove any spacing in the table -- it's always desirable, + // because it's part of table's definition. + // (If wxHtmlContainerCell::RemoveExtraSpacing() was applied to tables, + // then upper left cell of a table would be positioned above other cells + // if the table was the first element on the page.) +} void wxHtmlTableCell::ReallocCols(int cols) { @@ -350,7 +358,7 @@ void wxHtmlTableCell::AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag) void wxHtmlTableCell::ComputeMinMaxWidths() { - if (m_NumCols == 0 || m_ColsInfo[0].minWidth != -1) return; + if (m_NumCols == 0 || m_ColsInfo[0].minWidth != wxDefaultCoord) return; m_MaxTotalWidth = 0; int percentage = 0; @@ -700,7 +708,7 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH") m_WParser->CloseContainer(); m_Table = oldt; - return TRUE; + return true; } @@ -744,7 +752,7 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH") m_WParser->OpenContainer(); } } - return FALSE; + return false; } TAG_HANDLER_END(TABLE)