+ // determine horiz offset because of decimal align (if necessary)
+ int decimal_hoffset = 0;
+ int decimal_width = 0;
+ if (tabular.getAlignment(cell) == LYX_ALIGN_DECIMAL) {
+ // make a copy which we will split in 2
+ InsetTableCell head = InsetTableCell(*tabular.cellInset(cell).get());
+ head.getText(0)->setMacrocontextPosition(
+ tabular.cellInset(cell)->getText(0)->macrocontextPosition());
+ head.setBuffer(tabular.buffer());
+ // split in 2 and calculate width of each part
+ bool hassep = false;
+ InsetTableCell tail =
+ splitCell(head, tabular.column_info[c].decimal_point, hassep);
+ Dimension dim1;
+ head.metrics(m, dim1);
+ decimal_hoffset = dim1.width();
+ if (hassep) {
+ tail.metrics(m, dim1);
+ decimal_width = dim1.width();
+ }
+ }
+ tabular.cell_info[r][c].decimal_hoffset = decimal_hoffset;
+ tabular.cell_info[r][c].decimal_width = decimal_width;
+
+ // with LYX_VALIGN_BOTTOM the descent is relative to the last par
+ // = descent of text in last par + TEXT_TO_INSET_OFFSET:
+ int const lastpardes = tm.last().second->descent()
+ + TEXT_TO_INSET_OFFSET;
+ int offset = 0;