Bug 119100 - Removing an imported bitmap from a frame does not remove bitmap from .odt file.
Summary: Removing an imported bitmap from a frame does not remove bitmap from .odt file.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://ask.libreoffice.org/en/questi...
Whiteboard:
Keywords:
Depends on:
Blocks: Image-Caching ODF-export-invalid
  Show dependency treegraph
 
Reported: 2018-08-05 03:34 UTC by martin.van.boven
Modified: 2019-05-29 12:48 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Five files, from new empty document, to document with frame and Bitmap removed again. The filesize has not shrunk. The image ("Bitmap") file used. (592.90 KB, application/x-7z-compressed)
2018-08-05 03:34 UTC, martin.van.boven
Details

Note You need to log in before you can comment on or make changes to this bug.
Description martin.van.boven 2018-08-05 03:34:19 UTC
Created attachment 143973 [details]
Five files, from new empty document, to document with frame and Bitmap removed again.  The filesize has not shrunk.  The image ("Bitmap") file used.

Removing an imported bitmap from a frame does not remove bitmap file from .odt file.


Actions to reproduce:

Add a frame:
Insert | Frame-> | frame...

Add a background to it, in LibreOffice parlour a "bitmap" that must first be "imported", and then added as "Area":
<Select frame> | Properties... | Area | Bitmap | Import

Observations:
* The imported bitmap becomes visible as background to the frame, but is not visible in the Bitmap pictogram list in the Area tab.
* The document grows in size according to the size of the imported image.

Actions to reproduce:

Remove the background:
<Select frame> | Properties... | Area | Bitmap | None

Observations:
* The background disappears.
* The filesize remains the same, even if the Bitmap is not being used anywhere else in the document.
* There is no interface to list or remove the Bitmap.
* The file and reference to it can be found inside the .odt file in a folder ./Pictures and in Styles.xml.


IMO this is a bug, as it lets a Writer file grow without limit and without method to prune it.
* LibreOffice should add imported Bitmaps to the Bitmaps list, or to a more general management GUI for imported data.
* LibreOffice should have an option to manually manage Bitmaps contained in the document, used or not.
* LibreOffice should perhaps automatically remove unused Bitmaps from the document file.
Comment 1 Buovjaga 2018-09-02 16:31:35 UTC
Confirmed in Ask -> NEW
Comment 2 Olivier Hallot 2019-05-29 12:48:59 UTC
I think this is related to bug#92796.