Bug 90640 - Text frame background graphic set to 100% transparency on saving a document
Summary: Text frame background graphic set to 100% transparency on saving a document
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.5.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: odf target:5.0.0 target:4.4.3 target:...
Keywords: bisected, regression
: 89442 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-04-15 19:26 UTC by Paddy Landau
Modified: 2018-10-08 12:15 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paddy Landau 2015-04-15 19:26:44 UTC
Saving a document removes background graphics from frames, and thereafter the graphics cannot be replaced.

Steps to replicate:

1. Create a Writer document, or reuse an existing document.

2. Add a frame (or reuse a frame).

3. Edit the frame and add a graphic ("Bitmap"). This can be either one of the provided backgrounds or one of your own ("Import Graphic").

4. Save and close the document.

5. Reopen the document. Notice that the background graphic has been replaced with white.

6. Edit the frame and re-add the graphic. Notice that whatever you choose will not be honoured, and the frame will remain white.

Extra notes:

This seems to be an unintended side-effect of the patch to fix bug #86578. This bug has been submitted as requested in that bug's comments.
Comment 1 V Stuart Foote 2015-04-15 20:14:18 UTC
onfirmed

Version: 4.5.0.0.alpha0+ (x64)
Build ID: a4757e800be39ca528d3b7d3f39b09d10c39978e
TinderBox: Win-x86_64@42, Branch:master, Time: 2015-04-15_03:14:02
Locale: en_US
Comment 2 Paddy Landau 2015-04-15 20:29:55 UTC
New information:

It seems that the graphic is not replaced, but rather that the Transparency is set to 100%.

Change the transparency to either None or 0%, and the graphic reappears; but of course only until the document is saved and closed again.
Comment 3 tmacalp 2015-04-16 18:07:00 UTC
Interesting.  This bug appears to affect all bitmaps, even those chosen from the list.

Also, bug 82784 can add confusion to those testing this bug for those attempting to fix the 100% transparency in frames with an image set as the background.  If you use the normal frame properties dialog and visit the Area tab, the bitmap list will change your custom image to the first item in the list, "Blank."  At that point, the background really will be white.

I'm guessing other people testing this bug were fixing the transparency by using the sidebar?
Comment 4 Paddy Landau 2015-04-17 10:42:33 UTC
> I'm guessing other people testing this bug were fixing the transparency by using the sidebar?

In my case, I think that it might have been luck of the draw, as I didn't even know that you could do it from the tool bar.

If the transparency tab is opened without opening the area tab (e.g. if you have opened that tab previously), the area won't be changed.

I have just tested and indeed you are right: bug #82784 does confuse the issue greatly. I shall add these two bugs as "see also" to each other.
Comment 5 Paddy Landau 2015-04-17 10:45:38 UTC
By the way, as this is a regression, shouldn't the importance be rated as "high"?
Comment 6 Michael Stahl (allotropia) 2015-04-20 13:59:14 UTC
this changed with:

commit bc892b04144d82507ccd59953c9f4da357c2e7b4
Author:     Caolán McNamara <caolanm@redhat.com>
AuthorDate: Tue Apr 14 10:14:42 2015 +0100

    Related: tdf#90130 gradient transparency goes missing


but it's not clear to me that it's a bug, a stored document from 4.4.2.2 contains this:

  fo:background-color="transparent" style:background-transparency="100%" draw:fill="bitmap" draw:fill-image-name="Sky"

the properties contain both old style:background-image and new draw:fill*:

      <style:graphic-properties style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph" fo:background-color="transparent" style:background-transparency="100%" draw:fill="bitmap" draw:fill-image-name="Sky" draw:fill-image-width="0cm" draw:fill-image-height="0cm">
        <style:background-image xlink:href="Pictures/100000000000005E0000005E47394922.png" xlink:type="simple" xlink:actuate="onLoad" draw:opacity="100%"/>
      </style:graphic-properties>

... so reading that and setting it transparent looks like the right
thing to do, question is why does 4.4 store that transparency thing?

LO 4.3 (and OOo 3.3) writes something similar:

      <style:graphic-properties style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph" fo:background-color="transparent" style:background-transparency="100%">
        <style:background-image xlink:href="Pictures/10000000000000400000003C7A6ECFC1.jpg" xlink:type="simple" xlink:actuate="onLoad" draw:opacity="100%"/>
      </style:graphic-properties>


