diff options
author | Noel Grandin <noel@peralex.com> | 2013-03-20 09:19:39 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-04-08 13:53:02 +0200 |
commit | 82a1cfbd6745aab76a8d959eb5878e2455715505 (patch) | |
tree | ca8967d98c04eed8a340829ab3410deb635dd54b /sfx2 | |
parent | 80c5303e2150858cee4a41be320e7e9bb40f8650 (diff) |
fdo#46808, use service constructor for document::FilterConfigRefresh
Change-Id: Ibf857684029b6b63845850a1930d853e5aab2fdb
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/bastyp/fltlst.cxx | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sfx2/source/bastyp/fltlst.cxx b/sfx2/source/bastyp/fltlst.cxx index 4af81852e72f..59f0d7a09df6 100644 --- a/sfx2/source/bastyp/fltlst.cxx +++ b/sfx2/source/bastyp/fltlst.cxx @@ -22,6 +22,7 @@ #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/uno/Any.hxx> +#include <com/sun/star/document/FilterConfigRefresh.hpp> #include <comphelper/processfactory.hxx> #include <sfx2/sfxuno.hxx> @@ -89,17 +90,9 @@ class SfxRefreshListener : public ::cppu::WeakImplHelper1<com::sun::star::util:: *//*-*************************************************************************************************************/ SfxFilterListener::SfxFilterListener() { - uno::Reference< lang::XMultiServiceFactory > xSmgr = ::comphelper::getProcessServiceFactory(); - if( xSmgr.is() == sal_True ) - { - uno::Reference< util::XRefreshable > xNotifier( xSmgr->createInstance( "com.sun.star.document.FilterConfigRefresh" ), uno::UNO_QUERY ); - if( xNotifier.is() == sal_True ) - { - m_xFilterCache = xNotifier; - m_xFilterCacheListener = new SfxRefreshListener(this); - m_xFilterCache->addRefreshListener( m_xFilterCacheListener ); - } - } + m_xFilterCache = document::FilterConfigRefresh::create( comphelper::getProcessComponentContext() ); + m_xFilterCacheListener = new SfxRefreshListener(this); + m_xFilterCache->addRefreshListener( m_xFilterCacheListener ); } SfxFilterListener::~SfxFilterListener() |