This patch fixes bug 2131: lyx2lyx writes ERT bits in wrong format. The
reason for this bug is the misnamed function convert_frameless_box, it
should be revert_frameless_box ;-(

OK to apply?


Georg
diff -p -r -U 3 -X excl.tmp lyx-1.4-clean/lib/lyx2lyx/ChangeLog lyx-1.4-cvs/lib/lyx2lyx/ChangeLog
--- lyx-1.4-clean/lib/lyx2lyx/ChangeLog	2005-10-13 20:30:00.000000000 +0200
+++ lyx-1.4-cvs/lib/lyx2lyx/ChangeLog	2005-11-20 13:02:18.643943272 +0100
@@ -1,3 +1,8 @@
+2005-11-20  Georg Baum  <[EMAIL PROTECTED]>
+
+	* lyx_1_4.py (convert_frameless_box): fix file format argument of
+	insert_ert
+
 2005-10-12  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
 
 	* LyX.py: enlarge range to current format (245);
diff -p -r -U 3 -X excl.tmp lyx-1.4-clean/lib/lyx2lyx/lyx_1_4.py lyx-1.4-cvs/lib/lyx2lyx/lyx_1_4.py
--- lyx-1.4-clean/lib/lyx2lyx/lyx_1_4.py	2005-10-13 20:30:01.000000000 +0200
+++ lyx-1.4-cvs/lib/lyx2lyx/lyx_1_4.py	2005-11-20 13:01:25.372041832 +0100
@@ -1557,7 +1557,7 @@ def convert_frameless_box(file):
             ert = ert + '\\let\\endminipage\\endlyxtolyxminipage%\n'
 
             old_i = i
-            i = insert_ert(file.body, i, 'Collapsed', ert, file.format + 1)
+            i = insert_ert(file.body, i, 'Collapsed', ert, file.format - 1)
             j = j + i - old_i - 1
 
             file.body[i:i] = ['\\begin_inset Minipage',
@@ -1578,7 +1578,7 @@ def convert_frameless_box(file):
             ert = '\\let\\minipage\\lyxtolyxrealminipage%\n'
             ert = ert + '\\let\\endminipage\\lyxtolyxrealendminipage%'
             old_i = i
-            i = insert_ert(file.body, i, 'Collapsed', ert, file.format + 1)
+            i = insert_ert(file.body, i, 'Collapsed', ert, file.format - 1)
             j = j + i - old_i - 1
 
             # Redefine the minipage end before the inset end.
@@ -1586,7 +1586,7 @@ def convert_frameless_box(file):
             file.body[j:j] = ['\\layout Standard', '', '']
             j = j + 2
             ert = '\\let\\endminipage\\endlyxtolyxminipage'
-            j = insert_ert(file.body, j, 'Collapsed', ert, file.format + 1)
+            j = insert_ert(file.body, j, 'Collapsed', ert, file.format - 1)
 	    j = j + 1
             file.body.insert(j, '')
 	    j = j + 1
@@ -1597,7 +1597,7 @@ def convert_frameless_box(file):
                 ert = '}%\n'
             else:
                 ert = '\\end{lyxtolyxrealminipage}%\n'
-            j = insert_ert(file.body, j, 'Collapsed', ert, file.format + 1)
+            j = insert_ert(file.body, j, 'Collapsed', ert, file.format - 1)
 
             # We don't need to restore the original minipage after the inset
             # end because the scope of the redefinition is the original box.

Reply via email to