diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-01-26 20:56:06 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-01-26 20:56:44 +0100 |
commit | d3e30409530a94470a3c19612663b26a9eafa683 (patch) | |
tree | 952a846aa33686237ca5d3cfd4779cebd4c9a20d /svtools | |
parent | e2407767b39df00c4057a8174391ab70b97a39a5 (diff) |
Replace SvtCacheOptions with (simplified) direct configuration access.
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 2c4997532451..8098e77179e5 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -26,9 +26,12 @@ * ************************************************************************/ +#include "sal/config.h" #include <algorithm> +#include <comphelper/processfactory.hxx> +#include <officecfg/Office/Common.hxx> #include <tools/vcompat.hxx> #include <unotools/ucbstreamhelper.hxx> #include <unotools/localfilehelper.hxx> @@ -38,7 +41,6 @@ #include <vcl/metaact.hxx> #include <vcl/virdev.hxx> #include <vcl/salbtype.hxx> -#include <unotools/cacheoptions.hxx> #include <svtools/grfmgr.hxx> #include <vcl/pdfextoutdevdata.hxx> @@ -176,11 +178,14 @@ void GraphicObject::ImplSetGraphicManager( const GraphicManager* pMgr, const rtl { if( !mpGlobalMgr ) { - SvtCacheOptions aCacheOptions; - - mpGlobalMgr = new GraphicManager( aCacheOptions.GetGraphicManagerTotalCacheSize(), - aCacheOptions.GetGraphicManagerObjectCacheSize() ); - mpGlobalMgr->SetCacheTimeout( aCacheOptions.GetGraphicManagerObjectReleaseTime() ); + mpGlobalMgr = new GraphicManager( + officecfg::Office::Common::Cache::GraphicManager::TotalCacheSize::get( + comphelper::getProcessComponentContext()), + officecfg::Office::Common::Cache::GraphicManager::ObjectCacheSize::get( + comphelper::getProcessComponentContext())); + mpGlobalMgr->SetCacheTimeout( + officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime::get( + comphelper::getProcessComponentContext())); } mpMgr = mpGlobalMgr; |