int new_width = 0;
for(row_type r = 0; r < nrows(); ++r) {
idx_type const i = cellIndex(r, c);
- if (columnSpan(i) == 1)
- if (getAlignment(i) == LYX_ALIGN_DECIMAL)
+ if (columnSpan(i) == 1) {
+ if (getAlignment(i) == LYX_ALIGN_DECIMAL
+ && cell_info[r][c].decimal_width!=0)
new_width = max(new_width, cellInfo(i).width
+ max_dwidth[c] - cellInfo(i).decimal_width);
else
new_width = max(new_width, cellInfo(i).width);
+ }
}
if (column_info[c].width != new_width) {
int max_dhoffset = 0;
for(row_type r = 0; r < row_info.size() ; ++r) {
idx_type const i = cellIndex(r, c);
- if (getAlignment(i) == LYX_ALIGN_DECIMAL)
+ if (getAlignment(i) == LYX_ALIGN_DECIMAL
+ && cellInfo(i).decimal_width != 0)
max_dhoffset = max(max_dhoffset, cellInfo(i).decimal_hoffset);
}
x += max_dhoffset - cellInfo(cell).decimal_hoffset;
// we center in multicol when no decimal point
ismulticol |= ((column_info[c].alignment == LYX_ALIGN_DECIMAL)
- && (cellInfo(cell).decimal_width == 0) || isMultiRow(cell));
+ && (cellInfo(cell).decimal_width == 0));
// up counter by 1 for each decimally aligned col since they use 2 latex cols
int latexcolspan = columnSpan(cell);
: OutputParams::ALIGNED;
if (getAlignment(cell) == LYX_ALIGN_DECIMAL
- && cellInfo(cell).decimal_width != 0 && !isMultiRow(cell)) {
+ && cellInfo(cell).decimal_width != 0) {
// copy cell and split in 2
InsetTableCell head = InsetTableCell(*cellInset(cell).get());
head.getText(0)->setMacrocontextPosition(
// determine horiz offset because of decimal align (if necessary)
int decimal_hoffset = 0;
int decimal_width = 0;
- if ((tabular.column_info[c].alignment == LYX_ALIGN_DECIMAL)
- && !tabular.isMultiColumn(cell)
- && !tabular.isMultiRow(cell)) {
+ 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(