Am Dienstag, 21. Februar 2006 12:54 schrieb Jean-Marc Lasgouttes: > >>>>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: > > Georg> Today I discovered by accident that the fix for bug 2192 that I > Georg> committed one month ago had a mixup in GraphicsCacheItem.C. The > Georg> result is that findTargetFormat now always returns ppm. > > This is pretty bad, isn't it? > > Georg> This patch fixes that and replaces it by the intended behaviour > Georg> (return ppm if the from format is empty, since > Georg> Converter::isReachable would not work with an empty from > Georg> format). OK to go in? > > I would say yes. Lars?
If nobody objects I will put this in both trees tomorrow. I attach the patch again for reference. Georg
Index: src/graphics/GraphicsCacheItem.C =================================================================== --- src/graphics/GraphicsCacheItem.C (Revision 13253) +++ src/graphics/GraphicsCacheItem.C (Arbeitskopie) @@ -335,9 +335,12 @@ typedef lyx::graphics::Image::FormatList FormatList; FormatList const formats = lyx::graphics::Image::loadableFormats(); + // There must be a format to load from. + BOOST_ASSERT(!formats.empty()); + // Use the standard converter if we don't know the format to load // from. - if (!formats.empty()) + if (from.empty()) return string("ppm"); // First ascertain if we can load directly with no conversion Index: src/graphics/ChangeLog =================================================================== --- src/graphics/ChangeLog (Revision 13253) +++ src/graphics/ChangeLog (Arbeitskopie) @@ -1,3 +1,7 @@ +2006-02-17 Georg Baum <[EMAIL PROTECTED]> + + * GraphicsCacheItem.C (findTargetFormat): fix previous fix + 2006-01-11 Georg Baum <[EMAIL PROTECTED]> * GraphicsCacheItem.C (convertToDisplayFormat): handle unknown