]> git.lyx.org Git - features.git/commitdiff
correctly valign content of multirow cells
authorEdwin Leuven <e.leuven@gmail.com>
Tue, 13 Apr 2010 18:56:28 +0000 (18:56 +0000)
committerEdwin Leuven <e.leuven@gmail.com>
Tue, 13 Apr 2010 18:56:28 +0000 (18:56 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34129 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetTabular.cpp

index 7eafa7cae01839770e803a2dbd89d0db029ae03b..d75e2a6ffe5e7118150020044bb53d4d52359024 100644 (file)
@@ -1224,7 +1224,12 @@ int Tabular::textHOffset(idx_type cell) const
 
 int Tabular::textVOffset(idx_type cell) const
 {
-       return cellInfo(cell).voffset;
+       int voffset = cellInfo(cell).voffset;
+       if (isMultiRow(cell)) {
+               row_type const row = cellRow(cell);
+               voffset += (cellHeight(cell) - rowAscent(row) - rowDescent(row))/2; 
+       }
+       return voffset;
 }