Bug 99100 - DOC import: STYLEREF not imported even in case it can be mapped to chapter field
Summary: DOC import: STYLEREF not imported even in case it can be mapped to chapter field
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:5.2.0 target:5.1.3 target:5.0.6
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-05 14:21 UTC by Miklos Vajna
Modified: 2016-12-17 05:03 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Reproducer document (22.00 KB, application/msword)
2016-04-05 14:21 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
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.