X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2FGraphicsCache.cpp;h=dbf9cafa5e93d0e14ccbefce7ab646280947cbfa;hb=38c2cde0d8695ac5287bae218c4a33a2acf18ef8;hp=b816926c8dff7901b874fe71b58bce8ef6999f94;hpb=b88f6ea3aa1c39849a1d295d106ba7bb491e013b;p=lyx.git diff --git a/src/graphics/GraphicsCache.cpp b/src/graphics/GraphicsCache.cpp index b816926c8d..dbf9cafa5e 100644 --- a/src/graphics/GraphicsCache.cpp +++ b/src/graphics/GraphicsCache.cpp @@ -44,7 +44,6 @@ public: }; -// FIXME THREAD Cache & Cache::get() { // Now return the cache @@ -72,12 +71,12 @@ vector const & Cache::loadableFormats() const return fmts; // The formats recognised by LyX - Formats::const_iterator begin = formats.begin(); - Formats::const_iterator end = formats.end(); + Formats::const_iterator begin = theFormats().begin(); + Formats::const_iterator end = theFormats().end(); // The formats natively loadable. vector nformat = frontend::loadableImageFormats(); - + vector::const_iterator it = nformat.begin(); for (; it != nformat.end(); ++it) { for (Formats::const_iterator fit = begin; fit != end; ++fit) { @@ -94,18 +93,15 @@ vector const & Cache::loadableFormats() const vector::const_iterator fbegin = fmts.begin(); vector::const_iterator fend = fmts.end(); for (vector::const_iterator fit = fbegin; fit != fend; ++fit) { - if (fit != fbegin) - LYXERR(Debug::GRAPHICS, ", "); - LYXERR(Debug::GRAPHICS, *fit); + LYXERR(Debug::GRAPHICS, *fit << ','); } - LYXERR(Debug::GRAPHICS, '\n'); } return fmts; } -void Cache::add(FileName const & file) const +void Cache::add(FileName const & file, FileName const & doc_file) const { // Is the file in the cache already? if (inCache(file)) { @@ -114,7 +110,7 @@ void Cache::add(FileName const & file) const return; } - pimpl_->cache[file] = ItemPtr(new CacheItem(file)); + pimpl_->cache[file] = ItemPtr(new CacheItem(file, doc_file)); }