From: José Matox Date: Fri, 8 Jul 2005 09:13:51 +0000 (+0000) Subject: Support old tables format 1. X-Git-Tag: 1.6.10~14163 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b666ae90e33426db17eb771ae5ea25037a721046;p=lyx.git Support old tables format 1. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10150 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/lyx2lyx/ChangeLog b/lib/lyx2lyx/ChangeLog index fd9b28f0bd..6c750a30be 100644 --- a/lib/lyx2lyx/ChangeLog +++ b/lib/lyx2lyx/ChangeLog @@ -1,3 +1,7 @@ +2005-07-08 José Matos + + * lyx_0_12.py (update_tabular): Support old tables format 1. + 2005-07-08 José Matos * lyx_1_1_5.py (latexdel_getargs, update_ref, update_latexdel): diff --git a/lib/lyx2lyx/lyx_0_12.py b/lib/lyx2lyx/lyx_0_12.py index 043746de06..bb89fb57bd 100644 --- a/lib/lyx2lyx/lyx_0_12.py +++ b/lib/lyx2lyx/lyx_0_12.py @@ -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