summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/update/check/updateprotocol.cxx6
-rw-r--r--extensions/source/update/feed/updatefeed.cxx12
2 files changed, 4 insertions, 14 deletions
diff --git a/extensions/source/update/check/updateprotocol.cxx b/extensions/source/update/check/updateprotocol.cxx
index 989bf18e05f4..906cad094d70 100644
--- a/extensions/source/update/check/updateprotocol.cxx
+++ b/extensions/source/update/check/updateprotocol.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <com/sun/star/xml/xpath/XXPathAPI.hpp>
+#include <com/sun/star/xml/xpath/XPathAPI.hpp>
#include "updateprotocol.hxx"
#include "updatecheckconfig.hxx"
@@ -123,9 +123,7 @@ checkForUpdates(
OSL_ASSERT( rxContext->getServiceManager().is() );
// XPath implementation
- uno::Reference< xml::xpath::XXPathAPI > xXPath(
- rxContext->getServiceManager()->createInstanceWithContext( UNISTRING( "com.sun.star.xml.xpath.XPathAPI" ), rxContext ),
- uno::UNO_QUERY_THROW);
+ uno::Reference< xml::xpath::XXPathAPI > xXPath = xml::xpath::XPathAPI::create(rxContext);
xXPath->registerNS( UNISTRING("inst"), UNISTRING("http://update.libreoffice.org/description") );
diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx
index c2dfa99e6a86..7c514fd8d097 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -45,7 +45,7 @@
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/task/PasswordContainerInteractionHandler.hpp>
#include <com/sun/star/xml/dom/DocumentBuilder.hpp>
-#include <com/sun/star/xml/xpath/XXPathAPI.hpp>
+#include <com/sun/star/xml/xpath/XPathAPI.hpp>
#include <rtl/ref.hxx>
#include <rtl/bootstrap.hxx>
@@ -391,21 +391,13 @@ UpdateInformationProvider::UpdateInformationProvider(
uno::Reference< uno::XInterface >
UpdateInformationProvider::createInstance(const uno::Reference<uno::XComponentContext>& xContext)
{
- uno::Reference< lang::XMultiComponentFactory > xServiceManager(xContext->getServiceManager());
- if( !xServiceManager.is() )
- throw uno::RuntimeException(
- UNISTRING( "unable to obtain service manager from component context" ),
- uno::Reference< uno::XInterface > ());
-
uno::Reference< ucb::XUniversalContentBroker > xUniversalContentBroker =
ucb::UniversalContentBroker::create(xContext);
uno::Reference< xml::dom::XDocumentBuilder > xDocumentBuilder(
xml::dom::DocumentBuilder::create(xContext));
- uno::Reference< xml::xpath::XXPathAPI > xXPath(
- xServiceManager->createInstanceWithContext( UNISTRING( "com.sun.star.xml.xpath.XPathAPI" ), xContext ),
- uno::UNO_QUERY_THROW);
+ uno::Reference< xml::xpath::XXPathAPI > xXPath = xml::xpath::XPathAPI::create( xContext );
xXPath->registerNS( UNISTRING("atom"), UNISTRING("http://www.w3.org/2005/Atom") );