fdo#77725 LO not able to open/save file when exported multiple times.

Problem description:
The LO is not able to save the file if exported multiple times and the exported file is used as input.
The main root cause is Extra Line breaks getting added even though there is no text available.

Change-Id: I0afb52380912cae140d7ded694cb7cae9a8362a9
Reviewed-on: https://gerrit.libreoffice.org/9112
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>