Files
loongoffice/sw/qa/core/doc
Miklos Vajna feeaa5d3ca tdf#138604 sw textbox copy: fix missing fly frames of as-char draw frame
Regression from commit 682e0488df819c191c13a03758fad0690706e508
(tdf#134099 sw: fix textbox anchors on copy-paste and undo, 2020-06-29),
now that we don't copy draw+fly format pairs more than once, the fly frame
of a fly format was missing.

This was broken because
sw::DocumentContentOperationsManager::CopyFlyInFlyImpl() calls
CopyLayoutFormat() with bMakeFrames=true, but the frame format list
doesn't contain as-char frames.

For as-char frames CopyLayoutFormat() is called by
SwTextFlyCnt::CopyFlyFormat() instead, but with bMakeFrames=false, so
the fly frame's layout frame were never made.

Fix the problem by explicitly making frames in
DocumentLayoutManager::CopyLayoutFormat(), which also requires
delete+make in SwTextFlyCnt::SetAnchor(). [ This is now consistent with
the start of SwTextFlyCnt::SetAnchor(), which also deletes frames for
fly frame formats. Otherwise CppunitTest_sw_core_txtnode would crash in
testTextBoxCopyAnchor. ]

Change-Id: I87003ee09ca75b9fecd70a1aa5c42f762f715be8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114680
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-04-27 09:05:03 +02:00
..