diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index aa48fba639bb..162087113538 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -85,9 +85,7 @@ ImageHelper::getGraphicAndGraphicObjectFromURL_nothrow( uno::Reference< graphic: { // graphic manager uniqueid rtl::OUString sID = _rURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 ); - // get the DefaultContext - ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() ); - xOutGraphicObj = graphic::GraphicObject::createWithId( aContext.getUNOContext(), sID ); + xOutGraphicObj = graphic::GraphicObject::createWithId( ::comphelper::getProcessComponentContext(), sID ); } else // linked xOutGraphicObj = NULL; // release the GraphicObject diff --git a/ucb/source/ucp/webdav/webdavresponseparser.cxx b/ucb/source/ucp/webdav/webdavresponseparser.cxx index 88b51da2cef4..01240d495179 100644 --- a/ucb/source/ucp/webdav/webdavresponseparser.cxx +++ b/ucb/source/ucp/webdav/webdavresponseparser.cxx @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -819,10 +819,8 @@ namespace myInputSource.aInputStream = xInputStream; // get parser - uno::Reference< xml::sax::XParser > xParser( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString::createFromAscii("com.sun.star.xml.sax.Parser") ), - uno::UNO_QUERY_THROW ); + uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create( + comphelper::getProcessComponentContext() ); // create parser; connect parser and filter WebDAVResponseParser* pWebDAVResponseParser = new WebDAVResponseParser(eWebDAVResponseParserMode);