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.

On 12/07/09 05:37, Michele Zarri wrote:
Hello,

I have downloaded the snapshot OOo-Dev_m7 and I get an error when I run a macro that inspects a zip file using the com.sun.star.packages.zip service. The same macro trying to work on the same file works fine on OOo3.1.1

This is the StarBasic code I use and it dies on oZipService.initialize(args()):

Function fnGetArchivedFileFullName( sArchiveWithFullPath As String ) As String
   Dim args(0) As Variant
   Dim oZipService As Object
   Dim oTestArchive As Object
oZipService = createUnoService("com.sun.star.packages.Package") args(0) = ConvertToURL( sArchiveWithFullPath ) oZipService.initialize(args())

[etc...]
End Function

The error message is as follows:
BASIC runtime error.
An exception occurred
Type: com.sun.star.packages.zip.ZipIOException
Message: /so/ws/OOO320/ooo/package/source/zippackage/ZipPackage.cxx: :766; Bad Zip File..



So my two questions:
1. has something changed in the zip package between OOo3.1.1 and OOo3.2? if so is there any documentation of such change?

2. if the answer to the first question is no, I will file a new issue. would it be possible for someone to confirm it?

Thanks in advance for your help.

Cheers,

Michele

---------------------------------------------------------------------
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