]> git.lyx.org Git - lyx.git/blobdiff - src/tabular.C
Make lyx2lyx output the new external inset format.
[lyx.git] / src / tabular.C
index 51330930dc0c0469f88b5c34a4f404cc3c02680c..023f5406cb98e3d4f65de007759403990facf4f7 100644 (file)
@@ -117,23 +117,11 @@ LyXTabular::LyXTabular(BufferParams const & bp,
 
 
 LyXTabular::LyXTabular(BufferParams const & bp,
-                      InsetTabular * inset, LyXTabular const & lt,
-                      bool same_id)
+                      InsetTabular * inset, LyXTabular const & lt)
 {
        owner_ = inset;
        cur_cell = -1;
        Init(bp, lt.rows_, lt.columns_, &lt);
-       // we really should change again to have InsetText as a pointer
-       // and allocate it then we would not have to do this stuff all
-       // double!
-       if (same_id) {
-               for (int i = 0; i < rows_; ++i) {
-                       for (int j = 0; j < columns_; ++j) {
-                               cell_info[i][j].inset.id(lt.cell_info[i][j].inset.id());
-                               cell_info[i][j].inset.setParagraphData(lt.cell_info[i][j].inset.paragraphs, true);
-                       }
-               }
-       }
 #if 0
 #ifdef WITH_WARNINGS
 #warning Jürgen, can you make it the other way round. So that copy assignment depends on the copy constructor and not the other way. (Lgb)
@@ -177,9 +165,9 @@ LyXTabular & LyXTabular::operator=(LyXTabular const & lt)
 
 
 LyXTabular * LyXTabular::clone(BufferParams const & bp,
-                              InsetTabular * inset, bool same_id)
+                              InsetTabular * inset)
 {
-       LyXTabular * result = new LyXTabular(bp, inset, *this, same_id);
+       LyXTabular * result = new LyXTabular(bp, inset, *this);
 #if 0
        // don't know if this is good but I need to Clone also
        // the text-insets here, this is for the Undo-facility!
@@ -2557,8 +2545,8 @@ vector<string> const LyXTabular::getLabelList() const
 LyXTabular::BoxType LyXTabular::UseParbox(int cell) const
 {
        ParagraphList const & parlist = GetCellInset(cell)->paragraphs;
-       ParagraphList::iterator cit = parlist.begin();
-       ParagraphList::iterator end = parlist.end();
+       ParagraphList::const_iterator cit = parlist.begin();
+       ParagraphList::const_iterator end = parlist.end();
 
        for (; cit != end; ++cit) {
                for (int i = 0; i < cit->size(); ++i) {