Bug 99100

Summary: DOC import: STYLEREF not imported even in case it can be mapped to chapter field
Product: LibreOffice Reporter: Miklos Vajna <vmiklos>
Component: WriterAssignee: Miklos Vajna <vmiklos>
Status: RESOLVED FIXED    
Severity: normal CC: h3734236
Priority: medium    
Version: 5.2.0.0.alpha0+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=104334
Whiteboard: target:5.2.0 target:5.1.3 target:5.0.6
Crash report or crash signature: Regression By:
Attachments: Reproducer document

Description Miklos Vajna 2016-04-05 14:21:00 UTC
Created attachment 124090 [details]
Reproducer document

Bug 86790 is about the full styleref support, but a subset of STYLEREF can be implemented just with filter changes.

If a new document is created in Writer, then a chapter field is exported as STYLEREF. The importer handles this as a fieldmark currently.

However, it should be possible to check if it's the simple styleref we write, and in that case map it back to a chapter field. (And leave the complex case to a fieldmark still.)
Comment 1 Commit Notification 2016-04-06 06:37:27 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d635b351849b8b576c907abf22500d0fa89ab54f

tdf#99100 DOC import: handle subset of STYLEREF natively

It will be available in 5.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 2 Commit Notification 2016-04-07 09:35:50 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c945d4166087e09798d812a466a85d424482e08b&h=libreoffice-5-1

tdf#99100 DOC import: handle subset of STYLEREF natively

It will be available in 5.1.3.

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

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2016-04-07 11:51:54 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f47143222ab5bacc48bc9a61b9d247e4a062fe9e&h=libreoffice-5-0

tdf#99100 DOC import: handle subset of STYLEREF natively

It will be available in 5.0.6.

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

Affected users are encouraged to test the fix and report feedback.