Bug 71302

Summary: FILESAVE: DOCX Export - Styles that are used in a DOCX aren't being preserved after RT
Product: LibreOffice Reporter: Adam CloudOn <rattles2013>
Component: WriterAssignee: Miklos Vajna <vmiklos>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: vmiklos
Version: 4.2.0.0.alpha0+ Master   
Hardware: Other   
OS: All   
Whiteboard: BSA target:4.2.0 target:4.3.0
i915 platform: i915 features:
Attachments: DOCX containing a paragraph for each style in MS Word
DOCX exported by LO with missing styles
Screenshot comparison between original DOCX and exported DOCX

Description Adam CloudOn 2013-11-06 12:59:44 UTC
Created attachment 88750 [details]
DOCX containing a paragraph for each style in MS Word

Problem description: 
After the attached DOCX is round-tripped through LO there are 3 problems:
1. All the paragraphs *look* correct (format-wise) except for the 'Strong' paragraph. It should be 'bold' but it is not.
2. All the styles are missing from the styles view in the ribbon in MS Word, except for the 'Strong' style.
3. I guess that the paragraphs don't have a link to the styles anymore (because the styles don't appear at the ribbon)

Steps to reproduce:
1. Load attached DOCX to LO
2. Save as NEW.DOCX
3. Open NEW.DOCX in MS Word
3. There are no styles in the style's view in the ribbon,
   also 'strong' paragraph is not bold

Current behavior:
LO doesn't preserve the styles from the original DOCX

Expected behavior:
LO should preserve the styles from the original DOCX
              
Operating System: All
Version: 4.2.0.0.alpha0+ Master
Comment 1 Adam CloudOn 2013-11-06 13:01:10 UTC
Created attachment 88751 [details]
DOCX exported by LO with missing styles
Comment 2 Adam CloudOn 2013-11-06 13:04:41 UTC
Created attachment 88752 [details]
Screenshot comparison between original DOCX and exported DOCX
Comment 3 Miklos Vajna 2013-11-08 14:13:56 UTC
I tried to reproduce this with today's master (9b10373edae490d2b9b7f8d733c59b4f63927bec, Linux, dbgutil), no luck. I see the problem when I open attachement 88751, but I when I save attachement 88750 myself, the result is OK.

Probably makes sense to update to latest master, and if the problem persists, comment the exact sha1 of your checkout where you see the problem.
Comment 4 Miklos Vajna 2013-11-12 09:45:18 UTC
Further discussion points out that the Strong char style gets renamed, which is something I can confirm; I'll fix that in a bit.
Comment 5 Commit Notification 2013-11-12 09:56:36 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

fdo#71302 writerfilter: remove "Strong" -> "Strong Emphasis" style rename



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 6 Adam CloudOn 2013-11-12 10:16:26 UTC
(In reply to comment #5)
> Miklos Vajna committed a patch related to this issue.
> It has been pushed to "master":
> 
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=0215131e36fdabf0e2b02c2f8032d393f31195c3
> 
> fdo#71302 writerfilter: remove "Strong" -> "Strong Emphasis" style rename
> 
> 
> 
> 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.

Fantastic job
Comment 7 Commit Notification 2013-11-24 14:07:46 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

fdo#71302 writerfilter: remove "Strong" -> "Strong Emphasis" style rename



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 8 Miklos Vajna 2013-11-24 14:08:17 UTC
Please ignore comment 7, it was for testing purposes only.

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.