#include "lyxvc.h"
#include "texrow.h"
#include "vc-backend.h"
+#include "toc.h"
#include "frontends/Alert.h"
string const file = makeDisplayPath(tname, 50);
string const text = bformat(_("The specified document template\n%1$s\ncould not be read."), file);
Alert::error(_("Could not read template"), text);
- // no template, start with empty buffer
+ bufferlist.release(b);
+ return 0;
}
}
pos_end);
} while (found && id_start == id_end && pos_start == pos_end);
- buf.error(ErrorItem(cit->error_desc, cit->error_text,
- id_start, pos_start, pos_end));
+ buf.addError(ErrorItem(cit->error_desc,
+ cit->error_text, id_start, pos_start, pos_end));
}
}
void bufferErrors(Buffer const & buf, ErrorList const & el)
{
- for_each(el.begin(), el.end(), bind(ref(buf.error), _1));
+ buf.setErrorList(el);
}
ParIterator & it)
{
if (it == par_iterator_end(buf.inset()))
- return true;
-
+ return false;
+
+// if (it.lastpit == 0 && LyXText::isMainText())
+// return false;
+
switch (it->layout()->labeltype) {
case LABEL_NO_LABEL:
// set the counter for this paragraph
setLabel(buf, it);
}
+
+ lyx::toc::updateToc(buf);
}