The status flag is not converted between file formats 227 and 228, because
it is not the first parameter. The attached fixes that.

Georg
Index: lib/lyx2lyx/ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/lib/lyx2lyx/ChangeLog,v
retrieving revision 1.13
diff -u -p -r1.13 ChangeLog
--- lib/lyx2lyx/ChangeLog	2003/12/16 09:57:48	1.13
+++ lib/lyx2lyx/ChangeLog	2003/12/18 21:17:31
@@ -1,3 +1,8 @@
+2003-12-18  Georg Baum  <[EMAIL PROTECTED]>
+
+	* lyxrevert_228.py: fix box status conversion
+	* lyxconvert_227.py: dito
+
 2003-12-16  José Matos  <[EMAIL PROTECTED]>
 
 	* lyxrevert_228.py: fix sys import.
Index: lib/lyx2lyx/lyxconvert_227.py
===================================================================
RCS file: /cvs/lyx/lyx-devel/lib/lyx2lyx/lyxconvert_227.py,v
retrieving revision 1.2
diff -u -p -r1.2 lyxconvert_227.py
--- lib/lyx2lyx/lyxconvert_227.py	2003/12/16 08:15:47	1.2
+++ lib/lyx2lyx/lyxconvert_227.py	2003/12/18 21:17:32
@@ -33,8 +33,12 @@ def convert_collapsable(lines):
         if i == -1:
             break
 
-        # We are interested in the next line
-        i = i + 1
+        if lines[i][:16] == "\\begin_inset Box":
+            # Skip box parameters
+            i = i + 10
+        else:
+            # We are interested in the next line
+            i = i + 1
         if (lines[i] == "collapsed false"):
             lines[i] = "status open"
         elif (lines[i] == "collapsed true"):
Index: lib/lyx2lyx/lyxrevert_228.py
===================================================================
RCS file: /cvs/lyx/lyx-devel/lib/lyx2lyx/lyxrevert_228.py,v
retrieving revision 1.2
diff -u -p -r1.2 lyxrevert_228.py
--- lib/lyx2lyx/lyxrevert_228.py	2003/12/16 09:57:48	1.2
+++ lib/lyx2lyx/lyxrevert_228.py	2003/12/18 21:17:33
@@ -33,8 +33,12 @@ def convert_collapsable(lines):
         if i == -1:
             break
 
-        # We are interested in the next line
-        i = i + 1
+        if lines[i][:16] == "\\begin_inset Box":
+            # Skip box parameters
+            i = i + 10
+        else:
+            # We are interested in the next line
+            i = i + 1
         if (lines[i] == "status open"):
             lines[i] = "collapsed false"
         elif (lines[i] == "status collapsed" or

Reply via email to