From: Angus Leeming Date: Fri, 19 Dec 2003 10:22:02 +0000 (+0000) Subject: (Georg): fix lyx2lyx conversion of InsetBox. X-Git-Tag: 1.6.10~15634 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=8962f163c50cabaf3e6237eef82afaa6c3658da5;p=features.git (Georg): fix lyx2lyx conversion of InsetBox. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8267 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/lyx2lyx/ChangeLog b/lib/lyx2lyx/ChangeLog index a0bf0c0ea7..6f17be1774 100644 --- a/lib/lyx2lyx/ChangeLog +++ b/lib/lyx2lyx/ChangeLog @@ -1,3 +1,8 @@ +2003-12-18 Georg Baum + + * lyxrevert_228.py: fix box status conversion + * lyxconvert_227.py: ditto + 2003-12-16 José Matos * lyxrevert_228.py: fix sys import. diff --git a/lib/lyx2lyx/lyxconvert_227.py b/lib/lyx2lyx/lyxconvert_227.py index 056f7f153f..89c5fa907f 100644 --- a/lib/lyx2lyx/lyxconvert_227.py +++ b/lib/lyx2lyx/lyxconvert_227.py @@ -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"): diff --git a/lib/lyx2lyx/lyxrevert_228.py b/lib/lyx2lyx/lyxrevert_228.py index b02252022a..646b0f4d0d 100644 --- a/lib/lyx2lyx/lyxrevert_228.py +++ b/lib/lyx2lyx/lyxrevert_228.py @@ -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