diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-23 18:23:43 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-03 15:55:04 +0200 |
commit | 9b07288138228af56e58f50dc6ba50865b52fdfb (patch) | |
tree | 2bde7ca61824f7266c70a404be6049fba26d8c98 /xmloff | |
parent | Explicit rtl::OUString ctors no longer needed (diff) | |
download | core-9b07288138228af56e58f50dc6ba50865b52fdfb.tar.gz core-9b07288138228af56e58f50dc6ba50865b52fdfb.zip |
fdo#46808, Adapt xml::dom::DocumentBuilder UNO service to new style
Change-Id: I577fbc7f990be9ec1f7b7eea53218b7daaccb2a1
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/core/DomBuilderContext.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/xmloff/source/core/DomBuilderContext.cxx b/xmloff/source/core/DomBuilderContext.cxx index 51b60cf02ba7..a8ce3bea1ea5 100644 --- a/xmloff/source/core/DomBuilderContext.cxx +++ b/xmloff/source/core/DomBuilderContext.cxx @@ -37,7 +37,7 @@ #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/xml/dom/XAttr.hpp> -#include <com/sun/star/xml/dom/XDocumentBuilder.hpp> +#include <com/sun/star/xml/dom/DocumentBuilder.hpp> #include <com/sun/star/xml/dom/XNode.hpp> #include <com/sun/star/xml/dom/XElement.hpp> #include <com/sun/star/xml/sax/XAttributeList.hpp> @@ -50,10 +50,12 @@ using com::sun::star::lang::XMultiServiceFactory; +using com::sun::star::uno::XComponentContext; using com::sun::star::uno::Reference; using com::sun::star::uno::Sequence; using com::sun::star::uno::UNO_QUERY; using com::sun::star::uno::UNO_QUERY_THROW; +using com::sun::star::xml::dom::DocumentBuilder; using com::sun::star::xml::dom::XAttr; using com::sun::star::xml::dom::XDocument; using com::sun::star::xml::dom::XDocumentBuilder; @@ -191,17 +193,12 @@ void DomBuilderContext::Characters( const OUString& rCharacters ) // helper function implementations // -const sal_Char sDocumentBuilder[] = "com.sun.star.xml.dom.DocumentBuilder"; - Reference<XNode> lcl_createDomInstance() { - Reference<XMultiServiceFactory> xFactory = comphelper::getProcessServiceFactory(); - DBG_ASSERT( xFactory.is(), "can't get service factory" ); + Reference<XComponentContext> xContext = comphelper::getProcessComponentContext(); + DBG_ASSERT( xContext.is(), "can't get service factory" ); - Reference<XDocumentBuilder> xBuilder( - xFactory->createInstance( - OUString( RTL_CONSTASCII_USTRINGPARAM( sDocumentBuilder ) ) ), - UNO_QUERY_THROW ); + Reference<XDocumentBuilder> xBuilder( DocumentBuilder::create(xContext) ); return Reference<XNode>( xBuilder->newDocument(), UNO_QUERY_THROW ); } |