Created attachment 115420 [details] Example legacy doc containing a frame with an image applied to background When loading legacy odt documents in LibreOffice 4.4, a frame with an image set as the background is loaded incorrectly. The frame's area is changed to color: white and the transparency is set to 100%. LibreOffice 4.4 brought many changes to the way frame backgrounds are handled. The changes brought quite a few bugs dealing with loading frames with an image applied to their background areas. Many of these bugs were fixed, but I still have many legacy documents that are affected. We've been using some form of StarOffice/OpenOffice/LibreOffice since before Sun aquired StarOffice. Many of our documents are based on templates originally created a decade ago. Some of these documents are very complicated newsletters kept for archival purposes. This is probably very similar to (if not the same bug as) bug 86578 and bug 90640, but the patches don't fix legacy documents. Rather than go through the nightmare of reopening those, I'm creating this new report. The frames loaded correctly in versions up to 4.4.0. I tested this in 4.4.3.2 and the most recent nightly and it is still broken: Version: 5.0.0.0.alpha1+ Build ID: 6e78bf76f3a10b43475e1bd801bdcbb9ce62f668 TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2015-05-07_00:08:39 Locale: en-US (en_US.UTF-8)
Confirming. Frame background image is visible in Version: 4.3.7.2 Build ID: 8a35821d8636a03b8bf4e15b48f59794652c68ba But not visible when the ODT is opened in 4.4.0+, including current builds of master. And if saved there, the background graphic is being lost to a "color" fill in white. Reopening in < 4.3.7.2 no longer shows background graphic--the Penguin .PNG is deleted from the ODF archive, so there is data loss as things are.
the document has this in content.xml: <style:graphic-properties fo:background-color="transparent" style:background-transparency="100%" draw:fill="solid"> <style:background-image xlink:href="Pictures/10000000000002A6000001B3A05E6B9F.png" xlink:type="simple" xlink:actuate="onLoad" style:repeat="stretch" draw:opacity="100%"/> </style:graphic-properties> ... the draw:fill="solid" in there is clearly bogus given that everything else implies it has a background image. <meta:generator>LibreOffice/4.3.4.1$Linux_X86_64 LibreOffice_project/bc356b2f991740509f321d70e4512a6a54c5f243</meta:generator> sigh... what are the steps to create such an invalid document / how many of these documents are out there?
hmm so if i load and store the attachment, the draw:fill is preserved starting here: c5cf7905a2df4660695afe4f690e8d466931b58c..bc4f4de5fde53a46ff835a150f3128db2f63f860 which contains some commits about adding Gradient background like: commit bb00150ef62ccd256b3e8ec2dabec5eb2d6a667f Author: Miklos Vajna <vmiklos@suse.cz> AuthorDate: Tue Jan 29 11:10:22 2013 +0100 xmloff: export Wrtier's RES_FILL_STYLE and RES_FILL_GRADIENT commit 81a46fc86a530f028a5bd2f5e52fe0372d50ee38 Author: Miklos Vajna <vmiklos@suse.cz> AuthorDate: Mon Jan 28 18:07:45 2013 +0100 SvXMLExport::_ExportStyles: also try to export text gradients They are not exported automatically, as SvxUnoNameItemTable needs a Which ID, and it's different for drawinglayer and Writer gradients.
added a workaround on master
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=97887cd810194ee556d2ec12f2a8be40075c29d2 tdf#91140: ODF import: try to ignore invalid draw:fill="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.
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=fad75997e6060c63e6d79327573dd51950da1acb&h=libreoffice-4-4 tdf#91140: ODF import: try to ignore invalid draw:fill="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.
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=12f907da9535ae9fb28fb7ef1b05240eabf51e82 tdf#91140: tweak fix a bit, turns out xmloff was also passing empty URL 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.
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=7dba64e6e4e7dfa4268b5d4c3ba296ac02aa814b&h=libreoffice-5-0 tdf#91140: tweak fix a bit, turns out xmloff was also passing empty URL 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.
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=7cbcb57df49d8b0cc28c28c5a04bcac464b504fb&h=libreoffice-4-4 tdf#91140: tweak fix a bit, turns out xmloff was also passing empty URL 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.