Bug Hunting Session
Bug 126723 - FILEOPEN DOCX Numbered list item gets indent setting from next paragraphs footnote
Summary: FILEOPEN DOCX Numbered list item gets indent setting from next paragraphs foo...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:6.4.0 target:6.3.1 target:6.2.7
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Footnote-Endnote
  Show dependency treegraph
 
Reported: 2019-08-06 09:12 UTC by NISZ LibreOffice Team
Modified: 2019-08-13 09:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the original document side by side in Word and Writer (150.63 KB, image/png)
2019-08-06 09:12 UTC, NISZ LibreOffice Team
Details
Example file from Word with footnote added to numbered paragraph (27.50 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-08-06 09:13 UTC, NISZ LibreOffice Team
Details
Example file from Word with footnote without left indent (26.17 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-08-06 09:13 UTC, NISZ LibreOffice Team
Details
Example file from Word with footnote without left indent (26.18 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-08-06 09:15 UTC, NISZ LibreOffice Team
Details
tdf126723.docx: better text for debugging (18.21 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-08-08 13:31 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-08-06 09:12:05 UTC
Description:
Attached is a minimized user doc. Here they added a footnote with custom indent setting to a numbered list item. Now the previous numbered paragraph somehow inherits this custom indent from the footnote.
Removing the footnotes hanging or left indent in Word restores the original indent of the numbered paragraph.


Steps to Reproduce:
1.	Open attached file in Word and Writer
2.	Notice that the footnote has a 1.25 cm left indent and 0.91 cm hanging indent
3.	In Writer the first paragraph gets a 2.16 cm left indent, unlike in Word


Actual Results:
2.16 cm indent on the first paragraph.

Expected Results:
No indent on the first paragraph.


Reproducible: Always


User Profile Reset: No



Additional Info:
LibreOffice details:
Version: 6.4.0.0.alpha0+ (x86)
Build ID: 382aceb80d3c0f420d51762e1f88eee2334ff11b
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-07-21_23:45:18
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2019-08-06 09:12:22 UTC
Additional Information: 

Bibisected using bibisect-win32-6.1 to: 
URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=07266e2314fd19dcbf777dadd52d7b826b23c207 

author Justin Luth <justin_luth@sil.org> Tue Jul 24 14:49:00 2018 +0300 
committer László Németh <nemeth@numbertext.org> Wed Aug 01 11:33:02 2018 +0200 
summary: tdf#118521 writerfilter: ContextMargin grouped with Top/Bottom
Comment 2 NISZ LibreOffice Team 2019-08-06 09:12:54 UTC
Created attachment 153161 [details]
Screenshot of the original document side by side in Word and Writer
Comment 3 NISZ LibreOffice Team 2019-08-06 09:13:13 UTC
Created attachment 153162 [details]
Example file from Word with footnote added to numbered paragraph
Comment 4 NISZ LibreOffice Team 2019-08-06 09:13:34 UTC
Created attachment 153163 [details]
Example file from Word with footnote without left indent
Comment 5 NISZ LibreOffice Team 2019-08-06 09:15:21 UTC
Created attachment 153164 [details]
Example file from Word with footnote without left indent
Comment 6 Xisco Faulí 2019-08-06 10:12:45 UTC
Reproduced in

Version: 6.4.0.0.alpha0+
Build ID: 967644f09b8b7abe3b86d1647820f14e0196f8b4
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

Adding Cc: to Justin Luth
Comment 7 Justin L 2019-08-08 13:31:29 UTC
Created attachment 153230 [details]
tdf126723.docx: better text for debugging

Actually, this is for LO 6.2.

I don't think it really is a regression. I think it exposed a bug, because the results are illogical. It IS doing a ::finishParagraph on the footnote text - somehow those properties are affecting the prior paragraph (only).
Comment 8 Justin L 2019-08-09 09:04:01 UTC
proposed fix at https://gerrit.libreoffice.org/77185

tdf#126723 writerfilter::finishParagraph - me, not previous
    In LO 6.2 commit 480ac84f2f5049fb4337b36f12fd6796e005761b
    the existing m_xPreviousParagraph was conveniently used to
    apply the changed properties. I never did like that choice,
    but despite looking at it, I failed to see that it is set
    in an inside loop, which means that it was NOT NECESSARILY
    reset to the current paragaph. So I'm happy to have proof
    that we should not use m_xPreviousParagraph

Too bad it took a full day to actually see that.
Comment 9 Commit Notification 2019-08-09 13:06:51 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#126723 writerfilter::finishParagraph - me, not previous

It will be available in 6.4.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 10 Commit Notification 2019-08-12 14:54:27 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

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

tdf#126723 writerfilter::finishParagraph - me, not previous

It will be available in 6.3.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 11 Commit Notification 2019-08-12 14:54:39 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

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

tdf#126723 writerfilter::finishParagraph - me, not previous

It will be available in 6.2.7.

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 12 Xisco Faulí 2019-08-13 09:13:59 UTC
Verified in

Version: 6.4.0.0.alpha0+
Build ID: d9b54924fbfc2eae33c503434b0bfd3619c6a1a6
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Justin Luth, thanks for fixing this issue!!