Bug Hunting Session
Bug 109102 - RFE Allow to save embedded documents
Summary: RFE Allow to save embedded documents
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.4.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX OLE-Objects
  Show dependency treegraph
 
Reported: 2017-07-13 14:02 UTC by Jan Vlug
Modified: 2017-07-14 18:00 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example document with many embedded documents (2.08 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-07-14 08:19 UTC, Jan Vlug
Details
Screenshot that shows the icons and file names of embedded documents (532.78 KB, image/png)
2017-07-14 08:28 UTC, Jan Vlug
Details
Screenshot that shows the how the document is rendered with default load and save settings (464.65 KB, image/png)
2017-07-14 16:57 UTC, Jan Vlug
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Vlug 2017-07-13 14:02:30 UTC
I received a MS docx document with many embedded other MS format document.
I disabled the load and save conversion for embedded Microsoft Office objects in the options of LibreOffice.

The loaded docx document displays the embedded Microsoft Office objects now as icons with a file name.

What I would like to do now is right-click on these icons and select a 'save' menu option to save the embedded document with it's corresponding name given as the default suggestion of the file name.

However, there is no such menu option to save the embedded document separately.

Double clicking on the icon opens the document correctly as a document in a new Writer window. If I select in this window 'save' or 'save as...' I would also like to see the original name of the document by default filled in.
Comment 1 Jan Vlug 2017-07-13 14:10:58 UTC
Some additional remarks:

There is a difference in the behaviour for an embedded .doc and an embedded .docx document.

For the .doc:
Double clicking the icon opens the document in a new window.

For the .docx:
Double clicking the icon opens the document embedded in a small window. After deselecting the embedded document, the icon disappears and is changed in a icon-size preview window. Right clicking on this preview window gives a 'Save Copy as' menu option. However, the suggested name of the document does not correspond with the original name of the embedded document.
Comment 2 Aron Budea 2017-07-13 14:44:00 UTC
Indeed there's no option to save the embedded document currently.
Regarding comment 2, see bug 108545.
Comment 3 Aron Budea 2017-07-13 14:47:01 UTC
Btw, bug 108545 is in the process of being fixed, you might want to check a daily build.
Comment 4 Aron Budea 2017-07-14 00:08:02 UTC
I don't see the file name anywhere in the raw DOCX, so getting the file name seems to be impossible.

And even Word doesn't allow saving the embedded document from the right-click menu in the container file. While I can imagine it as a convenience feature, I also assume people would normally want to see the embedded document before saving it, they would rarely want to save it blindly, so maybe there isn't much point in such a feature.

UX team, what's your opinion?
Comment 5 Heiko Tietze 2017-07-14 07:36:04 UTC
(In reply to Aron Budea from comment #4)
> UX team, what's your opinion?

No right-click but open+save/as- could imagine security issues otherwise.

The whole workflow sounds not like what many people do in their daily work. Would be good to have test documents attached.
Comment 6 Jan Vlug 2017-07-14 08:19:56 UTC
Created attachment 134625 [details]
Example document with many embedded documents

I attached the document that made me ask for the enhancement.

Initially, I opened the document with the default LibreOffice load and save convert options for Microsoft Office documents. Loading the document with these settings takes very long, but works in the end.

After this experience, I disabled load and save convert for Microsoft Office documents, which results in fast opening of the document, and the display of the embedded documents as icons with the original file name.

To make the documents more easy accessible, I wanted to save them all to separate documents with their original names. So that's my use case.
Comment 7 Jan Vlug 2017-07-14 08:28:31 UTC
Created attachment 134626 [details]
Screenshot that shows the icons and file names of embedded documents

I attached a screenshot of LibreOffice with the document opened. The screenshot shows the embedded documents as icons with their file name.
Comment 8 Heiko Tietze 2017-07-14 08:41:10 UTC
On my i7-7700K it takes about 5min, and the result is not accessible. Could be a separate bug, IMHO.

Additionally to double-click we should provide access to the Open function on top of the context menu as an indicator for the user. And it shouldn't be a big deal to take the original file name.
Comment 9 V Stuart Foote 2017-07-14 14:10:29 UTC
Actually, the embedded documents have generic names--what shows as file names are icons in EMFs linked to the embedded OLE document object.

Extracting the text from within the EMF to assign as a file name would be out of scope, clearly a WONTFIX

And to extract the embedded documents--much simpler to use a Zip utility (I prefer 7-zip) to open the OOXML docx archive's word\embeddings directory, the documents are listed with generic names and can be copied out intact. Then rename as preferred. 

In this case...
Microsoft_Excel_Worksheet2.xlsx,
Microsoft_Excel_Worksheet5.xlsx,
Microsoft_Word_97_-_2003_Document1.doc,
Microsoft_Word_Document1.docx,
Microsoft_Word_Document3.docx,
Microsoft_Word_Document4.docx,
etc.

The linked EMF image icons of the file "name" are in the OOXML docx archive's word\media directory.
Comment 10 Jan Vlug 2017-07-14 16:57:23 UTC
Created attachment 134633 [details]
Screenshot that shows the how the document is rendered with default load and save settings

I also attached a document that shows how the document is rendered with the default load and save options. This is how the document was initially opened. Note that some of the embedded document windows look completely empty. Initially, I did not realize that there were embedded documents.
Comment 11 Jan Vlug 2017-07-14 17:05:11 UTC
Thanks for the tip about extracting the embedded document by unzipping. That works perfectly for me. However, I guess that handling the attached .docx document will pose problems for the average LibreOffice user. When I find time, I will test the document with a more up-to-date LibreOffice version and report any pending issues if there are still any.
Thanks for all your support and remarks.
Comment 12 V Stuart Foote 2017-07-14 18:00:00 UTC
(In reply to Jan Vlug from comment #10)
> Created attachment 134633 [details]
> Screenshot that shows the how the document is rendered with default load and
> save settings
> 
> I also attached a document that shows how the document is rendered with the
> default load and save options. This is how the document was initially
> opened. Note that some of the embedded document windows look completely
> empty. Initially, I did not realize that there were embedded documents.

The missing EMF icon image is a valid rendering issue, the size of the images is not scaling to fit the table cell of the document and the EMF image not centered in the cell appearing empty.

It looks equally misscaled on Word 2016, while Word 2007 gets it about right.

@Mike, aside from the proposed RFE here, which I still see as out of scope--any thoughts on scaling/placement of the EMF image icons? Is that a import filter issue, an EMF filter issue, or just badly formatted EMF?