diff options
author | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2010-08-30 16:10:01 +0200 |
---|---|---|
committer | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2010-08-30 16:10:01 +0200 |
commit | d6f27116f1cf8356382b3211fe8dbca4f52cd1be (patch) | |
tree | 04c852a352c1846cd67b9fba36aca58842ac83f9 /sax | |
parent | dr77: rebase to m86 (diff) | |
download | core-d6f27116f1cf8356382b3211fe8dbca4f52cd1be.tar.gz core-d6f27116f1cf8356382b3211fe8dbca4f52cd1be.zip |
dr77: change all exported services in oox module from MultiServiceFactory to ComponentContext
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/tools/fshelper.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx index 743f499fb4f0..6956e5b32bf3 100644 --- a/sax/source/tools/fshelper.cxx +++ b/sax/source/tools/fshelper.cxx @@ -12,8 +12,9 @@ namespace sax_fastparser { FastSerializerHelper::FastSerializerHelper(const Reference< io::XOutputStream >& xOutputStream ) : mpSerializer(new FastSaxSerializer()) { - Reference< lang::XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory(); - mxTokenHandler = Reference<xml::sax::XFastTokenHandler> ( xFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.FastTokenHandler") ) ), UNO_QUERY_THROW ); + Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext(), UNO_SET_THROW ); + Reference< lang::XMultiComponentFactory > xFactory( xContext->getServiceManager(), UNO_SET_THROW ); + mxTokenHandler.set( xFactory->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.FastTokenHandler") ), xContext ), UNO_QUERY_THROW ); mpSerializer->setFastTokenHandler( mxTokenHandler ); mpSerializer->setOutputStream( xOutputStream ); @@ -23,11 +24,7 @@ FastSerializerHelper::FastSerializerHelper(const Reference< io::XOutputStream >& FastSerializerHelper::~FastSerializerHelper() { mpSerializer->endDocument(); - - if (mpSerializer) { - delete mpSerializer; - mpSerializer = NULL; - } + delete mpSerializer; } void FastSerializerHelper::startElement(const char* elementName, ...) |