office-gobmx/sw/qa/uibase
Miklos Vajna 8ad0c29f56 sw: prefer ODF over RTF when pasting from Writer
Regression from commit e9e6d4b058
(tdf#116685: Make the RICHTEXT take precedence over EMBED_SOURCE.,
2019-09-26), the problem was that now we always prefer RTF over ODF when
pasting into Writer. The commit made sense for Calc->Writer paste, but
it causes formatting loss for Writer -> Writer paste.

The exact use-case was copy&paste of numberings where the pasted content
got paragraph indent as direct formatting, so shift-tab at the paragraph
start changed only the bullet type, not the indentation -- but it's easy
to imagine several other cases where a roundtrip via ODF provides better
results than RTF.

Fix the problem by leaving the above commit in place, but extending
SwTransferable::Paste() so that it prefers ODF over RTF in case of a
Writer->Writer paste (and leaves the non-Writer -> Writer paste behavior
unchanged to avoid the unwanted OLE objects).

Change-Id: Ida745bba65c5a210021cea0d267c02900fc6398a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92705
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2020-04-22 20:08:20 +02:00
..
dochdl
shells