On 04/22/2011 01:46 PM, Edwin Leuven wrote:
Richard Heck<rgh...@comcast.net> wrote:
Same crash with a footnote there. So it looks
as if for some reason insets inside cells are not
getting their macro context set properly.
which is done in lines 3453-3473 of insettabular.cpp:
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);
tail.getText(0)->setMacrocontextPosition(
head.getText(0)->macrocontextPosition());
tail.setBuffer(head.buffer());
Dimension dim1;
head.metrics(m, dim1);
decimal_hoffset = dim1.width();
if (hassep) {
tail.metrics(m, dim1);
decimal_width = dim1.width();
}
}
I don't know very much about this. Why does the macro context have to be
set specially in this case?
Anyway, the simplest file that crashes has nothing but a 1x1 table with
the sole cell set to decimal alignment. Inset a footnote and boom.
Richard