Bug 126795 - A document with indented bulleted paragraphs saved to DOCX in Writer 6.2.1 looks wrong, but is fine when saved to DOCX from Writer 6.2.0
Summary: A document with indented bulleted paragraphs saved to DOCX in Writer 6.2.1 lo...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.5.2 release
Hardware: All All
: medium normal
Assignee: Serge Krot (CIB)
URL:
Whiteboard: target:6.5.0 target:6.4.1 target:6.3.5
Keywords: bibisected, bisected, regression
Depends on: 121456
Blocks:
  Show dependency treegraph
 
Reported: 2019-08-09 16:33 UTC by Matthew Kogan
Modified: 2020-01-17 15:25 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test document (16.04 KB, application/vnd.oasis.opendocument.text)
2019-08-09 16:33 UTC, Matthew Kogan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Kogan 2019-08-09 16:33:24 UTC
Description:
I have an ODT document with some paragraphs that use a style I have defined so that they are bulleted and indented. When I save this file to DOCX with Writer 5.4 it looks the same as it does in Writer. When I do the same thing in Writer 6.2 the first line of each paragraph is not indented as much as the subsequent lines of the paragraph, which obviously looks wrong.

Steps to Reproduce:
1.Save the attached document to DOCX in Writer 5.4.
2.Save the attached document to DOCX in Writer 6.2.
3.Compare the output.

Actual Results:
The output is different.

Expected Results:
The output from Writer 6.2 should be the same as from Writer 5.4.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Matthew Kogan 2019-08-09 16:33:47 UTC
Created attachment 153268 [details]
Test document
Comment 2 Matthew Kogan 2019-08-12 09:37:57 UTC
Actually Writer 6.2.0 behaves correctly. The bug first appears in 6.2.1.
Comment 3 Xisco Faulí 2019-08-12 11:00:22 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=f2f2143316acb449baaf29dd5300a6acf8a5c632

author	Serge Krot <Serge.Krot@cib.de>	2018-11-16 09:53:37 +0100
committer	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2018-11-20 11:55:29 +0100
commit f2f2143316acb449baaf29dd5300a6acf8a5c632 (patch)
tree f6c0064cc6a70b5326f008dde5cf163ed6e081d7
parent c444eb7934d4a3c190e1d060805d9d175c1a9127 (diff)
tdf#121456: sw: DOCX: tabs export and TABS_RELATIVE_TO_INDENT prop

Bisected with: bibisect-linux64-6.3

Adding Cc: to Serge Krot
Comment 4 Serge Krot (CIB) 2019-08-16 07:33:41 UTC
Quick analysis of regression:
- DocumentSettingId::TABS_RELATIVE_TO_INDENT: In DOCX, w:pos specifies the position of the current custom tab stop with respect to the current page margins. But in ODT, zero position could be page margins or paragraph indent according to used settings.
- In our initial commit (tdf#124106) we perform correction using offset for all tabs according to TABS_RELATIVE_TO_INDENT flag. The same code was developed before in the past but somehow was disabled (I didn't find out why it was done - needs some more analysis there at least for extraction of the test cases).
- Moreover the same check (which was added in tdf#124106) for TABS_RELATIVE_TO_INDENT exists in RTF output.
- The difference between original test case and new one:
-- in original test case (tdf#124106) we had wrong tab position aligned at the right border of the page for different paragraphs with different left indentation,
-- in new test case (tdf#126795) we have new tab stop between first line indent and left indent - and this make text to be layouted starting from this tab stop instead of left indent. Without check TABS_RELATIVE_TO_INDENT this tab stop is placed before first line indent and therefore it is not used during layout making text to be placed starting from left indent.
Comment 5 Commit Notification 2020-01-15 09:50:24 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/264d27c94d7286a407b05a32f4097ac9d543e1a3

tdf#126795 docx export: do not output tab stops twice

It will be available in 6.5.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 6 Commit Notification 2020-01-17 08:38:52 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/6358fb7d3139a7b5ce0ea2394faa55ea1e2e4b6c

tdf#126795 docx export: do not output tab stops twice

It will be available in 6.4.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 7 Xisco Faulí 2020-01-17 08:58:29 UTC
Verified in

Version: 6.5.0.0.alpha0+
Build ID: cc36c115004cb75037b0e4fdadff09035f765cd5
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

@Serge Krot, thanks for fixing this issue! Should it be closed as RESOLVED FIXED ?
Comment 8 Commit Notification 2020-01-17 10:19:22 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/2bcd3ed723463279f7f3e90966a5589e5b8592cf

tdf#126795 docx export: do not output tab stops twice

It will be available in 6.3.5.

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 9 Commit Notification 2020-01-17 15:25:31 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ee4223bf079b1225e57a51772f6693f69c0e83bd

tdf#126795 docx export and TabsRelativeToIndent: added unit test

It will be available in 6.5.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.