From f6848c168b5025e080b0c9218f6f0b9012a4660f Mon Sep 17 00:00:00 2001 From: Martin Vermeer Date: Thu, 20 Apr 2006 07:43:29 +0000 Subject: [PATCH] * lyx_1_4.py (convert_minipage): Proper handling of default height and vertical position (bug report Garst Reese) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13697 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/lyx2lyx/lyx_1_4.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/lyx2lyx/lyx_1_4.py b/lib/lyx2lyx/lyx_1_4.py index 82e8bc169e..8d3cd05e61 100644 --- a/lib/lyx2lyx/lyx_1_4.py +++ b/lib/lyx2lyx/lyx_1_4.py @@ -987,10 +987,10 @@ def convert_minipage(file): # convert the inner_position if file.body[i][:14] == "inner_position": - file.body[i] = 'inner_pos "%s"' % inner_pos[int(file.body[i][15])] + innerpos = inner_pos[int(file.body[i][15])] + del file.body[i] else: - file.body.insert('inner_pos "%s"' % inner_pos[0]) - i = i + 1 + innerpos = inner_pos[0] # We need this since the new file format has a height and width # in a different order. @@ -1018,6 +1018,12 @@ def convert_minipage(file): else: status = "collapsed" + # Handle special default case: + if height == ' "1pt"' and innerpos == 'c': + innerpos = 't' + + file.body.insert(i, 'inner_pos "' + innerpos + '"') + i = i + 1 file.body.insert(i, 'use_parbox 0') i = i + 1 file.body.insert(i, 'width' + width) -- 2.39.5