while investigating the SwXText::convertToFrame problem, it seemed that the duplication problem was really in SwDoc::MakeFlyAndMove or the methods it calls. so it turns out that the problem can be triggered in the UI just as well: 1. insert some text 2. Insert->Frame 3. insert some more text in body 4. set anchor to one of the variants below 5. convert body text to frame 6. result is not 2 but 3 frames a) anchored to paragraph at sel. start node, start node fully selected b) anchored to paragraph at sel. end node, end node selection not 0 c) anchored to character in sel. end node, index in selection b) and c) used to work in OOo 3.1.1 but were broken by CWS os131 => regression
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=91fab30f3b1617024ee2eadf3c7ad1ea84d7f6dd fdo#46482: prevent duplication of frames:
with the fix for bug 40599 this can now also be fixed by abusing the special redline move flag for the frame insert as well; it really could be cleaned up a bit to thread some flags through all these copy methods and not have it at the SwDoc, also the mbCopyIsMove seems to be somewhat related... fixed on master
Hi Michael, Thanks for this, now I guess the best would be to cherry-pick all 3 commits (9592f56323de27f9e1d890ee6259a5f4f328cbd3, 23e52c207760c596cc2f841ef59f3100c110d591 and 91fab30f3b1617024ee2eadf3c7ad1ea84d7f6dd) in one go to -3-5. Cédric?
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-3-5": http://cgit.freedesktop.org/libreoffice/core/commit/?id=2d5231041203f2471c4d2f052dde6f4808fa8344&g=libreoffice-3-5 fdo#46482: prevent duplication of frames: It will be available in LibreOffice 3.5.2.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-3-5-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=aa7eee949ad48085589863c4f2e16d27ab972fa2&g=libreoffice-3-5-1 fdo#46482: prevent duplication of frames: It will be available already in LibreOffice 3.5.1.