[Libreoffice-bugs] [Bug 135888] copy/paste of text boxes results in separate shape and text frame

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Aug 19 07:35:30 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=135888

--- Comment #3 from Miklos Vajna <vmiklos at collabora.com> ---
The original doc model I added was that a draw format and a fly format is
linked together to form a textbox in case they both have  RES_CNTNT that point
to the same content. This has the nice property that those node indexes are
automatically updated in many cases, unlike raw pointers.

Jan-Marek noticed some perf problems with this, since in case you have lots of
textboxes, then looking up all these pairs is O(N^2) (where N is the number of
frame formats in the special frame format array). So he added those raw
pointers in the SwFrameFormat class, to have faster way/cache to jump to the
"other" frame format (if there is any). Is it possible that at some stage we
update RES_CNTNT but not these newer pointers?

The reset/restoreLinks() code is only relevant for linked text frames. I.e.
imagine some corner case that you have 2 rounded rectangles and the text
content flows from the 1st to the 2nd one. Then you need the 2 draw formats for
the rounded corners, but the 2 fly formats will be linked fly frames.

Hope this helps.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200819/4f0216ed/attachment.htm>


More information about the Libreoffice-bugs mailing list