#include "BufferParams.h"
#include "Counters.h"
#include "Cursor.h"
-#include "support/debug.h"
#include "DispatchResult.h"
#include "Exporter.h"
#include "FuncRequest.h"
#include "TextClass.h"
#include "TocBackend.h"
+#include "support/debug.h"
#include "support/docstream.h"
#include "support/Translator.h"
docstring InsetNote::name() const
{
- return from_ascii(string("Note") + string(":") + string(notetranslator().find(params_.type)));
+ return from_ascii("Note:" + notetranslator().find(params_.type));
}
}
-void InsetNote::addToToc(TocList & toclist, Buffer const & buf, ParConstIterator const &) const
+void InsetNote::addToToc(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"];
- // FIXME: we probably want the note type too.
+ Toc & toc = buf.tocBackend().toc("note");
docstring str;
- str = getNewLabel(str);
+ str = notetranslator_loc().find(params_.type) + from_ascii(": ")
+ + getNewLabel(str);
toc.push_back(TocItem(pit, 0, str));
}