https://bugs.documentfoundation.org/show_bug.cgi?id=118888
BogdanB <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |g Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #12 from BogdanB <[email protected]> --- Fixed in LibreOffice 7.6.0 by commit 5a25d9252791409f5e73616ff752a9ae8227aaf7 Author: Miklos Vajna <[email protected]> Date: Mon Jun 5 20:07:56 2023 +0200 tdf#140066 sw: fix bad position of textbox after anchor type change + undo The bugdoc has a to-char anchored textbox. Changing the ancor type + undo resulted in a new textbox position, which is not expected. This is a problem since 7596e26fd259ce5445212949403e7cd32303b2bd (Add SwTextBoxHelper::findShapes, 2014-06-24), previously the codepath was not hit, since shape + content from DOCX was a fly format, not a draw format + fly format. Looking at the undo item implementation, in SwUndoFormatAttr::RestoreFlyAnchor(), aDrawSavePt is initialized from the old format (that we try to restore on undo), so in case that already matches aFormatPos (which is initialized from the new format / doc model), then adjusting the same position looks safe to skip, and that solves our problem as well. The whole problem area could be avoided if the draw layer would store absolute positions in its undo actions, because then it would be harder to get the abs Writer and the rel Draw undo actions out of sync, but that would a larger rework. Change-Id: Ia1c9f486e54f5967a34a1a269f8d234ae96d5bb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152627 Tested-by: Jenkins Reviewed-by: Miklos Vajna <[email protected]> -- You are receiving this mail because: You are the assignee for the bug.
