svx: fix import of multiple paragraphs into title shapes
commit41792f205d0de94c81bae511c9707ca0052135f4
authorMiklos Vajna <vmiklos@collabora.com>
Fri, 12 Feb 2021 16:22:57 +0000 (12 17:22 +0100)
committerMiklos Vajna <vmiklos@collabora.com>
Mon, 15 Feb 2021 13:28:25 +0000 (15 14:28 +0100)
tree9171d6f93f1a7e458f31375e1a85d054c2cb9880
parenta7fc4a7f1be6842b0455a50f74d4869788e6018f
svx: fix import of multiple paragraphs into title shapes

Title shapes try hard to have a single paragraph only, the Impress UI
inserts linebreaks instead of paragraphs breaks in
sd::FuText::KeyInput(), ever since commit
f47a9d9db3d06927380bb79b04bb6d4721a92d2b (initial import, 2000-09-18).
This matches the PowerPoint behavior. This is most visible when the
paragraph has a bullet associated with it.

Interestingly you can still put multiple paragraphs into title shapes
using paste special -> plain text.

In that case, it was inconsistent that we exported these multiple
paragraphs to ODP, but merged them to a single paragraph on import since
commit 0a783c1a041e2b74b7bf238d11ee2c303f6708f4 (#100190# don't allow
more then one paragraph on title text objects, 2002-06-25).

This results in loosing your bullets on save + open, both in the ODP and
PPTX cases, since removeActionLock() on the XShape triggers this tweak.
Also, PowerPoint does not do this merging on import. So fix the problem
by removing the import-time tweak but leave the UI unchanged.

(cherry picked from commit 043690eff82d5798774452a8364e1566b866a320)

Conflicts:
svx/source/unodraw/unoshtxt.cxx

Change-Id: I6796f83c40e83f65cfb0f6c7e66069c3e08c1e2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110935
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
svx/qa/unit/unodraw.cxx
svx/source/unodraw/unoshtxt.cxx