]> git.lyx.org Git - lyx.git/blobdiff - src/tabular.C
Minor code shuffle.
[lyx.git] / src / tabular.C
index 99e7816168bc011a4d64bf3c845fd3b14a4161a6..183b2f2e68fd5d40a80e37b63db5784ec82c34ae 100644 (file)
@@ -1504,6 +1504,10 @@ void LyXTabular::OldFormatRead(LyXLex & lex, string const & fl)
                        || token == "\\end_float"
                        || token == "\\end_deeper") {
                        lex.pushToken(token);
+                       // Here we need to insert the inset_ert_contents into the last
+                       // cell of the tabular.
+                       owner_->bufferOwner()->insertErtContents(par, pos, font);
+                       
                        break;
                }
                if (owner_->bufferOwner()->parseSingleLyXformat2Token(lex, par,
@@ -1556,7 +1560,7 @@ void LyXTabular::OldFormatRead(LyXLex & lex, string const & fl)
                        }
                }
                par->copyIntoMinibuffer(*owner_->bufferOwner(), i);
-               inset->par->insertFromMinibuffer(inset->par->size());
+               inset->paragraph()->insertFromMinibuffer(inset->paragraph()->size());
        }
        delete par;
        Reinit();
@@ -2163,8 +2167,8 @@ int LyXTabular::Latex(Buffer const * buf,
                        ret += TeXCellPreamble(os, cell);
                        InsetText * inset = GetCellInset(cell);
 
-                       bool rtl = inset->par->isRightToLeftPar(buf->params) &&
-                                       inset->par->size() > 0 && GetPWidth(cell).empty();
+                       bool rtl = inset->paragraph()->isRightToLeftPar(buf->params) &&
+                                       inset->paragraph()->size() > 0 && GetPWidth(cell).empty();
 
                        if (rtl)
                                os << "\\R{";
@@ -2570,7 +2574,7 @@ std::vector<string> const LyXTabular::getLabelList() const
                        
 LyXTabular::BoxType LyXTabular::UseParbox(int cell) const
 {
-       Paragraph * par = GetCellInset(cell)->par;
+       Paragraph * par = GetCellInset(cell)->paragraph();
 
        for (; par; par = par->next()) {
                for (int i = 0; i < par->size(); ++i) {