svtools/source/graphic/grfmgr.cxx | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-)
New commits: commit 2297570efbefd6f07f2ccd4666d54491d35c8340 Author: Caolán McNamara <[email protected]> Date: Sun Jun 18 14:52:36 2017 +0100 silence some exception warnings Change-Id: I654c57642c639fa07a3f496286cc4e180bb0b241 diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 51a8abad1704..b962a52e9608 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -153,25 +153,23 @@ void GraphicObject::ImplEnsureGraphicManager() { if (!mpGlobalMgr) { + sal_uLong nCacheSize = 20000; + sal_uLong nMaxObjCacheSize = 20000; + sal_uLong nTimeoutSeconds = 20000; if (!utl::ConfigManager::IsAvoidConfig()) { - mpGlobalMgr = new GraphicManager( - (officecfg::Office::Common::Cache::GraphicManager:: - TotalCacheSize::get()), - (officecfg::Office::Common::Cache::GraphicManager:: - ObjectCacheSize::get())); - mpGlobalMgr->SetCacheTimeout( - officecfg::Office::Common::Cache::GraphicManager:: - ObjectReleaseTime::get()); - } - else - { - mpGlobalMgr = new GraphicManager( - 20000, - 20000); - mpGlobalMgr->SetCacheTimeout( - 20000); + try + { + nCacheSize = officecfg::Office::Common::Cache::GraphicManager::TotalCacheSize::get(); + nMaxObjCacheSize = officecfg::Office::Common::Cache::GraphicManager::ObjectCacheSize::get(); + nTimeoutSeconds = officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime::get(); + } + catch (...) + { + } } + mpGlobalMgr = new GraphicManager(nCacheSize, nMaxObjCacheSize); + mpGlobalMgr->SetCacheTimeout(nTimeoutSeconds); } }
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
