}
+Toc & TocBackend::toc(string const & type)
+{
+ return tocs_[type];
+}
+
+
void TocBackend::updateItem(ParConstIterator const & par_it)
{
if (toc("tableofcontents").empty()) {
InsetList::const_iterator end = pit->insetList().end();
for (; it != end; ++it) {
Inset & inset = *it->inset;
- inset.addToToc(tocs_, *buffer_, pit);
+ inset.addToToc(*buffer_, pit);
switch (inset.lyxCode()) {
case OPTARG_CODE: {
if (!tocstring.empty())
--it;
ParConstIterator par_it_text = par_it;
- if (par_it_text.inMathed())
- // It would be better to do
- // par_it_text.backwardInset();
- // but this method does not exist.
+ if (par_it_text.inMathed()) {
+ // We are only interested in text so remove the math CursorSlice.
while (par_it_text.inMathed())
- par_it_text.backwardPos();
+ par_it_text.pop_back();
+ }
for (; it != last; --it) {
// We verify that we don't compare contents of two