rev26385: don't know why but some file were not committed...

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26387 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-09-13 20:19:32 +00:00
parent d88caf97cb
commit d81071086f
4 changed files with 18 additions and 21 deletions

View File

@ -1304,9 +1304,9 @@ bool Text::read(Buffer const & buf, Lexer & lex,
lex.pushToken(token);
Paragraph par;
par.setInsetOwner(insetPtr);
par.params().depth(depth);
par.setFont(0, Font(inherit_font, buf.params().language));
par.setInsetOwner(insetPtr);
pars_.push_back(par);
// FIXME: goddamn InsetTabular makes us pass a Buffer

View File

@ -90,8 +90,7 @@ FontInfo Text::layoutFont(Buffer const & buffer, 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.
Inset const * inset = pars_[pit].inInset();
InsetCollapsable const * icp = inset? inset->asInsetCollapsable() : 0;
InsetCollapsable const * icp = pars_[pit].inInset().asInsetCollapsable();
if (!icp)
return lf;
FontInfo icf = icp->getLayout().font();
@ -119,8 +118,7 @@ FontInfo Text::labelFont(Buffer const & buffer, Paragraph const & par) const
if (layout.labelfont.family() == INHERIT_FAMILY)
lf.setFamily(buffer.params().getFont().fontInfo().family());
// FIXME As above....
Inset const * inset = par.inInset();
InsetCollapsable const * icp = inset? inset->asInsetCollapsable() : 0;
InsetCollapsable const * icp = par.inInset().asInsetCollapsable();
if (!icp)
return lf;
FontInfo icf = icp->getLayout().labelfont();

View File

@ -1401,7 +1401,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(&pars[0].inInset());
pars.back().setPlainOrDefaultLayout(tclass);
int cap_pit = pars.size() - 1;
@ -1410,7 +1410,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(&pars[0].inInset());
pars.back().setPlainOrDefaultLayout(tclass);
}

View File

@ -551,19 +551,18 @@ void TextMetrics::computeRowMetrics(pit_type const pit,
align = par.params().align();
// handle alignment inside tabular cells
if (Inset const * owner = par.inInset()) {
switch (owner->contentAlignment()) {
case LYX_ALIGN_CENTER:
case LYX_ALIGN_LEFT:
case LYX_ALIGN_RIGHT:
if (align == LYX_ALIGN_NONE
|| align == LYX_ALIGN_BLOCK)
align = owner->contentAlignment();
break;
default:
// unchanged (use align)
break;
}
Inset const & owner = par.inInset();
switch (owner.contentAlignment()) {
case LYX_ALIGN_CENTER:
case LYX_ALIGN_LEFT:
case LYX_ALIGN_RIGHT:
if (align == LYX_ALIGN_NONE
|| align == LYX_ALIGN_BLOCK)
align = owner.contentAlignment();
break;
default:
// unchanged (use align)
break;
}
// Display-style insets should always be on a centred row
@ -1916,7 +1915,7 @@ int TextMetrics::leftMargin(int max_width,
&& align == LYX_ALIGN_BLOCK
&& !par.params().noindent()
// in some insets, paragraphs are never indented
&& !(par.inInset() && par.inInset()->neverIndent())
&& !par.inInset().neverIndent()
// display style insets are always centered, omit indentation
&& !(!par.empty()
&& par.isInset(pos)