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

fdo#46808, Use service constructor for uri::ExternalUriReferenceTranslator

Change-Id: I723b1baf50b75f6aaea86a4784ee10a3d2196e83
üst 2ac38d1e
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
#ifndef __com_sun_star_uri_ExternalUriReferenceTranslator_idl__ #ifndef __com_sun_star_uri_ExternalUriReferenceTranslator_idl__
#define __com_sun_star_uri_ExternalUriReferenceTranslator_idl__ #define __com_sun_star_uri_ExternalUriReferenceTranslator_idl__
module com { module sun { module star { module uri { #include <com/sun/star/uri/XExternalUriReferenceTranslator.idl>
published interface XExternalUriReferenceTranslator; module com { module sun { module star { module uri {
/** /**
translates between external and internal URI references. translates between external and internal URI references.
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#endif #endif
#include <com/sun/star/lang/XMultiComponentFactory.hpp> #include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/uri/XExternalUriReferenceTranslator.hpp> #include <com/sun/star/uri/ExternalUriReferenceTranslator.hpp>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <rtl/process.h> #include <rtl/process.h>
#include <osl/diagnose.h> #include <osl/diagnose.h>
...@@ -66,7 +66,7 @@ OUString SalGtkPicker::uritounicode(const gchar* pIn) ...@@ -66,7 +66,7 @@ OUString SalGtkPicker::uritounicode(const gchar* pIn)
} }
else else
{ {
OUString aNewURL = uno::Reference<uri::XExternalUriReferenceTranslator>(uno::Reference<XMultiComponentFactory>(comphelper::getProcessServiceFactory(), UNO_QUERY_THROW)->createInstanceWithContext(OUString("com.sun.star.uri.ExternalUriReferenceTranslator"), m_xContext), UNO_QUERY_THROW)->translateToInternal(sURL); OUString aNewURL = uri::ExternalUriReferenceTranslator::create( m_xContext )->translateToInternal(sURL);
if( !aNewURL.isEmpty() ) if( !aNewURL.isEmpty() )
sURL = aNewURL; sURL = aNewURL;
} }
...@@ -82,7 +82,7 @@ OString SalGtkPicker::unicodetouri(const OUString &rURL) ...@@ -82,7 +82,7 @@ OString SalGtkPicker::unicodetouri(const OUString &rURL)
INetURLObject aURL(rURL); INetURLObject aURL(rURL);
if (INET_PROT_FILE == aURL.GetProtocol()) if (INET_PROT_FILE == aURL.GetProtocol())
{ {
OUString aNewURL = uno::Reference<uri::XExternalUriReferenceTranslator>(uno::Reference<XMultiComponentFactory>(comphelper::getProcessServiceFactory(), UNO_QUERY_THROW)->createInstanceWithContext(OUString("com.sun.star.uri.ExternalUriReferenceTranslator"), m_xContext ), UNO_QUERY_THROW)->translateToExternal( rURL ); OUString aNewURL = uri::ExternalUriReferenceTranslator::create( m_xContext )->translateToInternal(rURL);
if( !aNewURL.isEmpty() ) if( !aNewURL.isEmpty() )
{ {
......
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