Kaydet (Commit) b13c8de2 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

FastTokenHandler service should apparently have a default constructor

Change-Id: Iad5c4e05832128b5f41860cc4ae96f0472c37491
üst aeac6444
...@@ -24,9 +24,7 @@ ...@@ -24,9 +24,7 @@
module com { module sun { module star { module xml { module sax { module com { module sun { module star { module xml { module sax {
service FastTokenHandler : XFastTokenHandler service FastTokenHandler : XFastTokenHandler;
{
};
}; }; }; }; }; }; }; }; }; };
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
#include <sal/config.h> #include <sal/config.h>
#include <com/sun/star/io/Pipe.hpp> #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/SAXParseException.hpp>
#include <com/sun/star/xml/sax/XFastParser.hpp> #include <com/sun/star/xml/sax/XFastParser.hpp>
#include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
#include <test/bootstrapfixture.hxx> #include <test/bootstrapfixture.hxx>
#include <comphelper/componentcontext.hxx> #include <comphelper/componentcontext.hxx>
...@@ -26,7 +26,6 @@ class ParserTest: public test::BootstrapFixture ...@@ -26,7 +26,6 @@ class ParserTest: public test::BootstrapFixture
{ {
InputSource maInput; InputSource maInput;
uno::Reference< XFastParser > mxParser; uno::Reference< XFastParser > mxParser;
uno::Reference< XFastTokenHandler > mxTokenHandler;
uno::Reference< XFastDocumentHandler > mxDocumentHandler; uno::Reference< XFastDocumentHandler > mxDocumentHandler;
public: public:
...@@ -49,10 +48,8 @@ void ParserTest::setUp() ...@@ -49,10 +48,8 @@ void ParserTest::setUp()
mxParser.set( comphelper::ComponentContext(m_xContext).createComponent( mxParser.set( comphelper::ComponentContext(m_xContext).createComponent(
"com.sun.star.xml.sax.FastParser"), uno::UNO_QUERY ); "com.sun.star.xml.sax.FastParser"), uno::UNO_QUERY );
CPPUNIT_ASSERT_MESSAGE("No FastParser!", mxParser.is()); CPPUNIT_ASSERT_MESSAGE("No FastParser!", mxParser.is());
mxTokenHandler.set( comphelper::ComponentContext(m_xContext).createComponent( mxParser->setTokenHandler(
"com.sun.star.xml.sax.FastTokenHandler"), uno::UNO_QUERY ); css::xml::sax::FastTokenHandler::create(m_xContext));
CPPUNIT_ASSERT_MESSAGE("No TokenHandler!", mxTokenHandler.is());
mxParser->setTokenHandler( mxTokenHandler );
} }
void ParserTest::tearDown() void ParserTest::tearDown()
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include <sax/fshelper.hxx> #include <sax/fshelper.hxx>
#include "fastserializer.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 <comphelper/processfactory.hxx>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
...@@ -32,8 +32,7 @@ FastSerializerHelper::FastSerializerHelper(const Reference< io::XOutputStream >& ...@@ -32,8 +32,7 @@ FastSerializerHelper::FastSerializerHelper(const Reference< io::XOutputStream >&
mpSerializer(new FastSaxSerializer()) mpSerializer(new FastSaxSerializer())
{ {
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext(), UNO_SET_THROW ); Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext(), UNO_SET_THROW );
Reference< lang::XMultiComponentFactory > xFactory( xContext->getServiceManager(), UNO_SET_THROW ); mxTokenHandler = css::xml::sax::FastTokenHandler::create(xContext);
mxTokenHandler.set( xFactory->createInstanceWithContext("com.sun.star.xml.sax.FastTokenHandler", xContext ), UNO_QUERY_THROW );
mpSerializer->setFastTokenHandler( mxTokenHandler ); mpSerializer->setFastTokenHandler( mxTokenHandler );
mpSerializer->setOutputStream( xOutputStream ); mpSerializer->setOutputStream( xOutputStream );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment