-
Miklos Vajna yazdı
Regression from commit 50223ea6 (tdf#98987 sw: add AddVerticalFrameOffsets compat mode, 2016-03-31), the problem was that vertical position of the shape was wrong after mouse move, even if we attempted to take fly frames of the paragraph into account. (Similar situation is when saving and loading the file; which is much easier to test.) Fly frames are created as the text frames is formatted, and then SwTextFrame::CalcBaseOfstForFly() can calculate the vertical offset correctly. But in the "move with mouse" case SwToContentAnchoredObjectPosition::CalcPosition() was invoked by the time the old flys of the text frame were already removed, but the new ones were not yet added. Solve the problem by formatting the text frame from SwAnchoredDrawObject::MakeObjPosAnchoredAtPara() (if any of its validity flags are set to false) -- this is expected to be safe, as the object formatter is invoked by SwLayAction::FormatContent(), i.e. there is no recursive SwFrame::Calc() call here. Change-Id: I95851874e3da3f50f304421537c6743e04bdfc7b Reviewed-on: https://gerrit.libreoffice.org/67490Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
961ba62d