void InsetText::clear()
{
ParagraphList & pars = paragraphs();
- LASSERT(!pars.empty(), /**/);
+ LBUFERR(!pars.empty());
// This is a gross hack...
Layout const & old_layout = pars.begin()->layout();
if (toclevel != Layout::NOT_IN_TOC && toclevel >= min_toclevel) {
// insert this into the table of contents
docstring tocstring;
+ int const length = doing_output ? INT_MAX : TOC_ENTRY_LENGTH;
if (arginset) {
tocstring = par.labelString();
if (!tocstring.empty())
tocstring += ' ';
- arginset->text().forToc(tocstring, TOC_ENTRY_LENGTH);
+ arginset->text().forToc(tocstring, length);
} else
- par.forToc(tocstring, TOC_ENTRY_LENGTH);
+ par.forToc(tocstring, length);
dit.pos() = 0;
toc.push_back(TocItem(dit, toclevel - min_toclevel,
- tocstring, output_active, tocstring));
+ tocstring, doing_output, tocstring));
}
// And now the list of changes.
// find text inset in old cursor
Cursor insetCur = old;
int scriptSlice = insetCur.find(this);
- LASSERT(scriptSlice != -1, /**/);
+ // we can try to continue here. returning true means
+ // the cursor is "now" invalid. which it was.
+ LASSERT(scriptSlice != -1, return true);
insetCur.cutOff(scriptSlice);
- LASSERT(&insetCur.inset() == this, /**/);
+ LASSERT(&insetCur.inset() == this, return true);
// update the old paragraph's words
insetCur.paragraph().updateWords();
bool InsetText::completionSupported(Cursor const & cur) const
{
- //LASSERT(&cur.bv().cursor().inset() != this, return false);
+ //LASSERT(&cur.bv().cursor().inset() == this, return false);
return text_.completionSupported(cur);
}