From: Georg Baum Date: Sun, 12 Dec 2010 14:33:34 +0000 (+0000) Subject: increase tex2lyx output format to 265 X-Git-Tag: 2.0.0~1404 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=c0b20c1c92da3832d3f941120100fd95fa3f7755;p=features.git increase tex2lyx output format to 265 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36841 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/tex2lyx/table.cpp b/src/tex2lyx/table.cpp index d23db7088a..dddf71df6a 100644 --- a/src/tex2lyx/table.cpp +++ b/src/tex2lyx/table.cpp @@ -203,7 +203,8 @@ char const HLINE = '\004'; /*! * Move the information in leftlines, rightlines, align and valign to the * special field. This is necessary if the special field is not empty, - * because LyX ignores leftlines, rightlines, align and valign in this case. + * because LyX ignores leftlines > 1, rightlines > 1, align and valign in + * this case. */ void ci2special(ColInfo & ci) { @@ -235,12 +236,13 @@ void ci2special(ColInfo & ci) } else ci.special += ci.align; - for (int i = 0; i < ci.leftlines; ++i) + // LyX can only have one left and one right line. + for (int i = 1; i < ci.leftlines; ++i) ci.special.insert(0, "|"); - for (int i = 0; i < ci.rightlines; ++i) + for (int i = 1; i < ci.rightlines; ++i) ci.special += '|'; - ci.leftlines = 0; - ci.rightlines = 0; + ci.leftlines = min(ci.leftlines, 1); + ci.rightlines = min(ci.rightlines, 1); ci.align = 'n'; ci.valign = 'n'; } diff --git a/src/tex2lyx/tex2lyx.h b/src/tex2lyx/tex2lyx.h index 0d7444319f..0549f5d1bb 100644 --- a/src/tex2lyx/tex2lyx.h +++ b/src/tex2lyx/tex2lyx.h @@ -114,7 +114,7 @@ extern CommandMap known_math_environments; /// extern bool noweb_mode; /// LyX format that is created by tex2lyx -int const LYX_FORMAT = 264; +int const LYX_FORMAT = 265; /// path of the master .tex file extern std::string getMasterFilePath();