>>>>> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes:

Andre> This is supposed to handle directly the case of insertion of a
Andre> single paragraph far from the end of the document.

Andre> While I cannot see anything getting worse, the par id still go
Andre> up quickly. More precisely, the id of the first par of the
Andre> UserGuide is 6183. Hit enter on the first line, then go down to
Andre> the par now containing the "The LyX User Guide" heading. With
Andre> this patch it has id 10294, without 12300 + x. So while there
Andre> is some improvement this does not seem to be the only problem.

What I do not understand is why we use std::swap. Is that some clever
C++ idiom? For example SwitchBetweenLayouts does

        InsetText in;
        std::swap(in.paragraphs(), pars);

        // layouts
        ParIterator end = par_iterator_end(in);
        for (ParIterator it = par_iterator_begin(in); it != end; ++it) {
[... etc ...]

        std::swap(in.paragraphs(), pars);

So why don't we just remove these swap calls and be done with it?

JMarc

Reply via email to