From c2c530da69152ff9192b9726aa95961803ce9b29 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Wed, 22 Jan 2014 11:54:19 +0100 Subject: Introduce static inline cppu::acquire(), and make use of that. This is much better approach compared to the callback function, as it allows passing arguments to the c++ constructor directly, while still allowing some additional initialization after having acquired the instance. Change-Id: I5a0f981915dd58f1522ee6054e53a3550b29d624 --- sax/source/expatwrap/sax_expat.cxx | 4 ++-- sax/source/expatwrap/saxwriter.cxx | 4 ++-- sax/source/fastparser/fastparser.cxx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sax/source') diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx index 3f2adc5b7975..a5edfc53b383 100644 --- a/sax/source/expatwrap/sax_expat.cxx +++ b/sax/source/expatwrap/sax_expat.cxx @@ -1023,9 +1023,9 @@ void SaxExpatParser_Impl::callbackEndCDATA( void *pvThis ) extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_extensions_xml_sax_ParserExpat_get_implementation( css::uno::XComponentContext *, - cppu::constructor_InitializationFunc &) + css::uno::Sequence const &) { - return static_cast(new SaxExpatParser); + return cppu::acquire(new SaxExpatParser); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx index 24819526eeaf..b1601413b9e9 100644 --- a/sax/source/expatwrap/saxwriter.cxx +++ b/sax/source/expatwrap/saxwriter.cxx @@ -1373,9 +1373,9 @@ void SAXWriter::unknown(const OUString& sString) throw (SAXException, RuntimeExc extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_extensions_xml_sax_Writer_get_implementation( css::uno::XComponentContext *, - cppu::constructor_InitializationFunc &) + css::uno::Sequence const &) { - return static_cast(new SAXWriter); + return cppu::acquire(new SAXWriter); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index a97c786c1299..a3e201cb620c 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -1429,9 +1429,9 @@ bool FastSaxParser::hasNamespaceURL( const OUString& rPrefix ) const extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_extensions_xml_sax_FastParser_get_implementation( css::uno::XComponentContext *, - cppu::constructor_InitializationFunc &) + css::uno::Sequence const &) { - return static_cast(new FastSaxParser); + return cppu::acquire(new FastSaxParser); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit