summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Rentz [dr] <daniel.rentz@oracle.com>2010-08-30 16:10:01 +0200
committerDaniel Rentz [dr] <daniel.rentz@oracle.com>2010-08-30 16:10:01 +0200
commitd6f27116f1cf8356382b3211fe8dbca4f52cd1be (patch)
tree04c852a352c1846cd67b9fba36aca58842ac83f9
parent0ce8989b149c3ecb93efba0a739ae96e33b9afa0 (diff)
dr77: change all exported services in oox module from MultiServiceFactory to ComponentContext
-rw-r--r--sax/source/tools/fshelper.cxx11
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, ...)