summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-12 08:57:24 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-23 11:45:47 +0200
commit5aa2cd1d3f85958917f47523ee430af11ac1751d (patch)
tree0a5e62c012841e51410500c5b6a52db1938c5ed3 /comphelper
parentf4776bf465ee682f65d1e978b031c928d9d310a5 (diff)
fdo#46808, use service constructor for uri::UriReferenceFactory
Change-Id: I4e72bf5880fa28cb96d93ede7730a63220af7fa6
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/mediadescriptor.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx
index dd91d9e716b5..84d3331da4ea 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -34,7 +34,7 @@
#include <com/sun/star/ucb/UnsupportedDataSinkException.hpp>
#include <com/sun/star/ucb/CommandFailedException.hpp>
#include <com/sun/star/task/XInteractionAbort.hpp>
-#include <com/sun/star/uri/XUriReferenceFactory.hpp>
+#include <com/sun/star/uri/UriReferenceFactory.hpp>
#include <com/sun/star/uri/XUriReference.hpp>
#include <com/sun/star/ucb/PostCommandArgument2.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -705,13 +705,12 @@ sal_Bool MediaDescriptor::impl_openStreamWithURL( const ::rtl::OUString& sURL, s
it parses the URL in another way. It's main part isnt enough
and it's complete part contains the jumpmark (fragment) parameter ...
*/
- static ::rtl::OUString SERVICENAME_URIREFERENCEFACTORY( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.uri.UriReferenceFactory" ));
try
{
- css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
- css::uno::Reference< css::uri::XUriReferenceFactory > xUriFactory(xSMGR->createInstance(SERVICENAME_URIREFERENCEFACTORY), css::uno::UNO_QUERY_THROW);
- css::uno::Reference< css::uri::XUriReference > xUriRef = xUriFactory->parse(sURL);
+ css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
+ css::uno::Reference< css::uri::XUriReferenceFactory > xUriFactory = css::uri::UriReferenceFactory::create(xContext);;
+ css::uno::Reference< css::uri::XUriReference > xUriRef = xUriFactory->parse(sURL);
if (xUriRef.is())
{
xUriRef->clearFragment();