The kind of patch I prefer: only removing code. Explanation: now that we use ParIterator to search for labels, insets should not do the work a second time.
Please test. JMarc
Index: src/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2353 diff -u -p -r1.2353 ChangeLog --- src/ChangeLog 9 Jan 2006 21:00:22 -0000 1.2353 +++ src/ChangeLog 10 Jan 2006 17:19:15 -0000 @@ -1,3 +1,7 @@ +2006-01-10 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * tabular.C (getLabelList): remove (not used anymore). + 2006-01-07 Georg Baum <[EMAIL PROTECTED]> * outputparams.[Ch]: add new flag inComment Index: src/tabular.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/tabular.C,v retrieving revision 1.229 diff -u -p -r1.229 tabular.C --- src/tabular.C 29 Dec 2005 10:03:38 -0000 1.229 +++ src/tabular.C 10 Jan 2006 17:19:15 -0000 @@ -2607,15 +2607,6 @@ void LyXTabular::validate(LaTeXFeatures } -void LyXTabular::getLabelList(Buffer const & buffer, - std::vector<string> & list) const -{ - for (row_type i = 0; i < rows_; ++i) - for (col_type j = 0; j < columns_; ++j) - getCellInset(i, j)->getLabelList(buffer, list); -} - - LyXTabular::BoxType LyXTabular::useParbox(idx_type cell) const { ParagraphList const & parlist = getCellInset(cell)->paragraphs(); Index: src/tabular.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/tabular.h,v retrieving revision 1.98 diff -u -p -r1.98 tabular.h --- src/tabular.h 28 Nov 2005 11:52:02 -0000 1.98 +++ src/tabular.h 10 Jan 2006 17:19:15 -0000 @@ -397,8 +397,6 @@ public: col_type columns() const { return columns_;} /// void validate(LaTeXFeatures &) const; - /// Appends \c list with all labels found within this inset. - void getLabelList(Buffer const &, std::vector<std::string> & list) const; /// //private: /// Index: src/insets/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v retrieving revision 1.1211 diff -u -p -r1.1211 ChangeLog --- src/insets/ChangeLog 9 Jan 2006 21:00:23 -0000 1.1211 +++ src/insets/ChangeLog 10 Jan 2006 17:19:15 -0000 @@ -1,3 +1,9 @@ +2006-01-10 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * insettext.C (getLabelList): + * insettabular.C (getLabelList): remove, since the ParIterator + already does the job of looking inside insets (bug 2188) + 2006-01-07 Georg Baum <[EMAIL PROTECTED]> * ExternalSupport.[Ch] (updateExternal): add external_in_comment flag Index: src/insets/insettabular.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettabular.C,v retrieving revision 1.493 diff -u -p -r1.493 insettabular.C --- src/insets/insettabular.C 28 Nov 2005 11:52:03 -0000 1.493 +++ src/insets/insettabular.C 10 Jan 2006 17:19:15 -0000 @@ -1689,13 +1689,6 @@ void InsetTabular::openLayoutDialog(Buff } -void InsetTabular::getLabelList(Buffer const & buffer, - vector<string> & list) const -{ - tabular.getLabelList(buffer, list); -} - - bool InsetTabular::copySelection(LCursor & cur) { if (!cur.selection()) Index: src/insets/insettabular.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettabular.h,v retrieving revision 1.209 diff -u -p -r1.209 insettabular.h --- src/insets/insettabular.h 17 Nov 2005 08:41:53 -0000 1.209 +++ src/insets/insettabular.h 10 Jan 2006 17:19:15 -0000 @@ -103,8 +103,6 @@ public: void openLayoutDialog(BufferView *) const; /// bool showInsetDialog(BufferView *) const; - /// Appends \c list with all labels found within this inset. - void getLabelList(Buffer const &, std::vector<std::string> & list) const; /// number of cells size_t nargs() const { return tabular.getNumberOfCells(); } /// Index: src/insets/insettext.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettext.C,v retrieving revision 1.622 diff -u -p -r1.622 insettext.C --- src/insets/insettext.C 21 Oct 2005 09:55:23 -0000 1.622 +++ src/insets/insettext.C 10 Jan 2006 17:19:15 -0000 @@ -323,20 +323,6 @@ bool InsetText::showInsetDialog(BufferVi } -void InsetText::getLabelList(Buffer const & buffer, - std::vector<string> & list) const -{ - ParagraphList::const_iterator pit = paragraphs().begin(); - ParagraphList::const_iterator pend = paragraphs().end(); - for (; pit != pend; ++pit) { - InsetList::const_iterator beg = pit->insetlist.begin(); - InsetList::const_iterator end = pit->insetlist.end(); - for (; beg != end; ++beg) - beg->inset->getLabelList(buffer, list); - } -} - - void InsetText::markNew(bool track_changes) { ParagraphList::iterator pit = paragraphs().begin(); Index: src/insets/insettext.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettext.h,v retrieving revision 1.277 diff -u -p -r1.277 insettext.h --- src/insets/insettext.h 10 Sep 2005 06:51:56 -0000 1.277 +++ src/insets/insettext.h 10 Jan 2006 17:19:15 -0000 @@ -97,8 +97,6 @@ public: void setViewCache(BufferView const * bv) const; /// bool showInsetDialog(BufferView *) const; - /// Appends \c list with all labels found within this inset. - void getLabelList(Buffer const &, std::vector<std::string> & list) const; /// LyXText * getText(int i) const { return (i == 0) ? const_cast<LyXText*>(&text_) : 0;