Il 18/09/2011 16:03, Tommaso Cucinotta ha scritto:

Please test.

I will later today, thanks.

Made a few tests including a sample dia. If it is included as external material, then it works. If it is included as a graphics inset, then it doesn't show on the screen and I have this
on the console:

convert: no decode delegate for this image format `/tmp/lyx_tmpdir.hX4836/gconvert0.Wy4836.fB4836' @ error/svg.c/ReadSVGImage/2811. convert: missing an image filename `ppm:/tmp/lyx_tmpdir.hX4836/CacheItem.JH4836.ppm' @ error/convert.c/ConvertImageCommand/2970.
/home/tommaso/lyx-trunk-ws/lyx-trunk/lib/scripts/convertDefault.py ERROR
Execution of "convert" failed.

In my $HOME/.lyx/lyxrc.defaults, I got correctly the "vector,zipped=native" flag on the dia line.

I had also cleaned the whole LyX cache folder, just to be sure, but it keeps showing the above error.

I also checked that, adding the ODG format and converter (with native=zipped set), it has the same problem. Therefore, in the sequences of calls to guessFormatFromContents(), some path is probably out of your rework (i.e., there's some other ones of those calls that should go through formats.getFormatFromFile()).

My pure guess is that all those calls to isZipped() from InsetGraphics are taking the wrong decision now.

./src/insets/InsetGraphics.cpp:493:    if (file.isZipped()) {
./src/insets/InsetGraphics.cpp:619:    if (params().filename.isZipped()) {

In my last patch, isZipeed() was calling guessFormatFromContents(), which in the end was returning the real format, not gzip/zip. Instead, now it returns zip or gzip, and the graphics machinery starts to unzip and tries to convert.

Bye,

    T.

Reply via email to