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 /svtools/source/misc | |
parent | fdo#46808, Adapt cui::ColorPicker UNO service to new style (diff) | |
download | core-2969846c29402baec792e43cfd4524366fb05613.tar.gz core-2969846c29402baec792e43cfd4524366fb05613.zip |
fdo#46808, convert some code to XComponentContext
Change-Id: I627e0270fc9d4e5b84ae99320445d28648b7654c
Diffstat (limited to 'svtools/source/misc')
-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 ); |