#include "lyxlex.h"
#include "LString.h"
+#include "insets/insettext.h"
class InsetTabular;
-class InsetText;
class LaTeXFeatures;
+class Buffer;
/* The features the text class offers for tables */
LyXTabular(InsetTabular *, LyXTabular const &);
///
explicit
- LyXTabular(InsetTabular *, LyXLex & lex);
+ LyXTabular(Buffer const *, InsetTabular *, LyXLex & lex);
///
~LyXTabular();
///
int GetDescentOfRow(int row) const;
///
int GetHeightOfTabular() const;
- ///
- void SetAscentOfRow(int row, int height);
- ///
- void SetDescentOfRow(int row, int height);
+ /// Returns true if a complete update is necessary, otherwise false
+ bool SetAscentOfRow(int row, int height);
+ /// Returns true if a complete update is necessary, otherwise false
+ bool SetDescentOfRow(int row, int height);
/// Returns true if a complete update is necessary, otherwise false
bool SetWidthOfCell(int cell, int new_width);
/// Returns true if a complete update is necessary, otherwise false
///
int GetNumberOfCells() const;
///
- int AppendCellAfterCell(int append_cell, int question_cell);
- ///
- int DeleteCellIfColumnIsDeleted(int cell, int delete_column_cell);
- ///
int NumberOfCellsInRow(int cell) const;
///
- void Write(std::ostream &) const;
+ void Write(Buffer const *, std::ostream &) const;
///
- void Read(LyXLex &);
+ void Read(Buffer const *, LyXLex &);
///
void OldFormatRead(LyXLex &, string const &);
///
int TeXCellPreamble(std::ostream &, int cell) const;
int TeXCellPostamble(std::ostream &, int cell) const;
///
- int Latex(std::ostream &, bool, bool) const;
+ int Latex(Buffer const *, std::ostream &, bool, bool) const;
///
int DocBookEndOfCell(std::ostream &, int cell, int & depth) const;
#if 0
///
int column_of_cell(int cell) const;
///
+ int right_column_of_cell(int cell) const;
+ ///
void SetLongTabular(int what);
///
bool IsLongTabular() const;
///
int GetCellBelow(int cell) const;
///
+ int GetLastCellAbove(int cell) const;
+ ///
+ int GetLastCellBelow(int cell) const;
+ ///
int GetCellNumber(int row, int column) const;
///
void SetLinebreaks(int cell, bool what);
///
cellstruct();
///
+#ifdef INSET_POINTER
~cellstruct();
///
cellstruct(cellstruct const &);
///
cellstruct & operator=(cellstruct const &);
+#endif
///
int cellno;
///
///
string p_width; // this is only set for multicolumn!!!
///
- InsetText * inset;
+ InsetText inset;
};
+ typedef std::vector<cellstruct> cell_vector;
+ typedef std::vector<cell_vector> cell_vvector;
+
///
struct rowstruct {
///
/// This are for longtabulars only
bool newpage;
};
+ typedef std::vector<rowstruct> row_vector;
+
///
struct columnstruct {
///
string p_width;
string align_special;
};
+ typedef std::vector<columnstruct> column_vector;
+
///
int rows_;
///
///
int * columnofcell;
///
- std::vector<rowstruct> row_info;
+ row_vector row_info;
///
- std::vector<columnstruct> column_info;
+ column_vector column_info;
///
- mutable std::vector< std::vector<cellstruct> > cell_info;
+ mutable cell_vvector cell_info;
///
int width_of_tabular;
///
///
void calculate_width_of_tabular();
- ///
- int right_column_of_cell(int cell) const;
-
///
cellstruct * cellinfo_of_cell(int cell) const;