]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTabular.h
New DocBook support
[lyx.git] / src / insets / InsetTabular.h
index a2d290081943ce97649afdc361c61c47c9fc0520..ce684ec9ead375cfe6f4c062483396805496d7ea 100644 (file)
@@ -44,7 +44,7 @@ class FuncStatus;
 class Lexer;
 class OutputParams;
 class Paragraph;
-class XHTMLStream;
+class XMLStream;
 
 
 ///
@@ -72,7 +72,9 @@ public:
        /// descending into insets
        docstring asString(bool intoInsets = true);
        ///
-       docstring xhtml(XHTMLStream &, OutputParams const &) const;
+       docstring xhtml(XMLStream &, OutputParams const &) const;
+       ///
+       void docbook(XMLStream &, OutputParams const &) const;
        ///
        void addToToc(DocIterator const & di, bool output_active,
                                  UpdateType utype, TocBackend & backend) const;
@@ -116,7 +118,7 @@ private:
        // FIXME: Here the thoughts from the comment above also apply.
        ///
        LyXAlignment contentAlign;
-       /// should paragraph indendation be omitted in any case?
+       /// should paragraph indentation be omitted in any case?
        bool neverIndent() const { return true; }
        ///
        LyXAlignment contentAlignment() const { return contentAlign; }
@@ -555,9 +557,13 @@ public:
        ///
        void insertColumn(col_type column, bool copy);
        ///
-       idx_type getFirstCellInRow(row_type row) const;
+       idx_type getFirstCellInRow(row_type row, bool const ct = false) const;
+       ///
+       idx_type getLastCellInRow(row_type row, bool const ct = false) const;
        ///
-       idx_type getLastCellInRow(row_type row) const;
+       idx_type getFirstRow(bool const ct = false) const;
+       ///
+       idx_type getLastRow(bool const ct = false) const;
        ///
        idx_type numberOfCellsInRow(row_type row) const;
        ///
@@ -567,9 +573,9 @@ public:
        ///
        void latex(otexstream &, OutputParams const &) const;
        ///
-       int docbook(odocstream & os, OutputParams const &) const;
+    void docbook(XMLStream &, OutputParams const &) const;
        ///
-       docstring xhtml(XHTMLStream & os, OutputParams const &) const;
+       docstring xhtml(XMLStream &, OutputParams const &) const;
        ///
        void plaintext(odocstringstream &,
                       OutputParams const & runparams, int const depth,
@@ -786,7 +792,7 @@ public:
                /// caption
                bool caption;
                ///
-               Change::Type change;
+               Change change;
        };
        ///
        typedef std::vector<RowData> row_vector;
@@ -811,7 +817,7 @@ public:
                ///
                bool varwidth;
                ///
-               Change::Type change;
+               Change change;
        };
        ///
        typedef std::vector<ColumnData> column_vector;
@@ -869,21 +875,24 @@ public:
        ///
        // helper function for Latex
        ///
-       void TeXTopHLine(otexstream &, row_type row, std::list<col_type>) const;
+       void TeXTopHLine(otexstream &, row_type row, std::list<col_type>,
+                        std::list<col_type>) const;
        ///
-       void TeXBottomHLine(otexstream &, row_type row, std::list<col_type>) const;
+       void TeXBottomHLine(otexstream &, row_type row, std::list<col_type>,
+                           std::list<col_type>) const;
        ///
        void TeXCellPreamble(otexstream &, idx_type cell, bool & ismulticol, bool & ismultirow,
                             bool const bidi) const;
        ///
        void TeXCellPostamble(otexstream &, idx_type cell, bool ismulticol, bool ismultirow) const;
        ///
-       void TeXLongtableHeaderFooter(otexstream &, OutputParams const &, std::list<col_type>) const;
+       void TeXLongtableHeaderFooter(otexstream &, OutputParams const &, std::list<col_type>,
+                                     std::list<col_type>) const;
        ///
        bool isValidRow(row_type const row) const;
        ///
        void TeXRow(otexstream &, row_type const row,
-                   OutputParams const &, std::list<col_type>) const;
+                   OutputParams const &, std::list<col_type>, std::list<col_type>) const;
        ///
        // helper functions for plain text
        ///
@@ -899,9 +908,10 @@ public:
                                std::vector<unsigned int> const &,
                                bool onlydata, size_t max_length) const;
        /// auxiliary function for docbook
-       int docbookRow(odocstream & os, row_type, OutputParams const &) const;
+    void docbookRow(XMLStream &, row_type, OutputParams const &,
+                    bool header = false) const;
        ///
-       docstring xhtmlRow(XHTMLStream & xs, row_type, OutputParams const &,
+       docstring xhtmlRow(XMLStream & xs, row_type, OutputParams const &,
                           bool header = false) const;
 
        /// change associated Buffer
@@ -956,7 +966,7 @@ public:
        bool canTrackChanges() const { return true; }
        ///
        bool canPaintChange(BufferView const &) const { return true; }
-       /** returns false if, when outputing LaTeX, font changes should
+       /** returns false if, when outputting LaTeX, font changes should
            be closed before generating this inset. This is needed for
            insets that may contain several paragraphs */
        bool inheritFont() const { return false; }
@@ -965,16 +975,16 @@ public:
        //
        bool isTable() const { return true; }
        ///
-       DisplayType display() const;
+       RowFlags rowFlags() const;
        ///
        void latex(otexstream &, OutputParams const &) const;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const;
        ///
-       int docbook(odocstream &, OutputParams const &) const;
+       void docbook(XMLStream &, OutputParams const &) const;
        ///
-       docstring xhtml(XHTMLStream &, OutputParams const &) const;
+       docstring xhtml(XMLStream &, OutputParams const &) const;
        ///
        void validate(LaTeXFeatures & features) const;
        ///
@@ -1030,7 +1040,7 @@ public:
        /// can we go further down on mouse click?
        bool descendable(BufferView const &) const { return true; }
        /// Update the counters of this inset and of its contents
-       void updateBuffer(ParIterator const &, UpdateType);
+       void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false);
        ///
        void addToToc(DocIterator const & di, bool output_active,
                                  UpdateType utype, TocBackend & backend) const;
@@ -1068,6 +1078,8 @@ public:
        /// writes the cells between stidx and enidx as a string, optionally
        /// descending into the insets
        docstring asString(idx_type stidx, idx_type enidx, bool intoInsets = true);
+       ///
+       ParagraphList asParList(idx_type stidx, idx_type enidx);
 
        /// Returns whether the cell in the specified row and column is selected.
        bool isCellSelected(Cursor & cur, row_type row, col_type col) const;