summaryrefslogtreecommitdiff
path: root/sw/source/uibase/inc/toxmgr.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2025-03-24 08:40:40 +0100
committerMiklos Vajna <vmiklos@collabora.com>2025-03-24 16:37:43 +0100
commitdb541619cb1ca83598ec479eb9f52e559a8fe72d (patch)
tree9d1fb2df64748fb1c864417ee081a94848f3ec01 /sw/source/uibase/inc/toxmgr.hxx
parent4da4617266bc816256b6c1d898046ab51080af35 (diff)
cool#11357 sw redline reinstate: handle a single rich delete
In case the cursor is inside a delete redline (single-paragraph, plain text), then .uno:ReinstateTrackedChange works for that change. If the change contains formatting, then that formatting is not copied to the insertion. This is simply because SwEditShell::ReinstatePaM() gets the content of the delete redline as an OUString. Doing a rich copy would preserve formatting, but then sw::DocumentContentOperationsManager::CopyImplImpl() would use lcl_DeleteRedlines() to strip away content which is inside a delete redline, so that won't work out of the box, either. Fix the problem by copying the content of the delete redline to a clipboard doc and inserting from there, and by introducing a new bDeleteRedlines flag (defaults to true). When that flag is off, the copy does what we need here: it preserves formatting, but doesn't strip away content which was originally inside a delete redline. Go via SwTransferable instead of invoking sw::DocumentContentOperationsManager::CopyRange() directly, because this way the inserted content will be inside an insert redline & we get working undo/redo out of the box. Change-Id: Id853844b7282c6b1c36cb0f4f8cc75d968e53dcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183270 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source/uibase/inc/toxmgr.hxx')
0 files changed, 0 insertions, 0 deletions