]> git.lyx.org Git - lyx.git/blobdiff - src/tabular.h
Dekels tabular/textinset patches
[lyx.git] / src / tabular.h
index 53f5474f3894c9e1f129817fc00fc4435056e6bf..6b5a9449e58f0be96cf27c6dd82c5b3b324b73b2 100644 (file)
@@ -161,20 +161,18 @@ public:
     explicit
     LyXTabular(Buffer const *, InsetTabular *, LyXLex & lex);
     ///
-    ~LyXTabular();
-    ///
     LyXTabular & operator=(LyXTabular const &);
     ///
     LyXTabular * Clone(InsetTabular *);
     
     /// Returns true if there is a topline, returns false if not
-    bool TopLine(int cell, bool onlycolumn=false) const;
+    bool TopLine(int cell, bool onlycolumn = false) const;
     /// Returns true if there is a topline, returns false if not
-    bool BottomLine(int cell, bool onlycolumn=false) const;
+    bool BottomLine(int cell, bool onlycolumn = false) const;
     /// Returns true if there is a topline, returns false if not
-    bool LeftLine(int cell, bool onlycolumn=false) const;
+    bool LeftLine(int cell, bool onlycolumn = false) const;
     /// Returns true if there is a topline, returns false if not
-    bool RightLine(int cell, bool onlycolumn=false) const;
+    bool RightLine(int cell, bool onlycolumn = false) const;
     
     ///
     bool TopAlreadyDrawed(int cell) const;
@@ -244,11 +242,11 @@ public:
     ///
     void AppendRow(int cell);
     ///
-    void DeleteRow(int cell);
+    void DeleteRow(int row);
     ///
     void AppendColumn(int cell);
     ///
-    void DeleteColumn(int cell);
+    void DeleteColumn(int column);
     ///
     bool IsFirstCellInRow(int cell) const;
     ///
@@ -280,6 +278,21 @@ public:
     ///
     int Latex(Buffer const *, std::ostream &, bool, bool) const;
     ///
+    int DocBook(Buffer const * buf, std::ostream & os) const;
+    ///
+    // helper function for Latex returns number of newlines
+    ///
+    int AsciiTopHLine(std::ostream &, int row,
+                     std::vector<unsigned int> const &) const;
+    ///
+    int AsciiBottomHLine(std::ostream &, int row,
+                        std::vector<unsigned int> const &) const;
+    ///
+    int AsciiPrintCell(Buffer const *, std::ostream &, int cell, int row,
+                      int column, std::vector<unsigned int> const &) const;
+    ///
+    int Ascii(Buffer const *, std::ostream &) const;
+    ///
     int DocBookEndOfCell(std::ostream &, int cell, int & depth) const;
 #if 0
     ///
@@ -352,6 +365,7 @@ public:
     bool GetLTNewPage(int cell) const;
     ///
     InsetText * GetCellInset(int cell) const;
+    InsetText * GetCellInset(int row, int column) const;
     ///
     int rows() const { return rows_; }
     ///
@@ -447,9 +461,9 @@ private: //////////////////////////////////////////////////////////////////
     ///
     int numberofcells;
     ///
-    int * rowofcell;
+    std::vector<int> rowofcell;
     ///
-    int * columnofcell;
+    std::vector<int> columnofcell;
     ///
     row_vector row_info;
     ///
@@ -480,7 +494,7 @@ private: //////////////////////////////////////////////////////////////////
     ///
     void Reinit();
     ///
-    void set_row_column_number_info(bool oldformat=false);
+    void set_row_column_number_info(bool oldformat = false);
     /// Returns true if a complete update is necessary, otherwise false
     bool SetWidthOfMulticolCell(int cell, int new_width);
     ///