On Tue, Oct 21, 2003 at 04:54:07PM +0100, Jose' Matos spake thusly: > On Tuesday 21 October 2003 17:03, Martin Vermeer wrote: > > > Assertion triggered in InsetOld* Paragraph::getInset(int) by failing > > > check "pos < size()" in file paragraph.C:296 > > > > Just to make sure: does this include this afternoons's commit? > > Yes, and it happens not matter the frontend I am using (as it should btw. > :-) > > I sent you the file in another message. :-) > > > - Martin
Thanks! That'll teach me to be over-confident. The attached will work for your file José. Please try it on some other files too... if there's any '...a bit silly' messages I want to hear about it. (As John said, this is hell.) (There are now 'dont like' messages... what to think of those?) If nobody shouts, I'l check this in tomorrow morning. So LyX CVS works again... - Martin
Index: text.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text.C,v retrieving revision 1.467 diff -u -p -r1.467 text.C --- text.C 21 Oct 2003 13:04:13 -0000 1.467 +++ text.C 21 Oct 2003 21:33:55 -0000 @@ -739,15 +739,17 @@ pos_type LyXText::rowBreakPoint(Paragrap if (point == last || chunkwidth >= width - left) { if (pos < i) { point = i - 1; - break; + break; // exit on last registered breakpoint } } + if (i + 1 < last) + break; // emergency exit } if (!in || in->isChar()) { // some insets are line separators too if (pit->isLineSeparator(i)) { - point = i; + point = i; // register breakpoint chunkwidth = 0; } } @@ -1465,7 +1467,8 @@ void LyXText::prepareToPrint(ParagraphLi // Display-style insets should always be on a centred row // The test on pit->size() is to catch zero-size pars, which // would trigger the assert in Paragraph::getInset(). - inset = pit->size() ? pit->getInset(rit->pos()) : 0; + //inset = pit->size() ? pit->getInset(rit->pos()) : 0; + inset = pit->isInset(rit->pos()) ? pit->getInset(rit->pos()) : 0; if (inset && inset->display()) { align = LYX_ALIGN_CENTER; } Index: insets/insetbibitem.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetbibitem.h,v retrieving revision 1.16 diff -u -p -r1.16 insetbibitem.h --- insets/insetbibitem.h 17 Oct 2003 18:01:12 -0000 1.16 +++ insets/insetbibitem.h 21 Oct 2003 21:33:56 -0000 @@ -41,6 +41,9 @@ public: /// EDITABLE editable() const { return IS_EDITABLE; } /// + bool display() const { return false; } + + /// InsetOld::Code lyxCode() const { return InsetOld::BIBITEM_CODE; } /// keep .lyx format compatible bool directWrite() const { return true; } Index: insets/insetcite.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcite.h,v retrieving revision 1.42 diff -u -p -r1.42 insetcite.h --- insets/insetcite.h 17 Oct 2003 18:01:12 -0000 1.42 +++ insets/insetcite.h 21 Oct 2003 21:33:56 -0000 @@ -40,6 +40,8 @@ public: int latex(Buffer const &, std::ostream &, LatexRunParams const &) const; /// + virtual bool display() const { return false; } + /// dispatch_result localDispatch(FuncRequest const & cmd); /// void validate(LaTeXFeatures &) const;
pgp00000.pgp
Description: PGP signature