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 /forms | |
parent | fdo#46808, convert some forms code to XComponentContext (diff) | |
download | core-f53517a5b08f9dddd61f5f0aa697222529d15e28.tar.gz core-f53517a5b08f9dddd61f5f0aa697222529d15e28.zip |
fdo#46808, convert xml::xpath::XPathAPI to new-style service
Change-Id: I54bb0eb08d687e7d54c42601c826c580a7a17ebb
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/xforms/computedexpression.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/forms/source/xforms/computedexpression.cxx b/forms/source/xforms/computedexpression.cxx index e6fa125aba22..9580d7ce958a 100644 --- a/forms/source/xforms/computedexpression.cxx +++ b/forms/source/xforms/computedexpression.cxx @@ -27,7 +27,7 @@ #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/xml/dom/NodeType.hpp> #include <com/sun/star/xml/dom/XNode.hpp> -#include <com/sun/star/xml/xpath/XXPathAPI.hpp> +#include <com/sun/star/xml/xpath/XPathAPI.hpp> #include <com/sun/star/xml/xpath/XXPathObject.hpp> #include <com/sun/star/xml/xpath/XXPathExtension.hpp> #include <com/sun/star/beans/NamedValue.hpp> @@ -45,6 +45,7 @@ using com::sun::star::lang::XInitialization; using com::sun::star::lang::XMultiServiceFactory; using com::sun::star::xml::dom::XNode; using com::sun::star::container::XNameContainer; +using com::sun::star::xml::xpath::XPathAPI; using com::sun::star::xml::xpath::XXPathAPI; using com::sun::star::xml::xpath::XXPathExtension; using com::sun::star::xml::xpath::XXPathObject; @@ -189,10 +190,7 @@ bool ComputedExpression::getBool( bool bDefault ) const Reference<XXPathAPI> ComputedExpression::_getXPathAPI(const xforms::EvaluationContext& aContext) { // create XPath API, then register namespaces - Reference<XXPathAPI> xXPath( createInstance( - "com.sun.star.xml.xpath.XPathAPI" ), - UNO_QUERY_THROW ); - OSL_ENSURE( xXPath.is(), "cannot get XPath API" ); + Reference<XXPathAPI> xXPath( XPathAPI::create( comphelper::getProcessComponentContext() ) ); // register xforms extension# Sequence< Any > aSequence(2); |