Bug 122589 - FILESAVE: RTF: section at document start creates extra, empty section
Summary: FILESAVE: RTF: section at document start creates extra, empty section
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:6.3.0 target:6.2.1
Keywords:
Depends on:
Blocks: RTF Section
  Show dependency treegraph
 
Reported: 2019-01-09 07:10 UTC by Justin L
Modified: 2019-07-19 14:33 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
rtfSections.odt: bibisect43all suggests extra empty section inherited from OOo (14.57 KB, application/vnd.oasis.opendocument.text)
2019-01-09 07:10 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2019-01-09 07:10:12 UTC
Created attachment 148158 [details]
rtfSections.odt: bibisect43all suggests extra empty section inherited from OOo

If the document starts with a defined section, then on export to RTF, it adds a continuous section break before the first paragraph. Both Word and LO load this as a blank paragraph at the top of the document.

Steps to reproduce:
-create a two paragraph document
-select the first paragraph and "insert section"
-save and RTF and reload.

This is different from bug 122456 which describes extra sections added at the bottom. Interestingly, this time the extra section is not cumulative. Even though the new section at the start of the document is a "true" section, it doesn't force the creation of another section on each round-trip.
Comment 1 Dieter 2019-01-09 11:43:08 UTC
I confirm the bug, saving the attachment as RTF and reopening it

Version: 6.3.0.0.alpha0+ (x64)
Build ID: ffa5b8a82eab18041bbee4d6914892b82c7801d3
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-12-19_03:24:54
Locale: en-US (de_DE); UI-Language: en-US
Calc: threaded
Comment 2 Justin L 2019-01-09 12:11:44 UTC
proposed fix at https://gerrit.libreoffice.org/66017
Comment 3 Commit Notification 2019-01-11 19:02:45 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/5b19be032c51e0f7489b29c2c98e484587ed0865%5E%21

tdf#122589 rtfexport: no duplicate section at document start

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2019-01-31 09:30:24 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/7ac09bb923708c82b2cb9a22ef3c9190c5b5b060%5E%21

tdf#122589 rtfexport: no duplicate section at document start

It will be available in 6.2.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Dieter 2019-07-19 14:33:30 UTC
Verified with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 2f2f4767089512c34514896bc37823f9310e9dd4
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-07-10_02:13:57
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

Thanks for fixing it, Justin.