Bug 108949 - RTF import: Numbering is duplicated
Summary: RTF import: Numbering is duplicated
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:6.0.0
Keywords: bibisected, bisected, filter:rtf, regression
Depends on:
Blocks: RTF-Bullet-Number-Lists
  Show dependency treegraph
 
Reported: 2017-07-04 15:16 UTC by Xisco Faulí
Modified: 2022-01-04 08:49 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2017-07-04 15:16:37 UTC
Steps:
1. Open attachment 103959 [details] from bug 82107

Observed behaviour: Numbering is duplicated in page 2

[Bug found by office-interoperability-tools]

Reproduced in

Version: 6.0.0.0.alpha0+
Build ID: cb37c5f0f3de7b545231a53d46a5271058af76ad
CPU threads: 1; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-06-23_06:55:41
Locale: es-ES (es_ES); Calc: group
Comment 1 Xisco Faulí 2017-07-04 15:17:47 UTC
Regression introduced by:

author	Justin Luth <justin_luth@sil.org>	2017-05-30 14:13:47 (GMT)
committer	Justin Luth <justin_luth@sil.org>	2017-06-09 05:35:18 (GMT)
commit fdfdea4d5af51a68f2d497cc5c3359d74c385fd5 (patch)
tree 04f33b8186ac602769a0495193a664f6faae1229
parent 691d1e90f62ce3f1930d3faf74af385d92f00d59 (diff)
tdf#82173 writerfilter: apply char properties to footnote
The char property values as defined in w:rPr were not connected
to the in-text footnote or endnote.

Bisected with bibisect-linux64-6.0

Adding Cc: to Justin Luth
Comment 2 Xisco Faulí 2017-07-04 18:09:47 UTC
Same behaviour seen in attachment 56090 [details] from bug 45182
Comment 3 Xisco Faulí 2017-07-04 19:00:35 UTC
Same result with attachment 104064 [details] from bug 81944
Comment 4 Justin L 2017-07-05 01:33:49 UTC
Easy to replicate by saving a working .docx in .rtf format.  Only seems to affect .rtf - no idea why RTF would act differently here.
A simple fix is to only copy CONTEXT_CHARACTER formatting.
Comment 5 Justin L 2017-07-10 21:49:31 UTC
RTF!!! writerfilter/source/dmapper/DomainMapper_Impl.cxx:1725: ::PushFootOrEndnote topContext is PARA[1] CHAR[0]

DOCX!! writerfilter/source/dmapper/DomainMapper_Impl.cxx:1725: ::PushFootOrEndnote topContext is PARA[0] CHAR[1]

RTF export is terribly wrong, so just avoiding the problem when detecting RTFImport.
proposed fix: https://gerrit.libreoffice.org/39775
Comment 6 Justin L 2017-07-26 12:08:45 UTC
Abandoned the first proposed fix in favour of https://gerrit.libreoffice.org/40430.

RTF documents still couldn't do what bug 82173 fixed for .docx - keeping the char formatting around a footnote character. This fix does that, resolving the regression at the same time.
Comment 7 Commit Notification 2017-07-28 08:41:16 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#108949 rtf writerfilter: apply char properties to footnote

It will be available in 6.0.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 8 Xisco Faulí 2017-08-01 23:13:41 UTC
Verified in

Version: 6.0.0.0.alpha0+
Build ID: 50799a721c7ddcf9475a1b79984ed64ddd7cdf57
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group