John Levon <[EMAIL PROTECTED]> writes: >> Index: buffer.h >> =================================================================== >> RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer.h,v >> retrieving revision 1.116 >> diff -u -r1.116 buffer.h >> --- buffer.h 21 Oct 2002 16:21:52 -0000 1.116 >> +++ buffer.h 29 Oct 2002 21:56:07 -0000 >> @@ -400,9 +392,9 @@ >> } >> >> /// >> - ParIterator par_iterator_begin(); >> + ParIterator par_iterator_begin() const; >> /// >> - ParIterator par_iterator_end(); >> + ParIterator par_iterator_end() const;
I am not quite sure about these changes. Could we wait with them? >> Index: toc.C >> =================================================================== >> RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/toc.C,v >> retrieving revision 1.12 >> diff -u -r1.12 toc.C >> --- toc.C 24 Sep 2002 18:36:19 -0000 1.12 >> +++ toc.C 29 Oct 2002 21:56:38 -0000 >> @@ -28,6 +28,7 @@ >> #include "insets/insetfloat.h" >> #include "insets/insetwrap.h" >> #include "debug.h" >> +#include "iterators.h" >> >> using std::vector; >> using std::max; >> @@ -72,11 +73,14 @@ >> TocList toclist; >> if (!buf) >> return toclist; >> - Paragraph * par = &*(buf->paragraphs.begin()); >> >> LyXTextClass const & textclass = buf->params.getLyXTextClass(); >> >> - while (par) { >> + ParIterator pit = buf->par_iterator_begin(); >> + ParIterator end = buf->par_iterator_end(); >> + for (; pit != end; ++pit) { >> + Paragraph * par = *pit; >> + >> #ifdef WITH_WARNINGS >> #warning bogus type (Lgb) >> #endif >> @@ -106,8 +110,6 @@ >> il->addToToc(toclist, buf); >> } >> } >> - >> - par = par->next(); >> } >> return toclist; >> } This looks ok. -- Lgb