From ab1aef21873acd57fca34628deba68aeb5f5de3f Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Fri, 18 Oct 2002 14:35:42 +0000 Subject: [PATCH] Graphics debug message: unable to convert from ABC to XYZ. That should help diagnosis... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5444 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/graphics/ChangeLog | 4 ++++ src/graphics/GraphicsCacheItem.C | 20 ++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/graphics/ChangeLog b/src/graphics/ChangeLog index 0066b0caa5..da38df4435 100644 --- a/src/graphics/ChangeLog +++ b/src/graphics/ChangeLog @@ -1,3 +1,7 @@ +2002-10-18 Angus Leeming + + * GraphicsCacheItem.C (findTargetFormat): add debug message. + 2002-09-24 Lars Gullik Bjønnes * Makefile.am (INCLUDES): loose SIGC_INCLUDES diff --git a/src/graphics/GraphicsCacheItem.C b/src/graphics/GraphicsCacheItem.C index b599e7c845..c84ad76d39 100644 --- a/src/graphics/GraphicsCacheItem.C +++ b/src/graphics/GraphicsCacheItem.C @@ -325,18 +325,22 @@ string const findTargetFormat(string const & from) lyx::Assert(!formats.empty()); // First ascertain if we can load directly with no conversion - FormatList::const_iterator it1 = formats.begin(); + FormatList::const_iterator it = formats.begin(); FormatList::const_iterator end = formats.end(); - for (; it1 != end; ++it1) { - if (from == *it1) - return *it1; + for (; it != end; ++it) { + if (from == *it) + return *it; } // So, we have to convert to a loadable format. Can we? - FormatList::const_iterator it2 = formats.begin(); - for (; it2 != end; ++it2) { - if (grfx::Converter::isReachable(from, *it2)) - return *it2; + it = formats.begin(); + for (; it != end; ++it) { + if (grfx::Converter::isReachable(from, *it)) + return *it; + else + lyxerr[Debug::GRAPHICS] + << "Unable to convert from " << from + << " to " << *it << std::endl; } // Failed! so we have to try to convert it to XPM format -- 2.39.2