Kaydet (Commit) 2969846c authored tarafından Noel Grandin's avatar Noel Grandin

fdo#46808, convert some code to XComponentContext

Change-Id: I627e0270fc9d4e5b84ae99320445d28648b7654c
üst 4d23fcf0
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment