Bug 104334 - FILEOPEN: DOC: Incorrect StyleRef
Summary: FILEOPEN: DOC: Incorrect StyleRef
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.6.2 release
Hardware: All All
: medium major
Assignee: Miklos Vajna
QA Contact:
URL:
Whiteboard: interoperability target:5.4.0 target:...
Keywords: bibisected, bisected, filter:doc, regression
Depends on:
Blocks: DOC-Bugs
  Show dependency treegraph
 
Reported: 2016-12-01 23:51 UTC by Xisco Faulí
Modified: 2017-03-21 05:17 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
sample (32.00 KB, application/msword)
2016-12-01 23:51 UTC, Xisco Faulí
Details
comparison (29.38 KB, image/png)
2016-12-01 23:52 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2016-12-01 23:51:46 UTC
Created attachment 129215 [details]
sample

Steps:
1. Open attached document

Observed behaviour: Image's caption is 'Figure This is a Heading 1–1 This is a Figure Caption'

Expected Behaviour: Image's caption is Figure 1–1 This is a Figure Caption

Reproduced in

Version: 5.3.0.0.alpha0+
Build ID: 63965d7dc571c7dce999980737f9d57a7c5151da
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8)

but not in

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e
Comment 1 Xisco Faulí 2016-12-01 23:52:51 UTC
Created attachment 129216 [details]
comparison
Comment 2 Julien Nabet 2016-12-02 23:20:22 UTC
It seems a regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=d635b351849b8b576c907abf22500d0fa89ab54f

Miklos: one for you?
Comment 3 Aron Budea 2016-12-17 05:03:17 UTC
Reproduced with 5.1.6.2, adjusting version field.
Comment 4 Xisco Faulí 2016-12-17 22:30:53 UTC
Regression introduced by:

author	Miklos Vajna <vmiklos@collabora.co.uk>	2016-04-06 06:34:28 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2016-04-06 06:34:46 (GMT)
commit	d635b351849b8b576c907abf22500d0fa89ab54f (patch)
tree	f3927767eecf4adb533b3aac64653208ba1677d3
parent	9351353b63886f494782f28f5400f5d71d22bcbd (diff)
tdf#99100 DOC import: handle subset of STYLEREF natively
Commit 4215bca95511af8e4ee96e3c8f521b35f638aef3 (export 'Chapter' field
type as 'StyleRef' into .doc, 2015-08-21) mapped SwChapterField to
STYLEREF in the DOC export. This field type was handled as a field mark
on import. Instead of always handling it as a field mark, recognize the
case when it's the subset we write and we can handle natively, and in
that case create an SwChapterField again on import.

Leave the complex case unchanged as before and keep using field marks
for that.

Adding Cc: to Miklos Vajna
Comment 5 Commit Notification 2017-01-24 09:14:01 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#104334 DOC import: don't map STYLREF with switches to SwChapterField

It will be available in 5.4.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 6 Commit Notification 2017-01-25 12:51:18 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

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

tdf#104334 DOC import: don't map STYLREF with switches to SwChapterField

It will be available in 5.3.1.

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 7 krishna [:kr1shna] 2017-03-21 05:17:15 UTC
verified.
Version: 5.4.0.0.alpha0+ / Build ID: febc116 / ls-4001 / android 5.1

Image's caption is displaying similar to screenshot attachment [ left side].