}
// Update all other entries.
- for (; it != fontlist.end(); ++it)
+ FontList::iterator fend = fontlist.end();
+ for (; it != fend; ++it)
--(*it).pos;
// Update the inset table.
InsetTable search_inset(pos, 0);
+ InsetList::iterator lend = insetlist.end();
for (InsetList::iterator it =
upper_bound(insetlist.begin(),
- insetlist.end(),
+ lend,
search_inset, matchIT());
- it != insetlist.end(); ++it)
+ it != lend; ++it)
--(*it).pos;
#ifndef NEW_INSETS
} else {
bool LyXParagraph::InsertInsetAllowed(Inset * inset)
{
- lyxerr << "LyXParagraph::InsertInsetAllowed" << endl;
+ //lyxerr << "LyXParagraph::InsertInsetAllowed" << endl;
if (inset_owner)
return inset_owner->InsertInsetAllowed(inset);
result->inset_owner = inset_owner;
// ale970302
- result->bibkey = (bibkey) ? new InsetBibKey(bibkey): 0;
-
+ if (bibkey)
+ result->bibkey = static_cast<InsetBibKey *>(bibkey->Clone());
+ else
+ result->bibkey = 0;
// copy everything behind the break-position to the new paragraph