X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftabular.C;h=eae53660711a8fe4c323e176fa63c252b4d111f5;hb=1bb197b5d4821404cfe11509c71d1f8de7cee711;hp=7f05319dbdf454f72bca1bde9462e9287e1c771e;hpb=be1bd533f37a3eb73b915c83edd55a7afab1f144;p=lyx.git diff --git a/src/tabular.C b/src/tabular.C index 7f05319dbd..eae5366071 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" @@ -40,6 +40,7 @@ #include #include +using std::abs; using std::ostream; using std::istream; using std::getline; @@ -1448,7 +1449,8 @@ void LyXTabular::OldFormatRead(BufferParams const & bp, Paragraph * par = new Paragraph; Paragraph * return_par = 0; - par->layout(textclasslist[bp.textclass].defaultLayoutName()); + par->layout(textclasslist[bp.textclass].defaultLayout()); + string tmptok; int pos = 0; Paragraph::depth_type depth = 0; @@ -1461,7 +1463,8 @@ void LyXTabular::OldFormatRead(BufferParams const & bp, if (token.empty()) continue; if (token == "\\layout" - || token == "\\end_float" + || token == "\\end_float" // this should not exist anymore + || token == "\\end_inset" // as it is substituted by this || token == "\\end_deeper") { lex.pushToken(token); @@ -2360,7 +2363,7 @@ int LyXTabular::docbookRow(Buffer const * buf, ostream & os, int row) const } os << ">"; - ret += GetCellInset(cell)->docbook(buf, os); + ret += GetCellInset(cell)->docbook(buf, os, true); os << "\n"; ++cell; } @@ -2369,7 +2372,8 @@ int LyXTabular::docbookRow(Buffer const * buf, ostream & os, int row) const } -int LyXTabular::docBook(Buffer const * buf, ostream & os) const +int LyXTabular::docbook(Buffer const * buf, ostream & os, + bool /*mixcont*/) const { int ret = 0; @@ -2410,7 +2414,7 @@ int LyXTabular::docBook(Buffer const * buf, ostream & os) const ret += docbookRow(buf, os, i); } } - os << "\n"; + os << "\n"; ++ret; } // output footer info