diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-06-05 20:07:56 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-06-06 13:30:45 +0200 |
commit | 5a25d9252791409f5e73616ff752a9ae8227aaf7 (patch) | |
tree | 4b85da1e889776ea470a585dd561e09fde09d792 /basegfx | |
parent | f66d5331c1f55dfc88b1439f1b8e10ebe41d3f98 (diff) |
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 <vmiklos@collabora.com>
Diffstat (limited to 'basegfx')
0 files changed, 0 insertions, 0 deletions