Bug 63603 - FILEOPEN: .doc style named "Default" confused with default style
Summary: FILEOPEN: .doc style named "Default" confused with default style
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: Other All
: highest major
Assignee: Not Assigned
URL:
Whiteboard: target:4.1.0 target:4.0.4
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-04-16 12:46 UTC by Luke Deller
Modified: 2013-11-13 19:17 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
DefaultStyle.doc (25.50 KB, application/msword)
2013-04-16 12:46 UTC, Luke Deller
Details
DefaultStyle.doc (fixed mime type) (25.50 KB, application/msword)
2013-04-16 12:49 UTC, Luke Deller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Deller 2013-04-16 12:46:22 UTC
Created attachment 78079 [details]
DefaultStyle.doc

Steps to reproduce:
1) Open the attached DefaultStyle.doc file in LibreOffice. Observe the font is Arial 11pt.
2) Save as DefaultStyle2.docx, close
3) Open DefaultStyle2.docx in either LibreOffice or Word.  The font has become Times New Roman italic underlined 18pt.

This problem does not occur with LibreOffice 3.6.6, but it does occur in 4.0.2 and git master(4.1alpha).

The key feature of this Word document is that it contains:
- the "Normal" style set to Arial 11pt, which maps to the LibreOffice default style
- another (unused) style named "Default" set to Times New Roman italic underlined 18pt

Interestingly the symptom is not visible when saving as .doc, however when the resultant doc is then converted to docx using MS Word, the problem appears!  Again this only occurs using LO 4.0.2 not 3.6.6

A clue: using LibreOffice to save the original document as ODT shows a difference between the working and the broken versions:
- LO 4.0+: styles.xml within the ODT contains both a <style:default-style> element and a <style:style style:name="Default"> element.
- LO 3.6.6: styles.xml contains only the <style:default-style>, not the <style:style style:name="Default"> element.

This difference in ODT suggests the change occurred at import time rather than export time.
Comment 1 Luke Deller 2013-04-16 12:49:33 UTC
Created attachment 78080 [details]
DefaultStyle.doc (fixed mime type)
Comment 2 Marc Kaulisch 2013-04-16 20:07:54 UTC
I can confirm this issue with LibreOffice 4.0.2.2 under Windows 8.
This is in my opinion a severe problem because it affects the interoperability of LibreOffice with Word. And makes LibreOffice less trustworthy.
Comment 3 Commit Notification 2013-05-07 14:43:52 UTC
Luke Deller committed a patch related to this issue.
It has been pushed to "master":

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

Fix style renaming confusion in ww8 filter (solves fdo#63603)



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 4 Commit Notification 2013-05-27 11:23:02 UTC
Luke Deller committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d414e84c438f0b0dd935d1ba1d351f7af27d49a8&h=libreoffice-4-0

Fix style renaming confusion in ww8 filter (solves fdo#63603)


It will be available in LibreOffice 4.0.4.

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 5 Michael Stahl (allotropia) 2013-05-28 19:22:58 UTC
it appears the bug is fixed, thanks to Luke for the patch