From: Richard Heck Date: Sun, 1 Jun 2008 01:45:19 +0000 (+0000) Subject: Fix framed notes lyx2lyx. X-Git-Tag: 1.6.10~4592 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d70f3a1f3b22aa64e3a1cdfa4a88e67201ff3423;p=features.git Fix framed notes lyx2lyx. Note that this is a mechanical fix. Someone should check that it works. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25034 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/lyx2lyx/lyx_1_6.py b/lib/lyx2lyx/lyx_1_6.py index 976fb87d81..e6158202c8 100644 --- a/lib/lyx2lyx/lyx_1_6.py +++ b/lib/lyx2lyx/lyx_1_6.py @@ -1319,14 +1319,20 @@ def convert_framed_notes(document): i = 0 while 1: i = find_tokens(document.body, ["\\begin_inset Note Framed", "\\begin_inset Note Shaded"], i) - if i == -1: return - document.body[i] = document.body[i].replace("\\begin_inset Note", "\\begin_inset Box") - document.body.insert(i + 1, 'position "t"\nhor_pos "c"\nhas_inner_box 0\ninner_pos "t"\n' \ - 'use_parbox 0\nwidth "100col%"\nspecial "none"\nheight "1in"\n' \ - 'height_special "totalheight"') - i = i + 1 + subst = [document.body[i].replace("\\begin_inset Note", "\\begin_inset Box"), + 'position "t"', + 'hor_pos "c"', + 'has_inner_box 0' + 'inner_pos "t"', + 'use_parbox 0', + 'width "100col%"', + 'special "none"', + 'height "1in"', + 'height_special "totalheight"'] + document.body[i:i+1] = subst + i = i + 9 def convert_module_names(document):