Bug 46938 - FILESAVE: DOCX - Tab stops added to lines that didnt already have them
Summary: FILESAVE: DOCX - Tab stops added to lines that didnt already have them
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.5 release
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: BSA target:6.0.0
Keywords: filter:docx
: 42125 112460 (view as bug list)
Depends on:
Blocks: DOCX Paragraph-Tab-Stops
  Show dependency treegraph
 
Reported: 2012-03-03 14:07 UTC by ale.carrazzoni
Modified: 2020-06-06 03:52 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Zip file (15.45 KB, application/zip)
2012-03-03 14:07 UTC, ale.carrazzoni
Details
doc vs docx (38.48 KB, image/png)
2017-10-08 09:23 UTC, Yousuf Philips (jay) (retired)
Details
tdf46938_directParagraphDefaultTabs.docx: cleanroom example from Word 2003 (10.02 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-11-01 18:43 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ale.carrazzoni 2012-03-03 14:07:44 UTC
Created attachment 57983 [details]
Zip file

Problem description: I have attached a .zip file, which includes a rdown_2.doc, and a rdown_2.docx which was created by saving the .doc file as .docx with LibreOffice 3.4.5. When the file is opened again with LibreOffice and MS Office Web Apps, the tab formatting is broken. 

Steps to reproduce:
1. Open .doc file in LibreOffice
2. Save .doc file as .docx
3. Open .docx file

Current behavior: The length of tabs after a word that ends with a colon is changed. In the first page, this causes some text to appear at the right side of the page. In the second page, there are tabs missing after "B.I.I." and "NVQ:", causing these two lines to be shorter than they should. When the file is opened with MS Office Web Apps, the tabs in the first page are correct, but the some text appears centered, and the missing tabs after "B.I.I." nad "NVQ:" are missing.

Expected behavior: Same tab formatting as in the .doc file

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 Iceweasel/10.0.2
Comment 1 Urmas 2012-03-04 22:12:25 UTC
There's extra tabulation added to paragraphs at 0,5in.

To OP: Using tabulation only once and setting explicit tabulation position would save you from such incidents.
Comment 2 ale.carrazzoni 2012-03-05 06:59:14 UTC
Thanks for the advice, but table formatting shouldn't be broken when saving to docx.
Comment 3 QA Administrators 2014-10-24 03:18:23 UTC Comment hidden (obsolete)
Comment 4 ale.carrazzoni 2014-10-25 01:30:22 UTC
Tested again in LibreOffice 4.3 on Linux. The bug is still present for the tabs in the first page though the tabs after "B.I.I" and "NVQ:" are no longer missing.
Comment 5 QA Administrators 2015-12-20 16:19:27 UTC Comment hidden (obsolete)
Comment 6 ale.carrazzoni 2015-12-20 16:43:11 UTC
Tested on Libreoffice 5.0.4 Linux. The tabs on the first page are still missing, the second and third pages seem to have correct tabs although the column layout is still wrong and the page break after the columns is missing.
Comment 7 Yousuf Philips (jay) (retired) 2017-10-08 09:23:07 UTC
Created attachment 136842 [details]
doc vs docx

Still present.

Version: 6.0.0.0.alpha0+
Build ID: 892c719fffa06de4c7aeab497326cad7bae9e5c6
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-09-27_03:02:09
Locale: en-US (en_US.UTF-8); Calc: group
Comment 8 Justin L 2017-11-01 18:39:32 UTC
Focusing on the address part: the paragraph style is header which has tab stops defined at 7.62cm and 15.24cm - the locations where LO places them in .docx.

As noted in comment 2, directly applied paragraph styling is overriding that to use the default tabs. LO appears to not saving the default formatting (as is common), but in this case it should since it must override the non-default formatting from the style.
Comment 9 Justin L 2017-11-01 18:43:42 UTC
Created attachment 137426 [details]
tdf46938_directParagraphDefaultTabs.docx: cleanroom example from Word 2003

<w:pPr>
  <w:pStyle w:val="tabstops"/>
  <w:tabs>
    <w:tab w:val="clear" w:pos="3402"/>
  </w:tabs>
</w:pPr>
Comment 10 Commit Notification 2017-11-04 04:43:09 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#46938 ooxmlexport: override style tabstops when tabs removed

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 11 Justin L 2018-07-11 15:16:39 UTC
*** Bug 42125 has been marked as a duplicate of this bug. ***
Comment 12 Timur 2018-07-18 09:44:22 UTC
*** Bug 112460 has been marked as a duplicate of this bug. ***