// Paste it!
if (empty) {
- pars.insert(lyx::next(pars.begin(), pit),
- insertion.begin(),
- insertion.end());
+ pars.insert(pars.iterator_at(pit),
+ insertion.begin(), insertion.end());
// merge the empty par with the last par of the insertion
mergeParagraph(buffer.params(), pars,
pit + insertion.size() - 1);
} else {
- pars.insert(lyx::next(pars.begin(), pit + 1),
- insertion.begin(),
- insertion.end());
+ pars.insert(pars.iterator_at(pit + 1),
+ insertion.begin(), insertion.end());
// merge the first par of the insertion with the current par
mergeParagraph(buffer.params(), pars, pit);
LASSERT(startpit != endpit || start <= end, return);
// Clone the paragraphs within the selection.
- ParagraphList copy_pars(lyx::next(pars.begin(), startpit),
- lyx::next(pars.begin(), endpit + 1));
+ ParagraphList copy_pars(pars.iterator_at(startpit),
+ pars.iterator_at(endpit + 1));
// Remove the end of the last paragraph; afterwards, remove the
// beginning of the first paragraph. Keep this order - there may only
return selList;
for (auto const & cut : theCuts) {
- // we do not use cit-> here because gcc 2.9x does not
- // like it (JMarc)
ParagraphList const & pars = cut.first;
docstring textSel;
for (auto const & para : pars) {
theClipboard().hasTextContents(Clipboard::LyXTextType)) {
string lyx = theClipboard().getAsLyX();
if (!lyx.empty()) {
- // For some strange reason gcc 3.2 and 3.3 do not accept
- // Buffer buffer(string(), false);
- Buffer buffer("", false);
+ Buffer buffer(string(), false);
buffer.setUnnamed(true);
if (buffer.readString(lyx)) {
cur.recordUndo();
docstring text = theClipboard().getAsText(types[i]);
available = !text.empty();
if (available) {
- // For some strange reason gcc 3.2 and 3.3 do not accept
- // Buffer buffer(string(), false);
- Buffer buffer("", false);
+ Buffer buffer(string(), false);
buffer.setUnnamed(true);
available = buffer.importString(names[i], text, errorList);
if (available)
// Insert the new string
pos_type pos = cur.selEnd().pos();
Paragraph & par = cur.selEnd().paragraph();
- for (auto const & c : str)
+ for (auto const & c : str) {
par.insertChar(pos, c, font, cur.buffer()->params().track_changes);
+ ++pos;
+ }
// Cut the selection
cutSelection(cur, false);