On Mon, Aug 12, 2002 at 05:33:44PM +0200, Lars Gullik Bjønnes wrote: > Martin Vermeer <[EMAIL PROTECTED]> writes: > > | Index: buffer.C > | =================================================================== > | RCS file: /cvs/lyx/lyx-devel/src/buffer.C,v > | retrieving revision 1.367 > | diff -u -p -r1.367 buffer.C > | --- buffer.C 2002/08/12 00:15:16 1.367 > | +++ buffer.C 2002/08/12 14:09:34 > | @@ -3859,6 +3869,10 @@ bool Buffer::isMultiLingual() > | return false; > | } > | > | +Counters & Buffer::counters() const > | +{ > | + return ctrs; > | +} > > Huh... how many tabs do you want?
? Did I write that? :-) > > | Buffer::inset_iterator::inset_iterator(Paragraph * paragraph, pos_type pos) > | : par(paragraph) > | Index: buffer.h > | =================================================================== > | RCS file: /cvs/lyx/lyx-devel/src/buffer.h,v > | retrieving revision 1.107 > | diff -u -p -r1.107 buffer.h > | --- buffer.h 2002/08/12 00:15:17 1.107 > | +++ buffer.h 2002/08/12 14:09:34 > | @@ -317,6 +318,11 @@ public: > | > | /// Used when typesetting to place errorboxes. > | TexRow texrow; > | + /// Buffer-wide counter array > | + Counters & counters() const; > | + /// > | + mutable Counters ctrs; > > and make it private then please. If you say it works, sure. > | private: > | /// is save needed > | mutable bool lyx_clean; > | Index: paragraph_pimpl.h > | =================================================================== > | RCS file: /cvs/lyx/lyx-devel/src/paragraph_pimpl.h,v > | retrieving revision 1.16 > | diff -u -p -r1.16 paragraph_pimpl.h > | --- paragraph_pimpl.h 2002/08/11 20:34:20 1.16 > | +++ paragraph_pimpl.h 2002/08/12 14:09:38 > | @@ -145,8 +145,7 @@ struct Paragraph::Pimpl { > | static unsigned int paragraph_id; > | /// > | ParagraphParameters params; > | - /// > | - Counters ctrs; > | + > > Nah... no blank line here. > > | private: > | /// match a string against a particular point in the paragraph > | bool isTextAt(string const & str, lyx::pos_type pos) const; > | Index: text2.C > | =================================================================== > | RCS file: /cvs/lyx/lyx-devel/src/text2.C,v > | retrieving revision 1.246 > | diff -u -p -r1.246 text2.C > | --- text2.C 2002/08/12 00:15:17 1.246 > | +++ text2.C 2002/08/12 14:09:46 > | par->params().appendix(true); > | - par->counters().reset(); > | + buf->counters().reset(""); > > Why are you changing back something I just changed? Because it crashed... see Angus' comment. > I kindo like it since it makes things simpler. > I am aware of the overhead of this solution, but I guess we can live > with that. I would bet that this has less CPU overhead when editing in the middle of a document. Only when editing at the end, we may lose. And even then I doubt it is significant. > At least until we are able to move counters and labels out > into the layout files. That would be the way to go. But as the changelog shows, I am reluctant to do brain surgery on this muddlehead as it stands. Let's simplify a bit first. > -- > Lgb > Martin
msg42536/pgp00000.pgp
Description: PGP signature