Issue 67385

Summary: embed arbitrary binary files into documents
Product: General Reporter: kdeossi <ossi>
Component: uiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues, orcmid, rushfan, tharaka190, tihomir.kojuharski, trevor.tolk
Version: OOo 2.0.3   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Latest Confirmation in: ---
Developer Difficulty: ---

Description kdeossi 2006-07-14 21:17:44 UTC
it should be possible to embed and link arbitrary (unrecognized) files into 
documents, just like in-line attachments in mime mails. the objects would be 
represented by an icon and a title, (double-)clicking them would open them in 
the (system-wide) configured application. well, i'm sure some of you have seen 
it in M$-office before. :)
Comment 1 michael.ruess 2006-07-17 10:17:32 UTC
Reassigned to requirements.
Comment 2 Joe Smith 2009-04-03 17:51:02 UTC
See also Issue 24047
Comment 3 nicco 2009-11-30 11:19:00 UTC
Just to let you know, it is not very easy for every of my colleagues to 
register, log-in and vote, so I gave you 2 votes, but you can count with 25 x 
2 ;-)
P.S. it is good represented in MS Word. You can chose which icon should be used 
and you can attach doc, xls, ppt or any other text or binary file (zip,..) 
represented by icon.

Thanks
Comment 4 barthanssens 2010-04-04 16:32:59 UTC
Would indeed be a nice feature.

Two ideas on how to implement it:

a) as a general-purpose draw:ole-object filter that accepts any file and does 
not try to produce a preview (with draw:ole-draw-aspect always set to icon 
instead), so the user can just insert it with Insert / Object / OLE-object / 
Create from File (new option: Always Icon)

b) or completely outside the text document: just store the files inside the ODF 
package (with no references to these files within the content.xml), and show 
some sort of panel / sidebar / file navigator... to show the list of attached 
files to the user (IIRC Adobe Reader has a similar option for PDF). Users should 
then be able to use drag'n'drop to copy the attached file to their Windows/Gnome 
Desktop


Comment 5 nicco 2010-04-04 21:24:23 UTC
To barthanssens: 

Very nice. Second option seems to be better for me, but I don't know how much 
effort it would takes. 
Looks like showing icon and keeping file in odf zip container is more simple 
than do previews of external documents.

But it's better something than nothing, so 1 or 2 both are good.


We have 17 votes, but developers aren't interested.
When I asked on some web forum most people started to attack me that it is as 
sending Jpeg pictures inside of Word or videos in Word documents. 

It think they don't understand what it means. ;-( I can explain to anybody how 
this can be done of the 10 top Open Office features. ;-)
Comment 6 howser 2010-05-06 22:23:06 UTC
Attaching or embedding arbitrary files and documents is an essential feature 
for OpenOffice to have MsOffice parity.   It is quite common in an office 
environment to create and receive documents that have embedded files.  An Excel 
spreadsheet may have one or more columns that contain reference or backup 
embedded documents.  A MsWord document may embed related documents - 
spreadsheet, image, executable, etc. , (pdf, doc, xls, ppt, txt, jpg, exe, lnk, 
etc). 

Embedded files is just such a common thing it's surprising that OpenOffice is 
only just now talking about getting this feature on the roadmap.

Please do it asap.  My organization cannot make a commitment to OpenOffice 
without having this feature.  We have too much document creation process 
history and an existing volume of documents with embedded files.
Comment 7 nicco 2010-05-07 11:19:48 UTC
"My organization cannot make a commitment to OpenOffice 
without having this feature.  We have too much document creation process 
history and an existing volume of documents with embedded files."

I absolutely agree. There are thousands of companies where this feature is taken 
as standard. OOo can view and open embedded file (icon) in Word document, but 
can't create new one VISIBLE as ICON.
Comment 8 trevor.tolk 2013-03-01 03:59:30 UTC
This is still an issue in OOo 3.4.1.  OOo can read files that have been embedded via Word.  It can embed files such that they show up in their entirety.  But it can't embed files so that they show up as icons.  Please implement this.
Comment 9 Tihomir Kojuharski 2013-10-16 18:39:08 UTC
That feature would be greatly appreciated!
Comment 10 rushfan 2014-03-12 03:50:39 UTC
I have a situation where I am creating a form in Calc that would benefit greatly from the ability to embed and or display a document that has been scanned to pdf.

An example would be a house plan with hand written annotations, a signed contract, etc.

Regards.
Comment 11 Tharaka Nandasena 2016-04-25 10:21:19 UTC
This feature is a must. Please implement this.
Comment 12 orcmid 2016-04-25 17:01:15 UTC
(In reply to Tharaka Nandasena from comment #11)
> This feature is a must. Please implement this.

SOME ANALYSIS

The only means for accomplishing embedding in the OpenDocument format (ODF) is via OLE.  It is by design that the files .ods, .odt, etc., conform to the OpenDocument format and are interoperably-interchangeable with other implementations that support ODF and the features of ODF being used.

The use of OLE for embedding is provided, at least on Windows platforms, on the Insert > Object > OLE Object > Create from file (without using a link) so that the file will be embedded.  

This lacks two provisions:

 1. You can't, in Apache OpenOffice choose to show the insertion as a simple icon thumbnail.

 2. You can't embed an arbitrary binary file for which there is no recognized OLE "adapter" (usually called a server) on the platform of the user.

Both of those can be handled if there is a registered OLE service that is actually for arbitrary files that allows those files to be presented with an icon thumbnail and the only action is to save the object to disk.  There are of course security implications in the use of such an arrangement, especially if "open" is implemented.  One would have to think very seriously about that.

In any case, such an arrangement could be completely from OpenOffice itself and be available to any OLE-aware application on the computer.

Bart Hanssen's 2014 Comment 4 on this issue describes just such a possibility.  Someone could implement this without involving Apache OpenOffice at all and it would simply work in OpenOffice if installed. 

PS: I note that Microsoft Word 2016 will provide what is called an OLE Packager object for arbitrary files, and the inserted file can be represented using an icon thumbnail.  Unfortunately, all a recipient of such a file can do is ask that the object be "opened" and that will raise a generic security warning for the user since it is a means for distributing malware.  (These embeddings are reflected when the document (saved from Word as .doc or .odt) is opened in OpenOffice, but such embedded content is not usable from within OpenOffice.  The reason for that is not known.

A DESIGN CONSIDERATION

ODF is not designed to be a generic packager of generic files.  In practice, that is what Zip is already for, and ODF documents can be incorporated inside of a Zip package of related materials.  Although ODF *uses* Zip for the components of a single ODF document, that is a highly-customized use.  The customization that achieves standard OpenDocument Format does not define a means for adding arbitrary binary objects to the package and making them usable via the ODF document.

I suppose it is necessary to add that complete feature parity with Microsoft Office is not part of the OpenOffice approach, centered as it is around ODF as the feature set to strive for.