diff options
author | Noel Grandin <noel@peralex.com> | 2013-01-30 12:01:04 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-02-11 08:02:14 +0200 |
commit | f53517a5b08f9dddd61f5f0aa697222529d15e28 (patch) | |
tree | 3ac63c826351ef87ae5082bb98defa0a15890993 /xmloff/source/meta | |
parent | fa3c9a9072ae05ae6d03014eb55ad5f7d895d1fe (diff) |
fdo#46808, convert xml::xpath::XPathAPI to new-style service
Change-Id: I54bb0eb08d687e7d54c42601c826c580a7a17ebb
Diffstat (limited to 'xmloff/source/meta')
-rw-r--r-- | xmloff/source/meta/xmlmetai.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx index af3362fc777b..bf9956298dde 100644 --- a/xmloff/source/meta/xmlmetai.cxx +++ b/xmloff/source/meta/xmlmetai.cxx @@ -21,7 +21,7 @@ #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <com/sun/star/xml/dom/SAXDocumentBuilder.hpp> #include <com/sun/star/xml/dom/XSAXDocumentBuilder2.hpp> -#include <com/sun/star/xml/xpath/XXPathAPI.hpp> +#include <com/sun/star/xml/xpath/XPathAPI.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySetInfo.hpp> #include <comphelper/processfactory.hxx> @@ -151,11 +151,8 @@ lcl_initGenerator(SvXMLImport & rImport, uno::Reference< xml::dom::XDocument > const xDoc(xDocBuilder->getDocument(), uno::UNO_SET_THROW); try { - uno::Reference< xml::xpath::XXPathAPI > const xPath( - rImport.getServiceFactory()->createInstance( - ::rtl::OUString( - "com.sun.star.xml.xpath.XPathAPI")), - uno::UNO_QUERY_THROW ); + uno::Reference< xml::xpath::XXPathAPI > const xPath = xml::xpath::XPathAPI::create( + comphelper::getComponentContext(rImport.getServiceFactory()) ); xPath->registerNS(GetXMLToken(XML_NP_OFFICE),GetXMLToken(XML_N_OFFICE)); xPath->registerNS(GetXMLToken(XML_NP_META), GetXMLToken(XML_N_META)); |