mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
Get rid of some Paragraph::inInset() access.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30953 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9e6c9ecbe4
commit
2bf63aa652
@ -85,7 +85,7 @@ FontInfo Text::layoutFont(pit_type const pit) const
|
||||
// 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();
|
||||
|
@ -1685,7 +1685,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
|
||||
// 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;
|
||||
|
||||
@ -1694,7 +1694,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
@ -576,7 +576,7 @@ void TextMetrics::computeRowMetrics(pit_type const pit,
|
||||
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:
|
||||
@ -1041,7 +1041,7 @@ Dimension TextMetrics::rowHeight(pit_type const pit, pos_type const first,
|
||||
++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) {
|
||||
|
Loading…
Reference in New Issue
Block a user