... so the transparency is overridden by the draw:opacity="100%" on the image.

so it's possible that the harmless transparent attributes should not be written by 4.4 since they're no longer harmless because of the new draw:fill attributes.  or perhaps that commit was wrong after all?
Comment 7 Michael Stahl (allotropia) 2015-04-20 22:41:27 UTC
the real question is why is 4.4 not export draw:opacity attribute to go along with the fill attributes.

for API compatibility, the implementation of old property BackColorTransparency return 100% if the fill style is bitmap, which is exported as style:background-transparency="100%".

so for "bitmap" background, it was never the case in older versions that style:background-transparency="100%" actually *meant* anything - it was always wrong - the real value was exported on the background-image child element.

therefore the fix for bug 90130 - which is really a fix-up for
4.4.0 - 4.4.3.1 *omitting* draw:opacity attribute - needs to be
restricted not to affect bitmaps.

so there are 3 different bugs here.

fixed on master

thanks Paddy for quickly finding and reporting this bug!
Comment 8 Commit Notification 2015-04-20 22:41:54 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=822cb231c9aee2b69d0e645d2fddbab1dfbe3d14

tdf#90640: sw: ODF export: fix wrong property types in FILL_PROPERTIES_SW

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 9 Commit Notification 2015-04-20 22:41:58 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#90640: sw: ODF export: be consistent when exporting RES_BACKGROUND

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 10 Commit Notification 2015-04-20 22:42:02 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=09f0919f9a1686f6c1492777307e77f841294192

tdf#90640: sw: ODF import: ignore style:background-transparency for

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 11 Commit Notification 2015-04-21 13:52:22 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#90640: xmloff: ODF export: fix style:background-image attributes

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 12 Commit Notification 2015-04-21 14:26:52 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=b7493a65160a55ed3885aaa56ecb99646e615c87&h=libreoffice-4-4

tdf#90640: sw: ODF export: fix wrong property types in FILL_PROPERTIES_SW

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 13 Commit Notification 2015-04-21 14:35:50 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=04946086b0b08d1ab0de2a91959299312f140ed4&h=libreoffice-4-4

tdf#90640: sw: ODF export: be consistent when exporting RES_BACKGROUND

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 14 Commit Notification 2015-04-21 14:40:21 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=61381728047e627cfc66c32aa148a20786c99da0&h=libreoffice-4-4

tdf#90640: sw: ODF import: ignore style:background-transparency for

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 15 Commit Notification 2015-04-21 14:50:37 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=af9db3f55f61d57187be98997fc03167d22fb864&h=libreoffice-4-4

tdf#90640: xmloff: ODF export: fix style:background-image attributes

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 16 Paddy Landau 2015-04-21 14:59:09 UTC
This appears to be fixed in the latest master 5.0.0.0.alpha1+.

Thank you.
Comment 17 Commit Notification 2015-04-22 04:09:53 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4-3":

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

tdf#90640: xmloff: ODF export: fix style:background-image attributes

It will be available in 4.4.3.

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 18 Commit Notification 2015-04-22 04:09:57 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4-3":

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

tdf#90640: sw: ODF import: ignore style:background-transparency for

It will be available in 4.4.3.

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 19 Commit Notification 2015-04-22 04:10:01 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4-3":

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

tdf#90640: sw: ODF export: be consistent when exporting RES_BACKGROUND

It will be available in 4.4.3.

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 20 Commit Notification 2015-04-22 04:10:06 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4-3":

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

tdf#90640: sw: ODF export: fix wrong property types in FILL_PROPERTIES_SW

It will be available in 4.4.3.

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 21 Commit Notification 2015-06-10 20:55:17 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#90640: add a unit test for this

It will be available in 5.1.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 22 Commit Notification 2015-06-15 12:55:27 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=662ec2f1a7bc5472bd73b75f101786afa33dad7c&h=libreoffice-5-0

tdf#90640: add a unit test for this

It will be available in 5.0.0.0.beta4.

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 23 Justin L 2018-10-08 12:15:02 UTC
*** Bug 89442 has been marked as a duplicate of this bug. ***