function DocEngineTableWide() {};

DocEngineTableWide.prototype = new DocEngineTable;
DocEngineTableWide.superClass = DocEngineTable.prototype;

DocEngineTableWide.prototype.open_table = function() {
    if (!this._table_open) {
        Document.BeginParagraph(word_trans('para_bubble_text'));
        Document.BeginTable("standard_table_wide");
            Document.BeginRow();
                Document.BeginCell();
                    this.add_html_paragraph(word_trans('para_bubble_text_center'),
                                            "<b>" + prj_trans('docTableHeaderStep') + "</b>");
                Document.EndCell();
                Document.BeginCell();
                    this.add_html_paragraph(word_trans('para_bubble_text'),
                                            "<b>" + prj_trans('docTableHeaderAction') + "</b>");
                Document.EndCell();
                Document.BeginCell();
                    this.add_html_paragraph(word_trans('para_bubble_text'),
                                            "<b>" + prj_trans('docTableHeaderInput') + "</b>");
                Document.EndCell();
                Document.BeginCell();
                    this.add_html_paragraph(word_trans('para_bubble_text'),
                                            "<b>" + prj_trans('docTableHeaderExpectedResults') + "</b>");
                Document.EndCell();
                Document.BeginCell();
                    this.add_html_paragraph(word_trans('para_bubble_text'),
                                            "<b>" + prj_trans('docTableHeaderPassed') + "</b>");
                Document.EndCell();
                Document.BeginCell();
                    this.add_html_paragraph(word_trans('para_bubble_text'),
                                            "<b>" + prj_trans('docTableHeaderFailed') + "</b>");
                Document.EndCell();
            Document.EndRow();

        this._table_open = true;
    }
}

DocEngineTableWide.prototype.add_bubble_text = function(macro, index) {
    if (!cfg.standard.doc.show_bubble_text) return;
    var text = this.get_macro_text(macro);
    var doc_index = ((index != -1 && cfg.standard.doc.rects_with_index) ? index + "." : "");
    if (text.length == 0) return false;

    if (index > 0) {
        this.open_table();

        Document.BeginRow();
            Document.BeginCell();
                this.add_html_paragraph(word_trans('para_bubble_text_center'), doc_index);
            Document.EndCell();
            Document.BeginCell();
                this.add_html_paragraph(word_trans('para_bubble_text'), text);
            Document.EndCell();
            Document.BeginCell();
                this.add_html_paragraph(word_trans('para_bubble_text'), "&nbsp;");
            Document.EndCell();
            Document.BeginCell();
                this.add_html_paragraph(word_trans('para_bubble_text'), "&nbsp;");
            Document.EndCell();
            Document.BeginCell();
                this.add_html_paragraph(word_trans('para_bubble_text'), "&nbsp;");
            Document.EndCell();
            Document.BeginCell();
                this.add_html_paragraph(word_trans('para_bubble_text'), "&nbsp;");
            Document.EndCell();
        Document.EndRow();
    } else {
        Document.LineBreak();
        this.add_html_paragraph(word_trans('para_bubble_text'), text);
        Document.LineBreak();
    }

    return true;
};

DocEngineTableWide.prototype.define_styles = function() {
    DocEngineTableWide.superClass.define_styles();

    // STANDARD TABLE WIDE
    Document.SetCurrCellStyle("standard_cell_left2");
    Document.CellWidth = 80;
    Document.CellLeftPad = 3.5;
    Document.CellRightPad = 3.5;
    Document.CellTopPad = 3.5;
    Document.CellBottomPad = 3.5;

    Document.SetCurrCellStyle("standard_cell_left3");
    Document.CellWidth = 70;
    Document.CellLeftPad = 3.5;
    Document.CellRightPad = 3.5;
    Document.CellTopPad = 3.5;
    Document.CellBottomPad = 3.5;

    Document.SetCurrCellStyle("standard_cell_right");
    Document.CellWidth = 120;
    Document.CellLeftPad = 3.5;
    Document.CellRightPad = 3.5;
    Document.CellTopPad = 3.5;
    Document.CellBottomPad = 3.5;

    Document.SetCurrRowStyle("standard_row_wide");
    Document.RowHeight = 12.0;
    Document.SetRowCellStyles("standard_cell_left", "standard_cell_right", "standard_cell_left", "standard_cell_left3", "standard_cell_left3", "standard_cell_left2");

    Document.SetCurrTableStyle("standard_table_wide");
    Document.TableBorder = 2;
    //Document.TablePreferredWidth = 432.3;
    Document.TableRowStyle = "standard_row_wide";

};
