Bug 58095

Summary: DOC Import creates an invalid style name
Product: LibreOffice Reporter: Urmas <davian818>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: major    
Priority: high CC: jmadero.dev, stfhell
Version: 3.5.4 release   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Minimal document to reproduce

Description Urmas 2012-12-10 16:49:55 UTC
Created attachment 71282 [details]
Minimal document to reproduce

Several MS Word documents like the attached show empty style name after being opened with Libreoffice. The opened document cannot be saved in any format, including ODF.

Either styles should be correctly imported, or software should prevent creation of invalid style names.
Comment 1 Joel Madero 2012-12-11 17:31:48 UTC
Confirmed.

New (Confirmed)

Major (you can open a file, make a ton of edits, but when you try to save you're stuck, it spits out an error)

High (potential for loss of data + major annoyance if a user opens a file with no error and then finds out they can't save the file)

Version: Confirmed on 3.6.3.2, changing version to reflect oldest version confirmed on
Comment 2 stfhell 2012-12-13 10:32:48 UTC
(Also reproducible with LO 3.5.4.2/Ubuntu 12.04, so changing version field.)

But consider that MS Office 2010 doesn't open the file as well by default. See
http://support.microsoft.com/kb/922849/
for Office policy restrictions (support for the old DOC file formats has been restricted from Word 2003 onwards because Microsoft isn't keen on fixing or hardening the code for their old file formats).

I cannot imagine users will be very likely to come across such a file. But to fix the issue in LO, it would be necessary to find out if LO really imports a correctly defined paragraph style without its name, if it adds a style not defined in the DOC to its style list, or if the DOC file itself is corrupt and LO doesn't detect this.

What application was the file created with?
Comment 3 Urmas 2012-12-14 15:28:13 UTC
Another linuxlie? The document is opened by Microsoft office without issues.
Comment 4 stfhell 2012-12-17 17:33:34 UTC
Security policies are no issues, they are security policies. The file is an old WinWord-2.0 DOC, and this format should better be avoided for current documents, especially since it's not openly documented. I have never seen this bug with the later compound-doc formats, so it's probably limited to WinWord 2.0 files.
Comment 5 Urmas 2013-08-21 01:15:35 UTC
The problem is apparently caused by a trailing 0xff in the names part of the stylesheet.
Comment 6 Yuhong Bao 2013-09-04 23:47:45 UTC
"Word 2003 onwards"
Word 2003 SP3 and Word 2007 onwards.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.