Hi Michele,

On 12/08/09 04:01, Michele Zarri wrote:
Thanks for the quick reply Mikhail,

I did what you suggested and it now works in most of the cases: thanks!

I now have a different problem since in many cases when I create the zipPackageFolder with the method getByHierarchicalName("") I discover that this is empty even if gunzip, file-roller, Karc, winzip 7zip tell me that there is at least a file in the archive.

It could be that the repairing mechanics should be improved. But you have mentioned gunzip, is the archive in gzip format? In this case the office can not handle it at all, since only zip-format is supported.

No big deal since all I had to do was to add a test for empty archives which should have been there in the first place, but I still wonder why OOo has to be soooo strict :-)

OOo is working with user documents and so it should strictly check that the document is consistent. Any inconsistency could mean data-loss or manipulation. Thus the office has to detect and report such cases.

Best regards,
Mikhail.


The zip files I am working on are publicly available in case you want to take a look at a couple of them.

Cheers,

Michele

Mikhail Voytenko wrote:
Hi Michele,

The implementation of the package checks the zip format more strictly starting from OOo3.2, this is why some files that could be handled in OOo3.1.1 can not be handled any more directly. But it is correct so, because the file is indeed broken, if the package throws the exception.

I must confess, I do not quite understand what kind of documentation would you expect. Improvement of the broken zip file check is a bug-fix and is definitely no new feature.

In case you would like to repair the file please try to insert object of type NamedValue into the arguments ( args(1) ), with the values
aNamedValue.Name = "RepairPackage"
aNamedValue.Value = true

That will let the package ignore the errors in the broken zip file and try to repair it.

Hope that helps.

Best regards,
Mikhail.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org

Reply via email to