]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTabular.cpp
correctly valign content of multirow cells
[lyx.git] / 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;
 }