]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetTabular.h
InsetIndex: revamp IndexEntry to handle both legacy and modern index insets; simplify...
[features.git] / src / insets / InsetTabular.h
index f42f5bc77bd4bbf07c9c6a5b68fccd3a4443f42b..08b626ff8fe21cee717f7801e6c00a7ebd7f278c 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef INSET_TABULAR_H
 #define INSET_TABULAR_H
 
+#include "BufferParams.h"
 #include "Changes.h"
 #include "InsetText.h"
 
@@ -849,6 +850,24 @@ public:
        ///
        typedef std::vector<ColumnData> column_vector;
 
+private:
+       // Determines the style of borders, per row.
+       class XmlRowWiseBorders {
+       public:
+               // Whether to draw double bottom line.
+               bool completeBorder = true;
+
+               // Whether to draw booktabs' thicker lines.
+               bool completeBorderAbove = true;
+               bool completeBorderBelow = true;
+
+               // Size of the borders.
+               double borderBottomWidth = 1.0;
+               double borderBottomWidthComplete = 3.0;
+               double borderTopWidth = 1.0;
+       };
+
+public:
        ///
        idx_type numberofcells;
        ///
@@ -934,17 +953,15 @@ public:
                                idx_type cell, row_type row, col_type column,
                                std::vector<unsigned int> const &,
                                bool onlydata, size_t max_length) const;
-       /// auxiliary function for DocBook
-       void docbookRow(XMLStream &, row_type, OutputParams const &,
-                                       bool header = false) const;
-       /// auxiliary function for DocBook: export this row as HTML
-       void docbookRowAsHTML(XMLStream &, row_type, OutputParams const &,
-                                       bool header) const;
-       /// auxiliary function for DocBook: export this row as CALS
-       void docbookRowAsCALS(XMLStream &, row_type, OutputParams const &) const;
-       ///
-       docstring xhtmlRow(XMLStream & xs, row_type, OutputParams const &,
-                          bool header = false) const;
+       ///
+       docstring xmlRow(XMLStream & xs, row_type row, OutputParams const &,
+                        bool header = false, bool is_xhtml = true,
+                                        BufferParams::TableOutput docbook_table_output = BufferParams::TableOutput::HTMLTable) const;
+       void xmlHeader(XMLStream & xs, OutputParams const &) const;
+       void xmlFooter(XMLStream & xs, OutputParams const &) const;
+       void xmlBody(XMLStream & xs, OutputParams const &) const;
+       XmlRowWiseBorders computeXmlBorders(row_type row) const;
+       std::vector<std::string> computeCssStylePerCell(row_type row, col_type col, idx_type cell) const;
 
        /// Transforms the vertical alignment of the given cell as a prebaked XML attribute (for HTML and CALS).
        std::string getHAlignAsXmlAttribute(idx_type cell, bool is_xhtml = true) const;