Bug 52043 - FILESAVE: When saving as DOCX, OLE object Drawing don't have a preview picture
Summary: FILESAVE: When saving as DOCX, OLE object Drawing don't have a preview picture
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.4 release
Hardware: x86 (IA32) All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords: filter:docx
Depends on:
Blocks: OLE-Objects
  Show dependency treegraph
 
Reported: 2012-07-13 09:14 UTC by S K
Modified: 2021-06-08 10:44 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT file with ole objects (28.88 KB, application/vnd.oasis.opendocument.text)
2012-07-13 14:10 UTC, S K
Details
doc file exported from ole.odt (40.50 KB, application/msword)
2012-07-13 14:11 UTC, S K
Details
docx file exported from ole.odt (4.76 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2012-07-13 14:11 UTC, S K
Details
My 2 test files (38.96 KB, application/x-zip-compressed)
2013-02-25 18:07 UTC, Florian Reisinger
Details
Difference between older docx and docx produced with LibreOffice 5.3.0.3 (134.62 KB, image/png)
2017-02-06 13:37 UTC, S K
Details
ODT saved as DOCX in LO 7.2+ and compared in LO MSO (97.23 KB, image/png)
2021-06-08 10:44 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description S K 2012-07-13 09:14:45 UTC
Problem description: 

There are major issues with OLE objects and DOC/DOCX files (exporting and importing drawing for example).  


When saving ODT file to DOC/DOCX it would be very good to add possibility to "export" OLE objects as a picture (PNG or JPEG).
Comment 1 Valek Filippov 2012-07-13 12:41:01 UTC
OLE supports embedding of the 'Preview' picture into 'Summary Information' stream of the container. Using it could be a better option.

What do you think?
Comment 2 S K 2012-07-13 14:10:33 UTC
Created attachment 64177 [details]
ODT file with ole objects
Comment 3 S K 2012-07-13 14:11:09 UTC Comment hidden (obsolete)
Comment 4 S K 2012-07-13 14:11:30 UTC
Created attachment 64179 [details]
docx file exported from ole.odt
Comment 5 S K 2012-07-13 14:22:46 UTC
If we look deeper at the attachments we see:
 * ole.doc looks quite ok. There are only some other issues (error in rasterization of drawing and wrong layout)
 * ole.docx, there only the equation is shown ok. Everything else is empty. 

For such case image should be exported to docx. Or at least "Preview" picture appended. Maybe this is a bug?


"Preview" picture for most cases could be OK. But hard to say...


Somewhere should be possible to adjust parameters of rasterization maybe.
Comment 6 Valek Filippov 2012-07-14 16:11:56 UTC
Missed parts of the drawing is a bug (or bugs).

'Export as a picture' doesn't sound as a good solution (unless it's optional).
If you export as a picture receiver would lose any benefits embedded object can provide (including upscale w/o quality degradation).
On another hand if you embed some object for which receiver doesn't have an application to render, then it would be lost completely.
For such cases MSO can use a preview image if one is provided in 'Summary Information'. I don't think there are technical limitations on the quality of the inserted 'preview'.

I think you can shape this enhancement request and open another one as a bug; or convert this one into bug and open another one as a feature request.
Comment 7 S K 2012-07-16 08:48:52 UTC
Feature could be solved with creating an extension (rasterize all graphics for example) in other ticket. If even anybody will need it. 



Main problem of this ticket is:

When exporting to DOCX, OLE objects lost the preview pictures. Especially drawing, charts.

If we compare file size of doc and docx files we see that docx lost the preview pictures. 


As preview picture exist in DOC file, the problem lies in DOCX exporter.
Comment 8 Florian Reisinger 2013-02-25 17:55:37 UTC
DOC
NOT WORKING:
Chart
Drawing

DOCX
(Error on opening --> Repairing; complains about Incompatibility with MS Word and provides a link to a converter)
NOT WORKING:
Evewrything but Formula --> Drawing is Picture



Using Version 4.1.0.0.alpha0+ (Build ID: 74f74aa5470fe631c7827897742c0ccbddcf6ad)
TinderBox: Win-x86@6, Branch:master, Time: 2013-02-23_23:21:01 and MS Word 2010
Comment 9 Florian Reisinger 2013-02-25 18:07:01 UTC
Created attachment 75520 [details]
My 2 test files
Comment 10 Timur 2017-01-05 18:02:05 UTC
This bug looks strange to me. You mean, if OLE is not present, to add at least picture? That's not how LO should work. 
Seems like DOCX has some issues, although there was an improvement. 
DOC is fine, but that should be a separate bug anyway. 
Please test with LO 5.3 beta and 5.4. master and report back. You can get http://tdf.io/siguiexe to run parallel LO (extract without installation).
I'd recommend this one be closed and clean new bug report created.
Comment 11 S K 2017-02-06 13:37:38 UTC
Created attachment 130945 [details]
Difference between older docx and docx produced with LibreOffice 5.3.0.3
Comment 12 S K 2017-02-06 13:39:21 UTC
Version 5.3 is better. See last attachment.

The original idea of this ticket is also written here:
http://vmiklos.hu/blog/lo-insert-pdf-image.html

Quote: Similarly to the SVG feature, the original vector image is stored in the document, but when saving to ODF, a replacement PNG file is also generated to be backwards compatible with older ODF readers. The image context menu → Save menu item allows to extract your original PDF data from the image, too:
Comment 13 Timur 2018-10-17 11:43:09 UTC Comment hidden (obsolete)
Comment 14 Timur 2018-12-24 15:15:14 UTC Comment hidden (obsolete)
Comment 15 Timur 2021-06-08 10:44:25 UTC
Created attachment 172702 [details]
ODT saved as DOCX in LO 7.2+ and compared in LO MSO