Mike Carifio wrote: > Mike Carifio wrote: >> Is it possible to read/write/edit .odt files with swriter in their >> "unzipped" state? That way I can use svn for version control of the >> parts. Pl. advise. Thanks. > > I wasn't specific enough in my question. Second try. > > Suppose I create a document using swriter 3 called > my_example_document.odt. It's a "binary document", but actually > it's a zip file which I could unzip after I've saved it. > > On a recent Linux using bash and unzip, I could say something like: > > $ unzip -d my_example_document my_example_document.odt > $ cd my_example_document > $ ls -1 > Configurations2 > content.xml > META-INF > meta.xml > mimetype > settings.xml > styles.xml > Thumbnails > > This is the "exploded" content of the odt file my_example_document.odt. > I could (say) check this into an svn repo with something like: > > $ svn add ..; svn commit .. -m "my_examnple_document" > > Ok, good so far. Now I update my_example_document.odt using swriter, > adding some more content. If I want the exploded contents to reflect > these changes, I need to do the unzip operation again, overwriting > the old contents of the directory my_example_document. What I'm looking > for is an approach that reads the document from the directory > my_example_document, let's me edit the contents, and then writes out > the document to my_example_document unzipped. > > Based on the previous responses, I guess that there's nothing current > "built in" that makes swriter work this way. I might be able to write > something myself, but I don't currently have enough swriter expertise > to do this. But I can ask the question. Please advise. Thanks.
As I wrote, once there was something built-in and the following macro should have stored everything so that it looks like an unzipped ODF file: dim props(1) as new com.sun.star.beans.PropertyValue props(0).Name = "Overwrite" props(0).Value = "True" props(1).Name = "Unpacked" props(1).Value = "True" ThisComponent.storeToURL(myURL, props()) But it doesn't work in 3.0, so this API feature broke somewhere in the past. I already had a look on the code and indeed there's a bug that prevents it from working. Regards, Mathias -- Mathias Bauer (mba) - Project Lead OpenOffice.org Writer OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't reply to "nospamfor...@gmx.de". I use it for the OOo lists and only rarely read other mails sent to it. --------------------------------------------------------------------- To unsubscribe, e-mail: discuss-unsubscr...@openoffice.org For additional commands, e-mail: discuss-h...@openoffice.org