Bug 88583 - FILESAVE: Paragraph background in ODT not saved in DOC or DOCX
Summary: FILESAVE: Paragraph background in ODT not saved in DOC or DOCX
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.0.beta1
Hardware: Other All
: high major
Assignee: Miklos Vajna
URL:
Whiteboard: target:5.0.0 target:4.4.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-01-19 12:54 UTC by Timur
Modified: 2021-05-07 08:21 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Test ODT document with background line (10.18 KB, application/vnd.oasis.opendocument.text)
2015-01-19 12:56 UTC, Timur
Details
Test ODT document saved as DOC in LO 4.4.0-beta1 (9.00 KB, application/msword)
2015-01-19 12:58 UTC, Timur
Details
Test ODT document saved as DOCX in LO 4.4.0-beta1 (4.42 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-01-19 12:58 UTC, Timur
Details
Test ODT document saved as DOCX and DOC compared in LO 4.3, LO 7.2+ and MSO (149.99 KB, image/png)
2021-05-06 14:43 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2015-01-19 12:54:43 UTC
Simple paragraph background from ODT is not saved when document is saved as DOC or DOCX. Problem starting from LO 4.4.0 and confirmed in 4.5.0 master so regression. Tested on Win 64bit.
Comment 1 Timur 2015-01-19 12:56:49 UTC
Created attachment 112460 [details]
Test ODT document with background line
Comment 2 Timur 2015-01-19 12:58:04 UTC
Created attachment 112461 [details]
Test ODT document saved as DOC in LO 4.4.0-beta1
Comment 3 Timur 2015-01-19 12:58:41 UTC
Created attachment 112462 [details]
Test ODT document saved as DOCX in LO 4.4.0-beta1
Comment 4 Kevin Suo 2015-01-19 13:49:37 UTC
CONFIRMED with
Version: 4.4.0.2
Build ID: a3603970151a6ae2596acd62b70112f4d376b990
Locale: zh_CN
Win 7 X86.

Set to NEW.

By the way, when save as DOCX, the "paragraph area gradient" is showing as a text frame when repen in Writer. (This may be another issue and should not be tracked in this bug).
Comment 5 Kevin Suo 2015-01-19 13:56:28 UTC
This is a major bug. It causes format loss when save to DOC/DOCX formats.
Comment 6 Rostislav 'R.Yu.' Okulov 2015-01-23 05:39:58 UTC Comment hidden (obsolete)
Comment 7 Matthew Francis 2015-01-23 15:19:35 UTC
This seems partly related to bug 88337, but the symptoms and sequence of commits are both slightly different.

The loading of background colours from attachment 112460 [details] was broken completely by commit 7d9bb549d498d6beed2c4050c402d09643febdfa. The loading was then fixed by commit 3350fabd23859eb5fdbe77c6db9248866d4e2995, but since only some of the colours are saved to .docx

Adding Cc: to vmiklos@collabora.co.uk


commit 7d9bb549d498d6beed2c4050c402d09643febdfa
Author:     Armin Le Grand <alg@apache.org>
AuthorDate: Mon Jun 2 15:00:50 2014 +0000
Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
CommitDate: Tue Jul 1 13:30:09 2014 +0200

    Related: #i124638# Second step of DrawingLayer FillAttributes...
    
    for Writer objects, now added support for Paragraph and PageStyle (including
    Header and Footer) for direct attributes and style attributes
    
    (cherry picked from commit cc25c58f7052827bfebdc9fbeec668c8fa29ed1b)



commit 3350fabd23859eb5fdbe77c6db9248866d4e2995
Author: Miklos Vajna <vmiklos@collabora.co.uk>
Date:   Mon Jun 30 13:46:04 2014 +0200

    SwXAutoStyle::GetPropertyValues_Impl: fix handling of CharAutoStyleName
    
    Without this, all character properties defined inside automatic styles
    are ignored.
    
    Change-Id: I3c25f5d36503a9f40834dd88573a40c34380b967
Comment 8 Miklos Vajna 2015-01-30 17:54:17 UTC
We'll need something like 84c40768f8acb0342dcfa223133497f57620fc14 that fixed the same problem for page backgrounds.
Comment 9 Commit Notification 2015-01-31 09:59:00 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=60cdeb2d441a6bf5c55f511f574b2b9dd598fbb8

tdf#88583 MSWordExportBase: fix handling of paragraph background color

It will be available in 4.5.0.

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 10 Timur 2015-02-03 15:57:05 UTC
Please make a backport for 4.4, which has a long time to go yet.
Comment 11 Commit Notification 2015-02-05 10:46:22 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

tdf#88583 MSWordExportBase: fix handling of paragraph background color

It will be available in 4.4.1.

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 12 Commit Notification 2015-02-09 16:02:33 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

Related: tdf#88583 writerfilter: import paragraph color as fill attributes

It will be available in 4.4.1.

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 13 Commit Notification 2015-02-11 15:09:44 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

Related: tdf#88583 RTF export: need to take care of fill attributes when ...

It will be available in 4.4.2.

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 14 Robinson Tryon (qubit) 2015-03-31 16:02:21 UTC Comment hidden (obsolete)
Comment 15 Robinson Tryon (qubit) 2015-12-17 08:45:17 UTC Comment hidden (obsolete)
Comment 16 Stephen 2021-05-01 01:59:12 UTC
Appears the problem persists. Using 7.1.2.2 on Windows 10 and Linux Pop OS. Gradient background in odt does not save in docx. Tried editing the docx and applying the format, but upon opening again, the formatting had disappeared.
Comment 17 Timur 2021-05-06 14:43:41 UTC
Created attachment 171702 [details]
Test ODT document saved as DOCX and DOC compared in LO 4.3, LO 7.2+ and MSO

Appears Stephen is right.
Up to LO 4.3 both paragraph area fill and  paragraph area gradient were exported correctly to DOC and DOCX and reopened in LO and MSO.
Regression spoiled both and fix corrected only paragraph area fill.
Comment 18 Timur 2021-05-07 08:21:28 UTC
I reported Paragraph area gradient as bug 142144.
Miklos, please see if you can fix it because it's from your commits, you already fixed this one and you are in a smaller group of devs who work both with DOC and DOCX.