summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-06-18 14:52:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-06-18 14:52:36 +0100
commit2297570efbefd6f07f2ccd4666d54491d35c8340 (patch)
tree5438a93af6191258b3449fb87bb21a17bfc4a13f /svtools
parentfcb78bb3704d5c2ff3456944d02e5b1d3fb4bd34 (diff)
silence some exception warnings
Change-Id: I654c57642c639fa07a3f496286cc4e180bb0b241
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/graphic/grfmgr.cxx30
1 files changed, 14 insertions, 16 deletions
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);
}
}