From bc5fd28ddf4b6df28a19546972a3a201442266e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Thu, 28 Jan 2010 08:33:14 +0000 Subject: [PATCH] * InsetTabular.{cpp, h}: - implement addToToc (bug 6372). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33240 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetTabular.cpp | 10 ++++++++++ src/insets/InsetTabular.h | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 902814a723..e8db353e8e 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -3418,6 +3418,16 @@ void InsetTabular::updateLabels(ParIterator const & it, UpdateType utype) } +void InsetTabular::addToToc(DocIterator const & cpit) +{ + DocIterator dit = cpit; + dit.forwardPos(); + size_t const end = dit.nargs(); + for ( ; dit.idx() < end; dit.top().forwardIdx()) + cell(dit.idx())->addToToc(cpit); +} + + void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) { LYXERR(Debug::DEBUG, "# InsetTabular::doDispatch: cmd: " << cmd diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h index bc72937741..47b9aa4c60 100644 --- a/src/insets/InsetTabular.h +++ b/src/insets/InsetTabular.h @@ -835,8 +835,10 @@ public: Inset * editXY(Cursor & cur, int x, int y); /// can we go further down on mouse click? bool descendable(BufferView const &) const { return true; } - // Update the counters of this inset and of its contents + /// Update the counters of this inset and of its contents void updateLabels(ParIterator const &, UpdateType); + /// + void addToToc(DocIterator const &); /// bool completionSupported(Cursor const &) const; -- 2.39.5