summaryrefslogtreecommitdiff
path: root/sw/CppunitTest_sw_uibase_dochdl.mk
AgeCommit message (Collapse)AuthorFilesLines
2020-05-21sw: prefer ODF over RTF when pasting from WriterMiklos Vajna1-0/+73
Regression from commit e9e6d4b058e13165f3dde1ca7822eec97dfe8aa7 (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). (cherry picked from commit 8ad0c29f56e5069a3679560d404b603332dcf38a) Conflicts: sw/Module_sw.mk Change-Id: Ida745bba65c5a210021cea0d267c02900fc6398a