summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-01-30 12:01:04 +0200
committerNoel Grandin <noel@peralex.com>2013-02-11 08:02:14 +0200
commitf53517a5b08f9dddd61f5f0aa697222529d15e28 (patch)
tree3ac63c826351ef87ae5082bb98defa0a15890993 /extensions
parentfa3c9a9072ae05ae6d03014eb55ad5f7d895d1fe (diff)
fdo#46808, convert xml::xpath::XPathAPI to new-style service
Change-Id: I54bb0eb08d687e7d54c42601c826c580a7a17ebb
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") );