Bug 46482 - insert frame duplicates existing frames anchored at start/end paragraph
Summary: insert frame duplicates existing frames anchored at start/end paragraph
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:3.6.0 target:3.5.1
Keywords: regression
Depends on: 40599
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-22 14:10 UTC by Michael Stahl (allotropia)
Modified: 2018-04-06 14:03 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Stahl (allotropia) 2012-02-22 14:10:01 UTC
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
Comment 1 Not Assigned 2012-02-22 15:10:53 UTC
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:
Comment 2 Michael Stahl (allotropia) 2012-02-22 15:24:35 UTC
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
Comment 3 Miklos Vajna 2012-02-23 00:26:01 UTC
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?
Comment 4 Not Assigned 2012-02-23 07:23:37 UTC
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.
Comment 5 Not Assigned 2012-02-24 06:25:22 UTC
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.