X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftabular.h;h=2486a71e2ddeb2b10f5f11534860d952f6858ac2;hb=eead5ba43d0ddf06544ad1b40063981d3788c635;hp=b2915a575f5770cda50efbd1c7ea1a0b08e175b4;hpb=824444b67bc67fe54933f90c83eee1eec864fdfa;p=lyx.git diff --git a/src/tabular.h b/src/tabular.h index b2915a575f..2486a71e2d 100644 --- a/src/tabular.h +++ b/src/tabular.h @@ -12,21 +12,14 @@ #ifndef TABULAR_H #define TABULAR_H -#include "layout.h" -#include "LString.h" #include "lyxlength.h" - #include "insets/insettext.h" #include #include class InsetTabular; -class BufferParams; -class LaTeXFeatures; class LatexRunParams; -class Buffer; -class LyXLex; /* The features the text class offers for tables */ @@ -177,16 +170,12 @@ public: /// constructor LyXTabular(BufferParams const &, InsetTabular *, int columns_arg, int rows_arg); - /// sort of copy constructir + /// sort of copy constructor LyXTabular(BufferParams const &, InsetTabular *, LyXTabular const &); /// explicit LyXTabular(Buffer const *, InsetTabular *, LyXLex & lex); - /// - LyXTabular & operator=(LyXTabular const &); - /// - LyXTabular * clone(BufferParams const &, InsetTabular *); /// Returns true if there is a topline, returns false if not bool topLine(int cell, bool onlycolumn = false) const; @@ -226,28 +215,28 @@ public: 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 - bool setAllLines(int cell, bool line); - /// Returns true if a complete update is necessary, otherwise false - bool setTopLine(int cell, bool line, bool onlycolumn = false); - /// Returns true if a complete update is necessary, otherwise false - bool setBottomLine(int cell, bool line, bool onlycolumn = false); - /// Returns true if a complete update is necessary, otherwise false - bool setLeftLine(int cell, bool line, bool onlycolumn = false); - /// Returns true if a complete update is necessary, otherwise false - bool setRightLine(int cell, bool line, bool onlycolumn = false); - /// Returns true if a complete update is necessary, otherwise false - bool setAlignment(int cell, LyXAlignment align, + /// + void setAllLines(int cell, bool line); + /// + void setTopLine(int cell, bool line, bool onlycolumn = false); + /// + void setBottomLine(int cell, bool line, bool onlycolumn = false); + /// + void setLeftLine(int cell, bool line, bool onlycolumn = false); + /// + void setRightLine(int cell, bool line, bool onlycolumn = false); + /// + void setAlignment(int cell, LyXAlignment align, bool onlycolumn = false); - /// Returns true if a complete update is necessary, otherwise false - bool setVAlignment(int cell, VAlignment align, + /// + void setVAlignment(int cell, VAlignment align, bool onlycolumn = false); /// - bool setColumnPWidth(int cell, LyXLength const & width); + void setColumnPWidth(int cell, LyXLength const & width); /// bool setMColumnPWidth(int cell, LyXLength const & width); /// - bool setAlignSpecial(int cell, string const & special, Feature what); + void setAlignSpecial(int cell, string const & special, Feature what); /// LyXAlignment getAlignment(int cell, bool onlycolumn = false) const; /// @@ -291,6 +280,8 @@ public: /// int latex(Buffer const *, std::ostream &, LatexRunParams const &) const; + // + int linuxdoc(Buffer const * buf, std::ostream & os) const; /// int docbook(Buffer const * buf, std::ostream & os, bool mixcont) const; /// @@ -371,12 +362,12 @@ public: /// // end longtable support /// - InsetText * getCellInset(int cell) const; + InsetText & getCellInset(int cell) const; /// - InsetText * getCellInset(int row, int column) const; + InsetText & getCellInset(int row, int column) const; /// Search for \param inset in the tabular, with the /// additional hint that it could be at \param maybe_cell - int getCellFromInset(Inset const * inset, int maybe_cell = -1) const; + int getCellFromInset(InsetOld const * inset, int maybe_cell = -1) const; /// int rows() const { return rows_; } /// @@ -384,11 +375,12 @@ public: /// void validate(LaTeXFeatures &) const; /// - std::vector const getLabelList() const; + void getLabelList(std::vector &) const; /// /// recalculate the widths/heights only! void reinit(); -private: + /// +//private: /// mutable int cur_cell; /// @@ -424,6 +416,7 @@ private: /// InsetText inset; }; + cellstruct & cellinfo_of_cell(int cell) const; /// typedef std::vector cell_vector; /// @@ -478,10 +471,6 @@ private: /// typedef std::vector column_vector; - /// - void read(Buffer const * buf, std::istream & is, - LyXLex & lex, string const & l, int const version); - /// /// int rows_; /// @@ -530,14 +519,12 @@ private: /// void recalculateMulticolumnsOfColumn(int column); /// Returns true if change - bool calculate_width_of_column(int column); + void calculate_width_of_column(int column); /// bool calculate_width_of_column_NMC(int column); // no multi cells /// void calculate_width_of_tabular(); /// - cellstruct * cellinfo_of_cell(int cell) const; - /// void delete_column(int column); /// int cells_in_multicolumn(int cell) const;