Fix toc generation after rev25096.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25097 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-06-03 11:33:13 +00:00
parent c99463ebfc
commit 3803473627
7 changed files with 13 additions and 5 deletions

View File

@ -279,6 +279,8 @@ void InsetBranch::addToToc(DocIterator const & cpit)
Toc & toc = buffer().tocBackend().toc("branch"); Toc & toc = buffer().tocBackend().toc("branch");
docstring const str = params_.branch + ": " + text_.getPar(0).asString(); docstring const str = params_.branch + ": " + text_.getPar(0).asString();
toc.push_back(TocItem(pit, 0, str)); toc.push_back(TocItem(pit, 0, str));
// Proceed with the rest of the inset.
InsetCollapsable::addToToc(cpit);
} }

View File

@ -113,6 +113,9 @@ void InsetCaption::addToToc(DocIterator const & cpit)
Toc & toc = buffer().tocBackend().toc(type_); Toc & toc = buffer().tocBackend().toc(type_);
docstring const str = full_label_ + ". " + text_.getPar(0).asString(); docstring const str = full_label_ + ". " + text_.getPar(0).asString();
toc.push_back(TocItem(pit, 0, str)); toc.push_back(TocItem(pit, 0, str));
// Proceed with the rest of the inset.
InsetText::addToToc(cpit);
} }

View File

@ -73,6 +73,8 @@ void InsetFoot::addToToc(DocIterator const & cpit)
docstring str; docstring str;
str = custom_label_ + ": " + getNewLabel(str); str = custom_label_ + ": " + getNewLabel(str);
toc.push_back(TocItem(pit, 0, str)); toc.push_back(TocItem(pit, 0, str));
// Proceed with the rest of the inset.
InsetFootlike::addToToc(cpit);
} }

View File

@ -102,6 +102,8 @@ void InsetIndex::addToToc(DocIterator const & cpit)
docstring str; docstring str;
str = getNewLabel(str); str = getNewLabel(str);
toc.push_back(TocItem(pit, 0, str)); toc.push_back(TocItem(pit, 0, str));
// Proceed with the rest of the inset.
InsetCollapsable::addToToc(cpit);
} }

View File

@ -75,6 +75,8 @@ void InsetMarginal::addToToc(DocIterator const & cpit)
docstring str; docstring str;
str = getNewLabel(str); str = getNewLabel(str);
toc.push_back(TocItem(pit, 0, str)); toc.push_back(TocItem(pit, 0, str));
// Proceed with the rest of the inset.
InsetFootlike::addToToc(cpit);
} }
} // namespace lyx } // namespace lyx

View File

@ -231,6 +231,8 @@ void InsetNote::addToToc(DocIterator const & cpit)
str = notetranslator_loc().find(params_.type) + from_ascii(": ") str = notetranslator_loc().find(params_.type) + from_ascii(": ")
+ getNewLabel(str); + getNewLabel(str);
toc.push_back(TocItem(pit, 0, str)); toc.push_back(TocItem(pit, 0, str));
// Proceed with the rest of the inset.
InsetCollapsable::addToToc(cpit);
} }

View File

@ -426,11 +426,6 @@ ParagraphList & InsetText::paragraphs()
} }
//void InsetInclude::addToToc(DocIterator const & cpit)
//{
//}
void InsetText::updateLabels(ParIterator const & it) void InsetText::updateLabels(ParIterator const & it)
{ {
ParIterator it2 = it; ParIterator it2 = it;