-
-
-Paragraph * Paragraph::Pimpl::getParFromID(int id) const
-{
- InsetList::iterator cit = owner_->insetlist.begin();
- InsetList::iterator lend = owner_->insetlist.end();
- Paragraph * result;
- for (; cit != lend; ++cit) {
- if ((result = cit.getInset()->getParFromID(id)))
- return result;
- }
- return 0;
-}
-
-
-LyXFont const Paragraph::Pimpl::realizeFont(LyXFont const & font,
- BufferParams const & bparams) const
-{
- LyXFont tmpfont(font);
-
- // check for environment font information
- char par_depth = owner_->getDepth();
- Paragraph const * par = owner_;
- LyXTextClass const & tclass = bparams.getLyXTextClass();
-
- while (par && par->getDepth() && !tmpfont.resolved()) {
- par = par->outerHook();
- if (par) {
- tmpfont.realize(par->layout()->font);
- par_depth = par->getDepth();
- }
- }
-
- tmpfont.realize(tclass.defaultfont());
- return tmpfont;
-}