]> git.lyx.org Git - features.git/commitdiff
Fix framed notes lyx2lyx.
authorRichard Heck <rgheck@comcast.net>
Sun, 1 Jun 2008 01:45:19 +0000 (01:45 +0000)
committerRichard Heck <rgheck@comcast.net>
Sun, 1 Jun 2008 01:45:19 +0000 (01:45 +0000)
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

lib/lyx2lyx/lyx_1_6.py

index 976fb87d81fb940a256e372c6039905f57a0c77b..e6158202c85a05710b3d81eab551fe187b7b254c 100644 (file)
@@ -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):