diff options
Diffstat (limited to 'svtools/source/misc/imagemgr.cxx')
-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 ); |