changeset 1339:aa08f6648d44

imported patch remove_use_tables
author Jeremy Henty <onepoint@starurchin.org>
date Tue, 29 Sep 2009 19:26:08 +0100
parents 8f8b7397f30e
children 37f26396a31b
files src/table.cc
diffstat 1 files changed, 0 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/table.cc	Sun Sep 27 18:07:30 2009 +0000
+++ b/src/table.cc	Tue Sep 29 19:26:08 2009 +0100
@@ -20,9 +20,6 @@
 #include "msg.h"
 #include "css.hh"
 
-/* Undefine if you want to unroll tables. For instance for PDAs */
-#define USE_TABLES
-
 using namespace dw;
 using namespace dw::core;
 using namespace dw::core::style;
@@ -40,16 +37,12 @@
  */
 void Html_tag_open_table(DilloHtml *html, const char *tag, int tagsize)
 {
-#ifdef USE_TABLES
    dw::core::Widget *table;
    CssPropertyList props, *table_cell_props;
    const char *attrbuf;
    int32_t border = -1, cellspacing = -1, cellpadding = -1, bgcolor = -1;
    CssLength cssLength;
-#endif
 
-
-#ifdef USE_TABLES
    if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "border")))
       border = isdigit(attrbuf[0]) ? strtol (attrbuf, NULL, 10) : 1;
    if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "cellspacing")))
@@ -136,7 +129,6 @@
    S_TOP(html)->table_mode = DILLO_HTML_TABLE_MODE_TOP;
    S_TOP(html)->cell_text_align_set = FALSE;
    S_TOP(html)->table = table;
-#endif
 }
 
 /*
@@ -149,7 +141,6 @@
    bool new_style = false;
    CssPropertyList props, *table_cell_props;
 
-#ifdef USE_TABLES
    switch (S_TOP(html)->table_mode) {
    case DILLO_HTML_TABLE_MODE_NONE:
       _MSG("Invalid HTML syntax: <tr> outside <table>\n");
@@ -196,9 +187,6 @@
    }
 
    S_TOP(html)->table_mode = DILLO_HTML_TABLE_MODE_TR;
-#else
-   HT2TB(html)->addParbreak (0, html->styleEngine->wordStyle ());
-#endif
 }
 
 /*
@@ -230,7 +218,6 @@
                                      const char *tag, int tagsize,
                                      dw::core::style::TextAlignType text_align)
 {
-#ifdef USE_TABLES
    Widget *col_tb;
    int colspan = 1, rowspan = 1;
    const char *attrbuf;
@@ -317,5 +304,4 @@
    }
 
    S_TOP(html)->table_mode = DILLO_HTML_TABLE_MODE_TD;
-#endif
 }