mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 02:28:35 +00:00
* InsetXXX::addToToc(): properly use passed ParConstIterator.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23015 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0a64dfa594
commit
d8ee26ec6c
@ -75,9 +75,11 @@ void InsetFoot::updateLabels(Buffer const & buf, ParIterator const & it)
|
||||
}
|
||||
|
||||
|
||||
void InsetFoot::addToToc(TocList & toclist, Buffer const & buf, ParConstIterator const &) const
|
||||
void InsetFoot::addToToc(TocList & toclist, Buffer const & buf,
|
||||
ParConstIterator const & cpit) const
|
||||
{
|
||||
ParConstIterator pit = par_const_iterator_begin(*this);
|
||||
ParConstIterator pit = cpit;
|
||||
pit.push_back(*this);
|
||||
|
||||
Toc & toc = toclist["footnote"];
|
||||
// FIXME: we probably want the footnote number too.
|
||||
|
@ -854,7 +854,7 @@ void InsetInclude::addPreview(graphics::PreviewLoader & ploader) const
|
||||
|
||||
|
||||
void InsetInclude::addToToc(TocList & toclist, Buffer const & buffer,
|
||||
ParConstIterator const & pit) const
|
||||
ParConstIterator const & cpit) const
|
||||
{
|
||||
if (isListings(params())) {
|
||||
InsetListingsParams p(to_utf8(params()["lstparams"]));
|
||||
@ -864,8 +864,8 @@ void InsetInclude::addToToc(TocList & toclist, Buffer const & buffer,
|
||||
Toc & toc = toclist["listing"];
|
||||
docstring const str = convert<docstring>(toc.size() + 1)
|
||||
+ ". " + from_utf8(caption);
|
||||
// This inset does not have a valid ParConstIterator
|
||||
// so it has to use the iterator of its parent paragraph
|
||||
ParConstIterator pit = cpit;
|
||||
pit.push_back(*this);
|
||||
toc.push_back(TocItem(pit, 0, str));
|
||||
return;
|
||||
}
|
||||
|
@ -61,9 +61,11 @@ void InsetIndex::write(Buffer const & buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetIndex::addToToc(TocList & toclist, Buffer const & buf, ParConstIterator const &) const
|
||||
void InsetIndex::addToToc(TocList & toclist, Buffer const & buf,
|
||||
ParConstIterator const & cpit) const
|
||||
{
|
||||
ParConstIterator pit = par_const_iterator_begin(*this);
|
||||
ParConstIterator pit = cpit;
|
||||
pit.push_back(*this);
|
||||
|
||||
Toc & toc = toclist["index"];
|
||||
docstring str;
|
||||
|
@ -79,9 +79,11 @@ int InsetMarginal::docbook(Buffer const & buf, odocstream & os,
|
||||
}
|
||||
|
||||
|
||||
void InsetMarginal::addToToc(TocList & toclist, Buffer const &/* buf*/, ParConstIterator const &) const
|
||||
void InsetMarginal::addToToc(TocList & toclist, Buffer const &/* buf*/,
|
||||
ParConstIterator const & cpit) const
|
||||
{
|
||||
ParConstIterator pit = par_const_iterator_begin(*this);
|
||||
ParConstIterator pit = cpit;
|
||||
pit.push_back(*this);
|
||||
|
||||
Toc & toc = toclist["marginalnote"];
|
||||
docstring str;
|
||||
|
@ -220,9 +220,11 @@ void InsetNote::updateLabels(Buffer const & buf, ParIterator const & it)
|
||||
}
|
||||
|
||||
|
||||
void InsetNote::addToToc(TocList & toclist, Buffer const & /*buf*/, ParConstIterator const &) const
|
||||
void InsetNote::addToToc(TocList & toclist, Buffer const & /*buf*/,
|
||||
ParConstIterator const & cpit) const
|
||||
{
|
||||
ParConstIterator pit = par_const_iterator_begin(*this);
|
||||
ParConstIterator pit = cpit;
|
||||
pit.push_back(*this);
|
||||
|
||||
Toc & toc = toclist["note"];
|
||||
docstring str;
|
||||
|
Loading…
Reference in New Issue
Block a user