Richard Bos schrieb: > Hi, > > Is it possible to insert a file in the ODT archive? Or in other words to > piggy pack a file inside the odt document? Of course this is possible, by > just zipping it into the document, but I would actually like to know whether > is possible via an GUI option in oowriter.
No GUI option, but possible via API. Should be possible in Basic. > In case the extra file (a script e.g.) is just zipped into the ODT archive, > without any additional modification to e.g. the meta.xml files, will the > extra file stay inside the ODT even when it is processed afterwards multiple > times with OpenOffice.org? If you insert the file in the right way it will stay. What you need to do is creating a "folder" inside the package and assign a "type" to it. Why this? We decided that file additions must be put into a folder of the zip container. As OOo already has some folders that can be seen as additions and that it maintains by itself (e.g. Basic, Images) we also decided that "external" folders that OOo just should maintain must be marked by a media type in the manifest.xml. It doesn't need to be a registerd Mime type, it's just anything you like. You should use reversed domain notation to have your own "namespace". So a usual media type would be "org.myproject.myapplication.mytype" or "vnd.companyname.productname.type". OOo itself uses "org.openoffice" or in some places "vnd.sun.star". Ciao, Mathias -- Mathias Bauer (mba) - Project Lead OpenOffice.org Writer OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't reply to "[EMAIL PROTECTED]". I use it for the OOo lists and only rarely read other mails sent to it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
