// now, because Inset::getLayout() will return a default-constructed
// InsetLayout, and that e.g. sets the foreground color to red. So we
// need to do some work to make that possible.
- InsetCollapsable const * icp = pars_[pit].inInset().asInsetCollapsable();
+ InsetCollapsable const * icp = owner_->asInsetCollapsable();
if (!icp)
return lf;
FontInfo icf = icp->getLayout().font();
// add a separate paragraph for the caption inset
pars.push_back(Paragraph());
- pars.back().setInsetOwner(&pars[0].inInset());
+ pars.back().setInsetOwner(&cur.text()->inset());
pars.back().setPlainOrDefaultLayout(tclass);
int cap_pit = pars.size() - 1;
// the graphics (or table).
if (!content) {
pars.push_back(Paragraph());
- pars.back().setInsetOwner(&pars[0].inInset());
+ pars.back().setInsetOwner(&cur.text()->inset());
pars.back().setPlainOrDefaultLayout(tclass);
}
align = par.params().align();
// handle alignment inside tabular cells
- Inset const & owner = par.inInset();
+ Inset const & owner = text_->inset();
switch (owner.contentAlignment()) {
case LYX_ALIGN_CENTER:
case LYX_ALIGN_LEFT:
++maxdesc;
ParagraphList const & pars = text_->paragraphs();
- Inset const & inset = par.inInset();
+ Inset const & inset = text_->inset();
// is it a top line?
if (first == 0 && topBottomSpace) {