Bug 90946 - ODF import: Frames not imported in 4.4 - ODT created by 4.3 is invalid with spurious draw:fill-gradient-name referencing non-existent gradient
Summary: ODF import: Frames not imported in 4.4 - ODT created by 4.3 is invalid with s...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: Other All
: medium major
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: odf target:5.1.0 target:5.0.0.0.beta2...
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-04-29 20:48 UTC by Zeki Bildirici
Modified: 2016-10-25 19:19 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT file which consists frames (152.73 KB, application/vnd.oasis.opendocument.text)
2015-04-29 20:48 UTC, Zeki Bildirici
Details
The PDF version of original file, which it should look like and it is as in 4.3 (50.75 KB, application/pdf)
2015-04-29 20:48 UTC, Zeki Bildirici
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zeki Bildirici 2015-04-29 20:48:16 UTC
Created attachment 115198 [details]
ODT file which consists frames

Hi,

The attached odt file is created on LibreOffice 4.3 and includes frames. If you open the file with LibreOffice 4.4, the frames disappeares. 

It should look like the attached PDF version.

Best regards,
Comment 1 Zeki Bildirici 2015-04-29 20:48:47 UTC
Created attachment 115199 [details]
The PDF version of original file, which it should look like and it is as in 4.3
Comment 2 raal 2015-04-30 14:27:13 UTC
I can confirm with Version: 5.0.0.0.alpha1+
Build ID: 59adad74084e9281887e3f78a225794f37b784d7
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-04-29_12:40:39

it's correct in LO 4.3.7, regression
Comment 3 Michael Stahl (allotropia) 2015-05-22 13:55:37 UTC
inserting the frames fails with IllegalArgumentException.

the style on the frames in the document looks like this:

<style:graphic-properties style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" fo:background-color="#dddddd" style:background-transparency="0%" draw:fill="solid" draw:fill-gradient-name="Sarı_5f_5f_5f_5f_..._5f_5f_5f_3">

the value of the fill-gradient-name is 12638 bytes long!

there is no gradient defined in the styles.xml.

the fill-gradient-name should not be there because of draw:fill="solid".

so the document is invalid...

not sure if this can really be regression, it's caused by
the usual drawing-fill-style refactoring.
Comment 4 Michael Stahl (allotropia) 2015-05-22 16:44:14 UTC
i've added a work-around to just ignore the invalid gradient,
let's hope this will not cause other issues...
Comment 5 Commit Notification 2015-05-22 16:44:52 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=00eab70295cbce40368d57224c3f51c6e5f2457e

tdf#90946: sw: ODF import: ignore invalid gradient-name if style SOLID

It will be available in 5.0.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 6 Commit Notification 2015-05-22 16:46:21 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

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

tdf#90946: sw: ODF import: ignore invalid gradient-name if style SOLID

It will be available in 5.0.0.0.beta2.

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 7 Commit Notification 2015-05-25 14:54:57 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

tdf#90946: sw: ODF import: ignore invalid gradient-name if style SOLID

It will be available in 4.4.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 8 Robinson Tryon (qubit) 2015-12-17 08:59:57 UTC Comment hidden (obsolete)