#include "Buffer.h"
#include "BufferParams.h"
#include "Counters.h"
-#include "support/gettext.h"
#include "Layout.h"
// FIXME: the following is needed just to get the layout of the enclosing
// paragraph. This seems a bit too much to me (JMarc)
#include "support/debug.h"
#include "support/docstream.h"
+#include "support/gettext.h"
#include "support/lstrings.h"
-#include <ostream>
-
using namespace std;
namespace lyx {
}
-void InsetFoot::addToToc(ParConstIterator const & cpit) const
+void InsetFoot::addToToc(DocIterator const & cpit)
{
- ParConstIterator pit = cpit;
- pit.push_back(*this);
+ DocIterator pit = cpit;
+ pit.push_back(CursorSlice(*this));
Toc & toc = buffer().tocBackend().toc("footnote");
- // FIXME: we probably want the footnote number too.
docstring str;
str = custom_label_ + ": " + getNewLabel(str);
toc.push_back(TocItem(pit, 0, str));
+ // Proceed with the rest of the inset.
+ InsetFootlike::addToToc(cpit);
}