From 3803473627714917dcb5597015d1edcadd77c27f Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Tue, 3 Jun 2008 11:33:13 +0000 Subject: [PATCH] Fix toc generation after rev25096. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25097 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetBranch.cpp | 2 ++ src/insets/InsetCaption.cpp | 3 +++ src/insets/InsetFoot.cpp | 2 ++ src/insets/InsetIndex.cpp | 2 ++ src/insets/InsetMarginal.cpp | 2 ++ src/insets/InsetNote.cpp | 2 ++ src/insets/InsetText.cpp | 5 ----- 7 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp index d8b2fd7cbc..02537c05f6 100644 --- a/src/insets/InsetBranch.cpp +++ b/src/insets/InsetBranch.cpp @@ -279,6 +279,8 @@ void InsetBranch::addToToc(DocIterator const & cpit) Toc & toc = buffer().tocBackend().toc("branch"); docstring const str = params_.branch + ": " + text_.getPar(0).asString(); toc.push_back(TocItem(pit, 0, str)); + // Proceed with the rest of the inset. + InsetCollapsable::addToToc(cpit); } diff --git a/src/insets/InsetCaption.cpp b/src/insets/InsetCaption.cpp index 7dca728ee8..b00588f0b4 100644 --- a/src/insets/InsetCaption.cpp +++ b/src/insets/InsetCaption.cpp @@ -113,6 +113,9 @@ void InsetCaption::addToToc(DocIterator const & cpit) Toc & toc = buffer().tocBackend().toc(type_); docstring const str = full_label_ + ". " + text_.getPar(0).asString(); toc.push_back(TocItem(pit, 0, str)); + + // Proceed with the rest of the inset. + InsetText::addToToc(cpit); } diff --git a/src/insets/InsetFoot.cpp b/src/insets/InsetFoot.cpp index 9b5e1f65a8..708eb3d1f8 100644 --- a/src/insets/InsetFoot.cpp +++ b/src/insets/InsetFoot.cpp @@ -73,6 +73,8 @@ void InsetFoot::addToToc(DocIterator const & cpit) docstring str; str = custom_label_ + ": " + getNewLabel(str); toc.push_back(TocItem(pit, 0, str)); + // Proceed with the rest of the inset. + InsetFootlike::addToToc(cpit); } diff --git a/src/insets/InsetIndex.cpp b/src/insets/InsetIndex.cpp index 9733467679..d56fa4a5b1 100644 --- a/src/insets/InsetIndex.cpp +++ b/src/insets/InsetIndex.cpp @@ -102,6 +102,8 @@ void InsetIndex::addToToc(DocIterator const & cpit) docstring str; str = getNewLabel(str); toc.push_back(TocItem(pit, 0, str)); + // Proceed with the rest of the inset. + InsetCollapsable::addToToc(cpit); } diff --git a/src/insets/InsetMarginal.cpp b/src/insets/InsetMarginal.cpp index d9deba880a..9a21a89a78 100644 --- a/src/insets/InsetMarginal.cpp +++ b/src/insets/InsetMarginal.cpp @@ -75,6 +75,8 @@ void InsetMarginal::addToToc(DocIterator const & cpit) docstring str; str = getNewLabel(str); toc.push_back(TocItem(pit, 0, str)); + // Proceed with the rest of the inset. + InsetFootlike::addToToc(cpit); } } // namespace lyx diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp index c44d637a56..92c44eec17 100644 --- a/src/insets/InsetNote.cpp +++ b/src/insets/InsetNote.cpp @@ -231,6 +231,8 @@ void InsetNote::addToToc(DocIterator const & cpit) str = notetranslator_loc().find(params_.type) + from_ascii(": ") + getNewLabel(str); toc.push_back(TocItem(pit, 0, str)); + // Proceed with the rest of the inset. + InsetCollapsable::addToToc(cpit); } diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 89216ba1c9..3ac62e8f2d 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -426,11 +426,6 @@ ParagraphList & InsetText::paragraphs() } -//void InsetInclude::addToToc(DocIterator const & cpit) -//{ -//} - - void InsetText::updateLabels(ParIterator const & it) { ParIterator it2 = it; -- 2.39.2