On 09/06/2011 10:25 AM, Tommaso Cucinotta wrote:
Il 06/09/2011 03:04, Richard Heck ha scritto:
bool FileName::isZippedFile() const
{
+ string const& ex = extension();
+ bool zipped_format = (ex == "odg" || ex == "sxd"
+ || ex == "odt" || ex == "sxw" || ex == "docx"
+ || ex == "ods" || ex == "sxc" || ex == "xlsx"
+ || ex == "gnumeric" || ex == "dia");
+ if (zipped_format)
+ return false;
Shouldn't that be "return true"?
I know it seems counter-intuitive. What I observed was that, if
isZippedFile() returns true, then LyX thinks the file is zipped and it
needs to unzip it before doing anything with it -- maybe this is ok if
I have something like "myfigure.eps.gz", or "myfigure.svg.gz", etc..
Now, when I detect (by extension for now) that the file is in a zipped
format that is normally managed in its zipped form by tools (e.g.,
converters, visualizers), then I simply return false, pretending the
file is not zipped. This way LyX doesn't try to unzip it, and it calls
the converter properly.
Oh, I see. Perhaps it should be renamed something like
"needsDecompression()" or "needsUnzip()", then.
Richard