]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed layout of tables that are first element on a page
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 17 Nov 2005 23:37:27 +0000 (23:37 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 17 Nov 2005 23:37:27 +0000 (23:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/html/htmlcell.h
src/html/m_tables.cpp

index d1570257cb98072fc4e7a3c34de18a8391eceaa3..f06788d65bb499b3e9a6ecb484eec92af38ac5e1 100644 (file)
@@ -427,7 +427,7 @@ public:
 
     // Removes indentation on top or bottom of the container (i.e. above or
     // below first/last terminal cell). For internal use only.
-    void RemoveExtraSpacing(bool top, bool bottom);
+    virtual void RemoveExtraSpacing(bool top, bool bottom);
 
     // Returns the maximum possible length of the container.
     // Call Layout at least once before using GetMaxTotalWidth()
index ea4491ac59c5bb84b4e22f79e9ca6d7a5a741767..37db566dc59f13d05f8172abb96b370bb0ba0450 100644 (file)
@@ -99,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);
@@ -163,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)
 {