Bug 76934 - FILESAVE : DOCX : Title style is not preserved
Summary: FILESAVE : DOCX : Title style is not preserved
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) Master
Hardware: Other All
: medium normal
Assignee: pallavi.jadhav
Whiteboard: target:4.4.0
Depends on:
Reported: 2014-04-02 08:23 UTC by pallavi.jadhav
Modified: 2014-06-05 12:22 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Contains Title Style. Text is divided into two columns. (29.88 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-04-02 08:23 UTC, pallavi.jadhav
Details before save (147.32 KB, application/pdf)
2014-04-05 13:10 UTC, Kevin Suo
Details after save as docx (163.72 KB, application/pdf)
2014-04-05 13:11 UTC, Kevin Suo
the new "saved as" docx file (15.33 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-04-05 13:16 UTC, Kevin Suo
RT file dated 29-May-2014 (14.87 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-06-05 11:33 UTC, pallavi.jadhav

Note You need to log in before you can comment on or make changes to this bug.
Description pallavi.jadhav 2014-04-02 08:23:55 UTC
Created attachment 96766 [details]
Contains Title Style. Text is divided into two columns.

Steps to reproduce :
1] Open attached DOCX in LO
2] Perform save_as
3] Open saved file in MS Office 2010

Current behavior :
1) Justification is changed from Center to Left.
2) Text is no more Bold.
3) Font Name is converted from Arial to Times New Roman.
4) Text Size is changed.

Expected behavior :
1) Justification should be "Center".
2) Text should be "Bold".
3) Font Name should be "Arial".
4) Text Size should be "18".

Problem at both Import and Export side.
Comment 1 Jorendc 2014-04-03 09:15:56 UTC
All mentioned behavior reproducible, tested using Mac OSX 10.9 with LibreOffice Version:
Build ID: 37672f11a72723040b1c9452772dc6e12409e6cd
TinderBox: MacOSX-x86@49-TDF, Branch:master, Time: 2014-03-29_00:52:28

Kind regards,
Comment 2 Kevin Suo 2014-04-05 13:10:47 UTC
Created attachment 96950 [details] before save

In libreOffice, when I first open the docx file, it looks like this.
Comment 3 Kevin Suo 2014-04-05 13:11:56 UTC
Created attachment 96951 [details] after save as docx

in, when save the docx as docx again, and reopen, it looks like this.
Comment 4 Kevin Suo 2014-04-05 13:16:45 UTC
Created attachment 96952 [details]
the new "saved as" docx file

this is the new docx file I "saved as" from the original file.

* two columns become one column;
* format is different.

This behavior is different from the original bug descrption in comment 1. Should a new bug be filed?
Comment 5 Kevin Suo 2014-04-05 13:19:18 UTC
Also, when I see this commit:

It seems that Bug 76255 should be a duplicate of this bug 76934 ?
Comment 6 Commit Notification 2014-06-02 07:54:00 UTC
Pallavi Jadhav committed a patch related to this issue.
It has been pushed to "master":


fdo#76934 : DOCX: Preservation: AutoSpacing property not getting preserved.

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:
Affected users are encouraged to test the fix and report feedback.
Comment 7 Jorendc 2014-06-03 20:41:28 UTC
Looks fixed to me, tested using Windows 8.1 with LibreOffice Version:
Build ID: b447687292334687a371b66d7ad56ba9662b898e
TinderBox: Win-x86@39, Branch:master, Time: 2014-06-03_06:24:04

Looks like 'Heading 1' (the words) are not retained. The style itself is. There is an empty line where 'Heading 1' should be visible.

Kind regards,
Comment 8 pallavi.jadhav 2014-06-05 11:17:09 UTC
Yes. As you said Heading 1 word is not preserved in the RT document.

I checked on the build before my fix got merged.
When I opened the RT in MS Office-2010, the behavior was same i.e. Heading 1 word was missing. 

I am attaching the RT file dated 29-May-2014(Code merged on 2-June-2014).

In this RT you can observe that Heading 1 is missing and also the "AutoSpacing" is missing for Title style in styles.xml.
That means no regression due my changes :)

Thanks for your Input.
Comment 9 pallavi.jadhav 2014-06-05 11:33:46 UTC
Created attachment 100454 [details]
RT file dated 29-May-2014
Comment 10 Jorendc 2014-06-05 12:22:18 UTC
Thanks for your reply Pallavi :-)

(In reply to comment #8)
> In this RT you can observe that Heading 1 is missing and also the
> "AutoSpacing" is missing for Title style in styles.xml.
> That means no regression due my changes :)

Sure, I didn't check with previous versions and was especially not pointing to your fix :-). It was just an observation of roundtripped file after the fix.

You want me to open a new bug report for that?

Thank you for your work :-)!

Kind regards,