diff options
author | Noel Grandin <noel@peralex.com> | 2013-02-06 15:27:31 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-02-12 10:14:46 +0200 |
commit | 2969846c29402baec792e43cfd4524366fb05613 (patch) | |
tree | ca853022b875eedcab2a94d3131eeb452ad81c9e | |
parent | 4d23fcf0c0444aaa8b3d6ad99f0d741a80a2a247 (diff) |
fdo#46808, convert some code to XComponentContext
Change-Id: I627e0270fc9d4e5b84ae99320445d28648b7654c
-rw-r--r-- | svtools/source/misc/imagemgr.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index f8bc484539c9..2a3f71492dcc 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -223,9 +223,10 @@ static String GetImageExtensionByFactory_Impl( const String& rURL ) try { // get the TypeDetection service to access all registered types - ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > xFac = ::comphelper::getProcessServiceFactory(); + ::com::sun::star::uno::Reference < ::com::sun::star::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); ::com::sun::star::uno::Reference < ::com::sun::star::document::XTypeDetection > xTypeDetector( - xFac->createInstance( ASCII_STRING("com.sun.star.document.TypeDetection") ), ::com::sun::star::uno::UNO_QUERY ); + xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.TypeDetection", xContext), + ::com::sun::star::uno::UNO_QUERY ); ::rtl::OUString aInternalType = xTypeDetector->queryTypeByURL( rURL ); ::com::sun::star::uno::Reference < ::com::sun::star::container::XNameAccess > xAccess( xTypeDetector, ::com::sun::star::uno::UNO_QUERY ); |