diff options
author | Gábor Stefanik <netrolller.3d@gmail.com> | 2012-05-01 00:31:47 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-05-01 10:11:24 +0100 |
commit | a0fd9de70634ee42727690824bc1bef7ee7c7eab (patch) | |
tree | 8a3765184ae2451638c2bd17cc597664ad706471 | |
parent | 1bec43481eb6cbe58b22b8c2ce3688e858f5f92f (diff) |
fdo#42779 followup: Do not check for icons in nonexistent lookaside directory.
Change-Id: Ic493c2e33767968e5a1c1cced66a88295c694b2b
-rw-r--r-- | vcl/source/gdi/impimagetree.cxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx index 3fed0cfc2b99..32ca29f41208 100644 --- a/vcl/source/gdi/impimagetree.cxx +++ b/vcl/source/gdi/impimagetree.cxx @@ -391,16 +391,18 @@ bool ImplImageTree::iconCacheLookup( bool ImplImageTree::find( std::vector< rtl::OUString > const & paths, BitmapEx & bitmap) { - for (Paths::iterator i(m_paths.begin()); i != m_paths.end(); ++i) { - for (std::vector< rtl::OUString >::const_reverse_iterator j( - paths.rbegin()); - j != paths.rend(); ++j) - { - osl::File file(i->first + "/" + *j); - if (file.open(osl_File_OpenFlag_Read) == ::osl::FileBase::E_None) { - loadFromFile(file, *j, bitmap); - file.close(); - return true; + if (!m_cacheIcons) { + for (Paths::iterator i(m_paths.begin()); i != m_paths.end(); ++i) { + for (std::vector< rtl::OUString >::const_reverse_iterator j( + paths.rbegin()); + j != paths.rend(); ++j) + { + osl::File file(i->first + "/" + *j); + if (file.open(osl_File_OpenFlag_Read) == ::osl::FileBase::E_None) { + loadFromFile(file, *j, bitmap); + file.close(); + return true; + } } } } |