ParIterator fend = par_iterator_end(in);
for (; fpit != fend; ++fpit) {
- InsetList::iterator lit = fpit->insetlist.begin();
- InsetList::iterator eit = fpit->insetlist.end();
+ InsetList::const_iterator lit = fpit->insetlist.begin();
+ InsetList::const_iterator eit = fpit->insetlist.end();
for (; lit != eit; ++lit) {
switch (lit->inset->lyxCode()) {
textclass, errorList);
updateLabels(cur.buffer());
cur.clearSelection();
- text->setCursor(cur, ppp.first, ppp.second);
+ text->setCursor(cur.top(), ppp.first, ppp.second);
}
// mathed is handled in InsetMathNest/InsetMathGrid
// simple replacing. The font of the first selected character is used
-void replaceSelectionWithString(LCursor & cur, string const & str, bool backwards)
+void replaceSelectionWithString(LCursor & cur, docstring const & str, bool backwards)
{
recordUndo(cur);
DocIterator selbeg = cur.selectionBegin();
// Insert the new string
pos_type pos = cur.selEnd().pos();
Paragraph & par = cur.selEnd().paragraph();
- string::const_iterator cit = str.begin();
- string::const_iterator end = str.end();
+ docstring::const_iterator cit = str.begin();
+ docstring::const_iterator end = str.end();
for (; cit != end; ++cit, ++pos)
- par.insertChar(pos, (*cit), font, cur.buffer().params().trackChanges);
+ par.insertChar(pos, *cit, font, cur.buffer().params().trackChanges);
// Cut the selection
cutSelection(cur, true, false);