X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftabular.C;h=3ba8ca8bf0065b1d65d2b4a170205a7f25a52d80;hb=06f9f0ea08ddcf13e99ea02cff21471aa2020c9e;hp=d38a35714dc56a303e2f4d7c0da129be3e15495c;hpb=8283e978f8d621041c432b9b88a476bfd567385c;p=lyx.git diff --git a/src/tabular.C b/src/tabular.C index d38a35714d..3ba8ca8bf0 100644 --- a/src/tabular.C +++ b/src/tabular.C @@ -25,7 +25,7 @@ #include "layout.h" #include "buffer.h" #include "BufferView.h" -#include "Painter.h" +#include "frontends/Painter.h" #include "LaTeXFeatures.h" #include "insets/insettabular.h" #include "insets/insettext.h" @@ -1461,8 +1461,10 @@ void LyXTabular::OldFormatRead(BufferParams const & bp, if (token.empty()) continue; if (token == "\\layout" - || token == "\\end_float" - || token == "\\end_deeper") { + || token == "\\end_float" // this should not exist anymore + || token == "\\end_inset" // as it is substituted by this + || token == "\\end_deeper") + { lex.pushToken(token); #ifndef NO_COMPABILITY // Here we need to insert the inset_ert_contents into the last @@ -1471,6 +1473,12 @@ void LyXTabular::OldFormatRead(BufferParams const & bp, #endif break; } +#ifndef NO_COMPABILITY + if (token == "\\newline") + // Here we need to insert the inset_ert_contents into the last + // cell of the tabular. + owner_->bufferOwner()->insertErtContents(par, pos, false); +#endif if (owner_->bufferOwner()->parseSingleLyXformat2Token(lex, par, return_par, token, pos, @@ -2403,7 +2411,7 @@ int LyXTabular::docBook(Buffer const * buf, ostream & os) const ret += docbookRow(buf, os, i); } } - os << "\n"; + os << "\n"; ++ret; } // output footer info