https://bugs.documentfoundation.org/show_bug.cgi?id=131438

Justin L <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |bibisected, bisected
            Summary|An image that once was an   |An image that once was an
                   |area fill persists in the   |area fill persists in the
                   |file even if it is deleted  |file even after it was
                   |from the collection         |replaced (comment 8)
                   |(comment 7)                 |
            Version|5.3.0.3 release             |4.4 all versions
                 CC|                            |[email protected]

--- Comment #8 from Justin L <[email protected]> ---
The removal of the image from the collection is irrelevant as to whether the
image would/should remain in the ODT. Also irrelevant is whether or not it is a
custom added image.

Simplified steps to reproduce:
1.) In a new file, go to Format > Page Style > Area > Image.
2.) APPLY one of the pre-defined collection (without closing the dialog)
3.) Change image background to a different one in the collection; now click OK.
4.) Save file (as ODT) and exit LO.
5.) Extract the ODT, look in Pictures directory.

Getting both images saved in the ODT started with a massive change
in LO 4.4 with commit 7d9bb549d498d6beed2c4050c402d09643febdfa
Author: Armin Le Grand on 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

It is worth noting that the unnecessary picture is now dropped on the first
round-trip, so relatively low importance. Probably the best code pointer is
when that happened in LO 7.3 with commit
86c0f58b6f9f392865196606173d1b98a6897f32
Author: Michael Stahl on Wed Jul 14 19:50:18 2021 +0200    
tdf#92796 ODF import: remove unused bitmap fills

With CWS impress64 a partial fix for this was implemented to drop
unreferenced named items including all non-color fills after ODF import,
but this is only done in sd so move the code that does that to svx and
call it from sc and sw as well.

Implement some UNO interface for this, it's at least better than a magic
string, and not obvious how a better solution would look like since it's
known only at the end of the import if a bitmap is used or not.

Another problem: when the Area tab is used to change to a different kind
of fill, the items with the details for the previous fill aren't
cleared, and so they are written to ODF files.  Hence bitmaps in the
file can be referenced even if they aren't actually used, and bloat up
the files.

Fix this by dropping all unused draw:fill-image-name attributes in ODF
import.

Also do the same for Gradient and Hatch fills; Transparency gradients
can be combined with anything so leave them as they are.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to