On Thu, 2005-11-10 at 18:08 +0100, Jean-Marc Lasgouttes wrote: > >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> Anyway this is a great idea at this point. The cost is a small > Martin> constant instead of linear with doc size. > > Martin> Tested and works. OK to go in? > > I'd rather see the patch first. > > You may want to > BOOST_ASSERT(&pars_[pit] == par); > and/or > BOOST_ASSERT(pit >=0 && pit < pars_.size());
Why not both. Good idea, and still works :-) Actually by now this is more your patch than mine. Why don't you commit it? - Martin
Index: text2.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v retrieving revision 1.634 diff -u -p -r1.634 text2.C --- text2.C 25 Oct 2005 09:14:11 -0000 1.634 +++ text2.C 10 Nov 2005 17:35:09 -0000 @@ -190,6 +190,13 @@ LyXFont LyXText::getFont(Paragraph const if (!isMainText()) applyOuterFont(font); + pit_type pit = &par - &pars_[0]; + BOOST_ASSERT(&pars_[pit] == &par); + BOOST_ASSERT(pit >=0 && pit < pars_.size()); + // Realize against environment font information + if (pit < pars_.size()) + font.realize(outerFont(pit, pars_)); + // Realize with the fonts of lesser depth. font.realize(defaultfont_);
signature.asc
Description: This is a digitally signed message part