Bug 122625 - FILESAVE: File size of Flat XML is much larger than for normal format when using linked images
Summary: FILESAVE: File size of Flat XML is much larger than for normal format when us...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0 target:6.2.1 target:6.1.6
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Regressions-imageHandling
  Show dependency treegraph
 
Reported: 2019-01-10 08:37 UTC by dirk.duschinger
Modified: 2019-02-06 11:54 UTC (History)
3 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 dirk.duschinger 2019-01-10 08:37:47 UTC
Description:
Hi,

I have a presentation in which I almost exclusively link graphics. Until now I always saved the file in odp format and the file size was always very moderate (~600kB). Since I wanted to explore something in the XML code, I saved the file in fodp format and noticed that the file size increased to more than 13MB. A quick look into the file confirmed my assumption: all graphics were apparently included in the file as <office:binary-data>. 

A small test with a simple single page presentation, once with linked image and once with the same image embedded, and a diff of the two files showed (except for the header) this minor change:

    <    <text:p text:style-name="Standard"><draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="paragraph" svg:width="6.6929in" svg:height="3.6508in" draw:z-index="0"><draw:image loext:mime-type="image/png">
    ---
    >    <text:p text:style-name="Standard"><draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="paragraph" svg:width="6.6929in" svg:height="3.6508in" draw:z-index="0"><draw:image xlink:href="image.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:filter-name="&lt;All formats&gt;" loext:mime-type="image/png">

The binary-data block was apparently identical. Removing the <office:binary-data> block in the fodp file and reopening it in LO worked fine with the desired result, i.e. the linked graphic were still displayed.

So I assume that the embedding in fodp happens accidentally but can and should be avoided. 

I performed another test with LO Writer, which showed a similar behavior. Therefore I assume that it is a general problem of the Flat XML format in LO.

With kind regards,
Dirk

PS: my tests were performed with LibreOffice 6.1.4.2 10(Build:2)

Steps to Reproduce:
1. Create a new presentation in LO impress and insert a linked image
2. Save file in odp and fodp format

Actual Results:
File size of fodp file is unreasonably larger than in odp format

Expected Results:
File sizes should be comparable 


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Comment 1 Regina Henschel 2019-01-10 20:29:26 UTC
Duplicate to bug 118879 ?
Comment 2 dirk.duschinger 2019-01-10 21:21:00 UTC
(In reply to Regina Henschel from comment #1)
> Duplicate to bug 118879 ?

Ineed it describes the same problem, only for writer, which I've seen as well. Unfortunately there hasn't been much progress on that bug.
Comment 3 Xisco Faulí 2019-01-18 11:36:01 UTC
Yep, it's the same problem as bug 118879

*** This bug has been marked as a duplicate of bug 118879 ***
Comment 4 Xisco Faulí 2019-02-05 15:16:40 UTC
still reproducible in

Version: 6.3.0.0.alpha0+
Build ID: f8c4459bbda62cb905d0c007cac044f3410ab76b
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

-rw-rw-r-- 1 xisco xisco 632785 feb  5 16:12 Linked.fodp
-rw-rw-r-- 1 xisco xisco 632645 feb  5 16:11 Embedded.fodp

thus, not fixed by 
https://git.libreoffice.org/core/+/36aa3f4d6f9e9da7289ed760cfb1e87600cb6459%5E%21
Comment 5 Commit Notification 2019-02-05 17:43:12 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/a7da594593eb2d63004a91dc471683713ce9742a%5E%21

tdf#122625: Use solution for tdf#118879 in a more general case

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2019-02-06 11:52:07 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/ddba20f863e9dc638eef493aaaf45e588f7a4576%5E%21

tdf#122625: Use solution for tdf#118879 in a more general case

It will be available in 6.2.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.