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 /sfx2 | |
parent | fa3c9a9072ae05ae6d03014eb55ad5f7d895d1fe (diff) |
fdo#46808, convert xml::xpath::XPathAPI to new-style service
Change-Id: I54bb0eb08d687e7d54c42601c826c580a7a17ebb
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/SfxDocumentMetaData.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index ae61ed75ed6a..eef17b72bab0 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -51,7 +51,7 @@ #include "com/sun/star/xml/dom/DocumentBuilder.hpp" #include "com/sun/star/xml/dom/XSAXDocumentBuilder.hpp" #include "com/sun/star/xml/dom/NodeType.hpp" -#include "com/sun/star/xml/xpath/XXPathAPI.hpp" +#include "com/sun/star/xml/xpath/XPathAPI.hpp" #include "com/sun/star/util/Date.hpp" #include "com/sun/star/util/Time.hpp" #include "com/sun/star/util/Duration.hpp" @@ -1144,15 +1144,7 @@ void SAL_CALL SfxDocumentMetaData::init( ::rtl::OUString( "SfxDocumentMetaData::init: no DOM tree given"), *this); - css::uno::Reference<css::lang::XMultiComponentFactory> xMsf ( - m_xContext->getServiceManager()); - css::uno::Reference<css::xml::xpath::XXPathAPI> xPath( - xMsf->createInstanceWithContext(::rtl::OUString( - "com.sun.star.xml.xpath.XPathAPI"), m_xContext), - css::uno::UNO_QUERY_THROW ); - if (!xPath.is()) throw css::uno::RuntimeException( - ::rtl::OUString("SfxDocumentMetaData::init:" - " cannot create XPathAPI service"), *this); + css::uno::Reference<css::xml::xpath::XXPathAPI> xPath = css::xml::xpath::XPathAPI::create(m_xContext); m_isInitialized = false; m_xDoc = i_xDoc; |