]> git.lyx.org Git - features.git/commitdiff
increase tex2lyx output format to 265
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 12 Dec 2010 14:33:34 +0000 (14:33 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 12 Dec 2010 14:33:34 +0000 (14:33 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36841 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/table.cpp
src/tex2lyx/tex2lyx.h

index d23db7088a1bd700bc85be7a7ca5db4b4c671c59..dddf71df6a7eeb0221b8e5b7c1b3fea1cd8808bb 100644 (file)
@@ -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';
 }
index 0d7444319f00af718892becce5b9415c87f9dcba..0549f5d1bb04e7b58b373538a939bead78bc9a4e 100644 (file)
@@ -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();