diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-10-21 22:43:18 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-21 22:57:10 +0200 |
commit | b13c8de265a6454c4677f52fd9a3440ac3279c51 (patch) | |
tree | 77fc94aea1bdaad81cc9f7ba9d73547f58c111c6 /sax | |
parent | aeac64441c4525f7a16f29bf6081ffb86f437478 (diff) |
FastTokenHandler service should apparently have a default constructor
Change-Id: Iad5c4e05832128b5f41860cc4ae96f0472c37491
Diffstat (limited to 'sax')
-rw-r--r-- | sax/qa/cppunit/parser.cxx | 9 | ||||
-rw-r--r-- | sax/source/tools/fshelper.cxx | 5 |
2 files changed, 5 insertions, 9 deletions
diff --git a/sax/qa/cppunit/parser.cxx b/sax/qa/cppunit/parser.cxx index ac4ac5311658..52da2a6d7812 100644 --- a/sax/qa/cppunit/parser.cxx +++ b/sax/qa/cppunit/parser.cxx @@ -10,9 +10,9 @@ #include <sal/config.h> #include <com/sun/star/io/Pipe.hpp> +#include <com/sun/star/xml/sax/FastTokenHandler.hpp> #include <com/sun/star/xml/sax/SAXParseException.hpp> #include <com/sun/star/xml/sax/XFastParser.hpp> -#include <com/sun/star/xml/sax/XFastTokenHandler.hpp> #include <test/bootstrapfixture.hxx> #include <comphelper/componentcontext.hxx> @@ -26,7 +26,6 @@ class ParserTest: public test::BootstrapFixture { InputSource maInput; uno::Reference< XFastParser > mxParser; - uno::Reference< XFastTokenHandler > mxTokenHandler; uno::Reference< XFastDocumentHandler > mxDocumentHandler; public: @@ -49,10 +48,8 @@ void ParserTest::setUp() mxParser.set( comphelper::ComponentContext(m_xContext).createComponent( "com.sun.star.xml.sax.FastParser"), uno::UNO_QUERY ); CPPUNIT_ASSERT_MESSAGE("No FastParser!", mxParser.is()); - mxTokenHandler.set( comphelper::ComponentContext(m_xContext).createComponent( - "com.sun.star.xml.sax.FastTokenHandler"), uno::UNO_QUERY ); - CPPUNIT_ASSERT_MESSAGE("No TokenHandler!", mxTokenHandler.is()); - mxParser->setTokenHandler( mxTokenHandler ); + mxParser->setTokenHandler( + css::xml::sax::FastTokenHandler::create(m_xContext)); } void ParserTest::tearDown() diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx index f4b8ddd50610..c39cbeaaff1a 100644 --- a/sax/source/tools/fshelper.cxx +++ b/sax/source/tools/fshelper.cxx @@ -19,7 +19,7 @@ #include <sax/fshelper.hxx> #include "fastserializer.hxx" -#include <com/sun/star/xml/sax/XFastTokenHandler.hpp> +#include <com/sun/star/xml/sax/FastTokenHandler.hpp> #include <comphelper/processfactory.hxx> #include <rtl/ustrbuf.hxx> @@ -32,8 +32,7 @@ FastSerializerHelper::FastSerializerHelper(const Reference< io::XOutputStream >& mpSerializer(new FastSaxSerializer()) { Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext(), UNO_SET_THROW ); - Reference< lang::XMultiComponentFactory > xFactory( xContext->getServiceManager(), UNO_SET_THROW ); - mxTokenHandler.set( xFactory->createInstanceWithContext("com.sun.star.xml.sax.FastTokenHandler", xContext ), UNO_QUERY_THROW ); + mxTokenHandler = css::xml::sax::FastTokenHandler::create(xContext); mpSerializer->setFastTokenHandler( mxTokenHandler ); mpSerializer->setOutputStream( xOutputStream ); |