Download it now!
Bug 118272 - Context menu on document OLE object should always have "Edit" and "Save Copy as.." actions
Summary: Context menu on document OLE object should always have "Edit" and "Save Copy ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.7.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:doc
Depends on:
Blocks: DOC-Objects
  Show dependency treegraph
 
Reported: 2018-06-20 15:58 UTC by Matti Aarnio
Modified: 2019-10-07 12:11 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Nested (embedded) documents inside document inside documents (76.50 KB, application/msword)
2018-06-21 16:35 UTC, Matti Aarnio
Details
Screenshot of context menu (22.74 KB, image/jpeg)
2018-06-26 07:29 UTC, Dieter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matti Aarnio 2018-06-20 15:58:20 UTC
I have received a DOC97 (".doc") document that contains a bunch of DOC97 and DOCX documents.

LibreOffice Writer can open DOC97 and XLS97 documents inside the DOC97, but fails to recognize DOCX and XLSX documents when they are OLE-embedded.

This looks like a generic issue in file opening, where context is telling what kind of files are possible to open -- or even to extract out of another document.

When on a ".doc" document I get right button context menu on OLE-embedded files offering "Save Copy as .." of the file. There is also "Edit".

On same ".doc" document right clicking a ".docx" file does not offer neither Edit, nor Save actions.

If the file type is unknown for some reason, maybe Edit could be omitted, but why the Save action is not offered in all OLE-embedded files?


When "Save Copy as" is offered, it does not get the filename information from embedding wrapper, and default file name for saving is therefore "Untitled N".





This is probably very old issue, even 3.x, but I am reporting what I have at my workstation.
Comment 1 Matti Aarnio 2018-06-20 16:32:22 UTC
One part of document embedding structure is following:

DOC ( DOC ( DOCX ))

calling these as "doc1", "doc2", and "docx3" below.

Writer 6.1 Beta 2 (61b2) saves nicely the first embedded level document ("doc2"), but none of documents embedded inside it ("docx3).

This writer 6.1b2 is able to open (left double-click) the first embedded level ("doc2") showing that there is inner embedded document ("docx3").  But it fails to open that inner document.  (Opens it with Linux KDE Ark.)

When MS Office is used to save the first embedded level document, then Writer 61b2 is able to open the second level (now first level) embedded DOCX, but is unable to save it from the context menu (mouse right click).  However it is possible to save it from embedded editor.


When I opened the "doc1", and then embedded opened "doc2", I was able to save the "doc2" except the resulting file did not contain embedded document.


So it looks like:
- Context menu on OLE object should always have "Save Copy as.." action even
  when that document is otherwise of unknown type.
- Saving (/File/Save Copy As../) of embedded open needs to save also all
  possible embedded documents inside that level.
Comment 2 Dieter 2018-06-20 18:02:37 UTC Comment hidden (obsolete)
Comment 3 Julien Nabet 2018-06-21 07:27:03 UTC Comment hidden (obsolete)
Comment 4 Tor Lillqvist 2018-06-21 07:34:40 UTC
I don't think this has anything to do with my recent work. That work is about using LibreOffice from some (OLE) Automation client, or (through the COLEAT software) from a COM client in general that thinks it is talking to MSO. Not directly related to supporting features in some document format.
Comment 5 Tor Lillqvist 2018-06-21 07:35:25 UTC Comment hidden (obsolete)
Comment 6 Matti Aarnio 2018-06-21 16:35:13 UTC
Created attachment 143005 [details]
Nested (embedded) documents inside document inside documents

Nesting structure is about:

  doc1( doc2( doc3, docx3b ), docx2( docx3b ))

This is created with latest MS Office Word, and does exhibit same lack of explicit save buttons on libreoffice 6.1 beta2 as on 5.4.x series.

Double-clicking icons does open nested documents, but saving a document with nested documents does not save that level + nested ones.
Comment 7 Dieter 2018-06-21 18:35:52 UTC
I can't reproduce it with the document from attachment 143005 [details]. If you mark the objects by clicking the left button and then open the context menue, you always get the entries "edit" and "save Copy as". If you only opens the context menu, these entries are not there.
Comment 8 Matti Aarnio 2018-06-25 13:47:37 UTC
I start the ooffice61 (beta2) with doc1.doc.

Left-click on "Doc2.doc" icon highlights it (blue squares around).
Right-click on it does not show "Save Copy as.." et.al.

Double-left-click on "Doc2.doc", close that window.

Now right-click on "Doc2.doc" (on doc1.doc) shows the context menu.

Left-click "Doc2b.docx", and right-click does not show "Save Copy as.." et.al.
Double-left-click on "Doc2b.docx", close the new window, and now right-click does show "Save Copy as..".

Released LibreOffice 5.4.x does not learn file type even with double-left-click.

---

Does it matter than I am running Fedora Linux x86-64?
Comment 9 Buovjaga 2018-06-25 18:35:16 UTC
(In reply to Dieter Praas from comment #7)
> I can't reproduce it with the document from attachment 143005 [details]. If
> you mark the objects by clicking the left button and then open the context
> menue, you always get the entries "edit" and "save Copy as". If you only
> opens the context menu, these entries are not there.

Do you have MSO installed? I don't see these entries on Windows or Linux. I think my problem is the same as bug 98077. Perhaps this can indeed be closed as duplicate, if Dieter has MSO?
Comment 10 Dieter 2018-06-26 07:29:06 UTC
(In reply to Buovjaga from comment #9)

> Do you have MSO installed?
No
> I don't see these entries on Windows or Linux.
See Screenshot

But perhaps I haven't grasp the problem, because normally I don't work with nested documents.
Comment 11 hasan md mahamudul 2018-06-26 07:29:35 UTC Comment hidden (obsolete)
Comment 12 Dieter 2018-06-26 07:29:42 UTC
Created attachment 143124 [details]
Screenshot of context menu
Comment 13 Dieter 2018-06-26 07:32:17 UTC Comment hidden (obsolete)
Comment 14 Akshya Kumar 2018-06-26 07:49:49 UTC Comment hidden (no-value)
Comment 15 Xisco Faulí 2018-10-18 15:00:54 UTC Comment hidden (obsolete)
Comment 16 Timur 2019-10-07 12:11:01 UTC
We have 3 situations: Windows with MSO installed, Windows without MSO installed, Linux. 
WINDOWS with MSO installed: In my case OLE open with MSO and it shouldn't, so we shouldn't have thos situation at all.
WINDOWS without MSO installed: Behaves like Linux.
LINUX: on fileopen Doc1 right-click doesn't have menus "Save Copy as .." and "Edit". But double-click works fine. And then in Doc2 we have right-click menus "Save Copy as .." and "Edit" for Doc3. 
Interesting, after double-click and close, right-click in Doc1 shows menus ( I guess that confused the reporter for Comment 1 experience). But saving Doc2 and opening it shows it lost Doc3.
On Linux Comment 7 is not reproducible. 

This is still valid request in LO 6.4+, as follows. I change the title for the first. Anyone working on this is welcomed to do all three.
> So it looks like:
> 1. Context menu on OLE object should always have "Save Copy as.." action even
>   when that document is otherwise of unknown type.
> 2. Saving (/File/Save Copy As../) of embedded open needs to save also all
>   possible embedded documents inside that level.
> 3. When "Save Copy as" is offered, it should get the filename information from  embedding wrapper, not default file name for saving "Untitled N" and ODF type.


Note: I'd say we had improvement in LO 5.x. Because with 5.0 double-click didn't work for me.