mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 21:05:12 +00:00
fix 568 (r=lars)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5555 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
aeafc7d616
commit
eb2352f227
@ -1,3 +1,8 @@
|
||||
2002-10-30 John Levon <levon@movementarian.org>
|
||||
|
||||
* insetfloat.C (addToTOC): recursively traverse all
|
||||
contents looking for captions (fix #568)
|
||||
|
||||
2002-10-25 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* insetexternal.C (doSubstitution): do not try to replace
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "frontends/LyXView.h"
|
||||
#include "frontends/Dialogs.h"
|
||||
#include "lyxlex.h"
|
||||
#include "iterators.h"
|
||||
|
||||
using std::ostream;
|
||||
using std::endl;
|
||||
@ -339,11 +340,13 @@ bool InsetFloat::wide() const
|
||||
|
||||
void InsetFloat::addToToc(toc::TocList & toclist, Buffer const * buf) const
|
||||
{
|
||||
// Now find the caption in the float...
|
||||
// We now tranverse the paragraphs of
|
||||
// the inset...
|
||||
Paragraph * tmp = inset.paragraph();
|
||||
while (tmp) {
|
||||
ParIterator pit(inset.paragraph());
|
||||
ParIterator end;
|
||||
|
||||
// Find a caption layout in one of the (child inset's) pars
|
||||
for (; pit != end; ++pit) {
|
||||
Paragraph * tmp = *pit;
|
||||
|
||||
if (tmp->layout()->name() == caplayout) {
|
||||
string const str =
|
||||
tostr(toclist[type()].size() + 1)
|
||||
@ -351,6 +354,5 @@ void InsetFloat::addToToc(toc::TocList & toclist, Buffer const * buf) const
|
||||
toc::TocItem const item(tmp, 0 , str);
|
||||
toclist[type()].push_back(item);
|
||||
}
|
||||
tmp = tmp->next();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user