Reading a text file from a zip
Posted: Tue Sep 09, 2008 3:29 pm
Sorry for the incompetence on my part, but I need help.
I am writing a cross-platform ooo extension that imports a special kind of a document into OOo Writer and saves it as an odt file.
The document is enclosed in a zip file (with a different extension), and can contain several documents of that sort. The good part is this same zip also contains a special text file, that lists all those files of that sort. So before offering the user a dialog to pick one of the contained special documents, I must parse that txt file from the zip (this file always has the same name).
I saw some code how to extract a file from a zip in ooo basic, but it does not work for me on my OSXintel_3.00m5 (although I am the administrator). The fact is I do not need to write that text document down, I just need to read it into memory and parse the contents; so how would I open a stream or string from a zip in ooo basic?
Thanks for help,
m.
I am writing a cross-platform ooo extension that imports a special kind of a document into OOo Writer and saves it as an odt file.
The document is enclosed in a zip file (with a different extension), and can contain several documents of that sort. The good part is this same zip also contains a special text file, that lists all those files of that sort. So before offering the user a dialog to pick one of the contained special documents, I must parse that txt file from the zip (this file always has the same name).
I saw some code how to extract a file from a zip in ooo basic, but it does not work for me on my OSXintel_3.00m5 (although I am the administrator). The fact is I do not need to write that text document down, I just need to read it into memory and parse the contents; so how would I open a stream or string from a zip in ooo basic?
Thanks for help,
m.