]> git.lyx.org Git - features.git/commitdiff
Support old tables format 1.
authorJosé Matox <jamatos@lyx.org>
Fri, 8 Jul 2005 09:13:51 +0000 (09:13 +0000)
committerJosé Matox <jamatos@lyx.org>
Fri, 8 Jul 2005 09:13:51 +0000 (09:13 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10150 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/ChangeLog
lib/lyx2lyx/lyx_0_12.py

index fd9b28f0bd88e6b91e85352ba12c3b492b66ad64..6c750a30be2de720acd1a522d44d0fed9cad08b4 100644 (file)
@@ -1,3 +1,7 @@
+2005-07-08  José Matos  <jamatos@lyx.org>
+
+       * lyx_0_12.py (update_tabular): Support old tables format 1.
+
 2005-07-08  José Matos  <jamatos@lyx.org>
 
        * lyx_1_1_5.py (latexdel_getargs, update_ref, update_latexdel):
index 043746de06e15f9a93e87ab6fb8920269c115b82..bb89fb57bd6da6707cc88fe80c13dcea9400d103 100644 (file)
@@ -46,7 +46,7 @@ def formula_inset_space_eat(file):
         i = i + 1
 
 
-# Update from tabular format 2 to 4
+# Update from tabular format 1 or 2 to 4
 def update_tabular(file):
     lines = file.body
     lyxtable_re = re.compile(r".*\\LyXTable$")
@@ -56,7 +56,7 @@ def update_tabular(file):
         if i == -1:
             break
         i = i + 1
-        format = lines[i][8]
+        format = lines[i][8:]
 
         lines[i]='multicol4'
         i = i + 1
@@ -74,10 +74,13 @@ def update_tabular(file):
             lines[i] = lines[i] + ' '
             i = i + 1
 
-        while lines[i]:
+        while string.strip(lines[i]):
+            if not format:
+                lines[i] = lines[i] + ' 1 1'
             lines[i] = lines[i] + ' 0 0 0'
             i = i + 1
 
+        lines[i] = string.strip(lines[i])
 
 def final_dot(file):
     lines = file.body