[Libreoffice-commits] .: vcl/source
Michael Meeks
michael at kemper.freedesktop.org
Tue May 1 02:14:18 PDT 2012
vcl/source/gdi/impimagetree.cxx | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
New commits:
commit a0fd9de70634ee42727690824bc1bef7ee7c7eab
Author: Gábor Stefanik <netrolller.3d at gmail.com>
Date: Tue May 1 00:31:47 2012 +0200
fdo#42779 followup: Do not check for icons in nonexistent lookaside directory.
Change-Id: Ic493c2e33767968e5a1c1cced66a88295c694b2b
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index 3fed0cf..32ca29f 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;
+ }
}
}
}
More information about the Libreoffice-commits
mailing list