]> git.lyx.org Git - lyx.git/blobdiff - src/tabular.h
ws changes only
[lyx.git] / src / tabular.h
index c2ac148da6805277dc5041288b0d44e82735ff3f..2775ad6d27822e7565bf271be69cbba32c757e02 100644 (file)
@@ -171,14 +171,9 @@ public:
        };
 
        /// constructor
-       LyXTabular(BufferParams const &,
-                  InsetTabular *, int columns_arg, int rows_arg);
-       /// sort of copy constructor
-       LyXTabular(BufferParams const &,
-                  InsetTabular *, LyXTabular const &);
-       ///
-       explicit
-       LyXTabular(Buffer const &, InsetTabular *, LyXLex & lex);
+       LyXTabular(BufferParams const &, int columns_arg, int rows_arg);
+       ///
+       void setOwner(InsetTabular * inset);
 
        /// Returns true if there is a topline, returns false if not
        bool topLine(int cell, bool onlycolumn = false) const;
@@ -239,7 +234,7 @@ public:
        ///
        bool setMColumnPWidth(int cell, LyXLength const & width);
        ///
-       void setAlignSpecial(int cell, string const & special, Feature what);
+       void setAlignSpecial(int cell, std::string const & special, Feature what);
        ///
        LyXAlignment getAlignment(int cell, bool onlycolumn = false) const;
        ///
@@ -251,7 +246,7 @@ public:
        ///
        LyXLength const getMColumnPWidth(int cell) const;
        ///
-       string const getAlignSpecial(int cell, int what) const;
+       std::string const getAlignSpecial(int cell, int what) const;
        ///
        int getWidthOfCell(int cell) const;
        ///
@@ -291,7 +286,9 @@ public:
        int ascii(Buffer const &, std::ostream &, int const depth,
                  bool onlydata, unsigned char delim) const;
        ///
-       bool isMultiColumn(int cell, bool real = false) const;
+       bool isMultiColumn(int cell) const;
+       ///
+       bool isMultiColumnReal(int cell) const;
        ///
        void setMultiColumn(Buffer *, int cell, int number);
        ///
@@ -369,23 +366,18 @@ public:
        ///
        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(InsetOld const * inset, int maybe_cell = -1) const;
+       /// 
+       int getCellFromInset(InsetOld const * inset) const;
        ///
        int rows() const { return rows_; }
        ///
        int columns() const { return columns_;}
        ///
        void validate(LaTeXFeatures &) const;
-       ///
-       void getLabelList(std::vector<string> &) const;
-       ///
-       /// recalculate the widths/heights only!
-       void reinit();
+       /// Appends \c list with all labels found within this inset.
+       void getLabelList(Buffer const &, std::vector<std::string> & list) const;
        ///
 //private:
-       ///
-       mutable int cur_cell;
        ///
        struct cellstruct {
                ///
@@ -413,7 +405,7 @@ public:
                ///
                bool rotate;
                ///
-               string align_special;
+               std::string align_special;
                ///
                LyXLength p_width; // this is only set for multicolumn!!!
                ///
@@ -469,7 +461,7 @@ public:
                ///
                LyXLength p_width;
                ///
-               string align_special;
+               std::string align_special;
        };
        ///
        typedef std::vector<columnstruct> column_vector;
@@ -506,17 +498,11 @@ public:
        ltType endfoot;
        /// endlastfoot data
        ltType endlastfoot;
-       //
-       ///
-       InsetTabular * owner_;
 
        ///
-       void init(BufferParams const &,
-                 int columns_arg, int rows_arg, LyXTabular const * lt = 0);
+       void init(BufferParams const &, int rows_arg, int columns_arg);
        ///
-       void Reinit(bool reset_widths = true);
-       ///
-       void set_row_column_number_info(bool oldformat = false);
+       void set_row_column_number_info();
        /// Returns true if a complete update is necessary, otherwise false
        bool setWidthOfMulticolCell(int cell, int new_width);
        ///
@@ -568,6 +554,10 @@ public:
                                           bool onlydata) const;
        /// auxiliary function for docbook
        int docbookRow(Buffer const & buf, std::ostream & os, int row) const;
+
+private:
+       /// renumber cells after structural changes
+       void fixCellNums();
 };
 
 #endif