Bug 82348

Summary: FILEOPEN: DOCX IMPORT: style is being corrupted by direct formatting
Product: LibreOffice Reporter: mahesh patil <mahesh_patil166>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium CC: vstuart.foote
Version: 4.3.0.4 release   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: File which demostrates problem
Style missing

Description mahesh patil 2014-08-08 13:09:31 UTC
Created attachment 104282 [details]
File which demostrates problem

Step to produce:
In attached docx file has style named "Product Head" is not applied to first paragraph line . It is displayed in style list but not applied. It has before para property which is not in output. Probably something missing from import side.

Operating system
Mac os 10.8
Windows 8
Comment 1 V Stuart Foote 2014-08-10 16:24:18 UTC
On Windows 7 sp1, 64-bit en-US with
Version: 4.3.0.4
Build ID: 62ad5818884a2fc2e5780dd45466868d4100

Document opens with the ProductHead style applied to the paragraph.

The style as applied shows as Verdana 22 point.

Also, please don't set your own reports as new. And, this issue was most certainly not critical.

Closing WFM, but if you still believe the style is not being correctly imported, go ahead and reopen with full details of what is missing from the style.
Comment 2 V Stuart Foote 2014-08-10 16:40:19 UTC
Actually going to set this to NEEDINFO,

seems there may be disconnect on import of the .docx and its styles. If I modify the "Product Head" Style as imported--it shows as Times New Roman, Bold, 21pt with condensed spacing and pair kerning.  If I select and "Clear direct formatting" the paragraph assumes attributes for the "Product Head" style.

So question is why with the import filter, additional direct formatting is being applied over the style specified?

@Mahesh, please verify the attributes of your "Product Head" style.
Comment 3 mahesh patil 2014-08-11 11:22:02 UTC
(In reply to comment #1)
> On Windows 7 sp1, 64-bit en-US with
> Version: 4.3.0.4
> Build ID: 62ad5818884a2fc2e5780dd45466868d4100
> 
> Document opens with the ProductHead style applied to the paragraph.
> 
> The style as applied shows as Verdana 22 point.
> 
> Also, please don't set your own reports as new. And, this issue was most
> certainly not critical.
> 
> Closing WFM, but if you still believe the style is not being correctly
> imported, go ahead and reopen with full details of what is missing from the
> style.

Style ProductHead contains Times new Roman font with font size 21 point bold condensed by 2 point, kerning at 36 point, left indent 0.63 cm, line spacing 22 point exact, before para spacing 12 point

In text line "Rich Text Format (RTF) Specification" 12 point para spacing (Above para property in UI) is not applied.
Comment 4 mahesh patil 2014-08-11 11:25:21 UTC
Created attachment 104432 [details]
Style missing

Anyone can see this document in Microsoft word and libreoffice. Difference is visible. Before para property is missing from base style ProductHead. This is very critical issue if you are using styles.
Comment 5 V Stuart Foote 2014-08-11 13:31:18 UTC
Setting NEW, issue would appear to be with the import filter(s) appending additional formatting to already styled .docx document.

@Mahesh, please confirm that the source program for both attached OOXML documents is MS Office for Mac 2011.  Also, please confirm that following import filter opening with LibreOffice > 4.3.0 that a selection of the paragraph content with "Product Head" and applying the context menu "Clear Direct Formatting" reverts paragraph to correctly rendered style.  

Finaly, what affect to a copy of the entire source document imported into LibreOffice if you "Select All" for the whole document and similarly apply "Clear Direct Formatting"?
Comment 6 mahesh patil 2014-08-11 14:20:37 UTC
Product head is based style and direct formatting is just override some properties not all properties. So it clear direct formatting is not going work. The document attached is modified in MS Office for Mac 2011. But document is RTF specification 2009 created by Microsoft.

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.