summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/ownsubfilterservice.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/ownsubfilterservice.cxx')
-rw-r--r--sfx2/source/doc/ownsubfilterservice.cxx19
1 files changed, 4 insertions, 15 deletions
diff --git a/sfx2/source/doc/ownsubfilterservice.cxx b/sfx2/source/doc/ownsubfilterservice.cxx
index 61d000cb48ee..4529730f7d05 100644
--- a/sfx2/source/doc/ownsubfilterservice.cxx
+++ b/sfx2/source/doc/ownsubfilterservice.cxx
@@ -41,13 +41,9 @@ class OwnSubFilterService : public cppu::WeakImplHelper2 < document::XFilter
SfxObjectShell* m_pObjectShell;
public:
- OwnSubFilterService()
+ OwnSubFilterService(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments)
throw (uno::Exception, uno::RuntimeException);
- /// Initialization function after having acquire()'d.
- void SAL_CALL constructorInit(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments)
- throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
-
virtual ~OwnSubFilterService();
// XFilter
@@ -60,14 +56,10 @@ public:
virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (uno::RuntimeException);
};
-OwnSubFilterService::OwnSubFilterService()
+OwnSubFilterService::OwnSubFilterService(const css::uno::Sequence< css::uno::Any >& aArguments)
throw (uno::Exception, uno::RuntimeException)
: m_pObjectShell( NULL )
{
-}
-
-void OwnSubFilterService::constructorInit( const css::uno::Sequence< css::uno::Any >& aArguments ) throw (css::uno::Exception, css::uno::RuntimeException)
-{
if ( aArguments.getLength() != 2 )
throw lang::IllegalArgumentException();
@@ -133,12 +125,9 @@ uno::Sequence< OUString > SAL_CALL OwnSubFilterService::getSupportedServiceNames
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_comp_document_OwnSubFilter_get_implementation(
css::uno::XComponentContext *,
- cppu::constructor_InitializationFunc &init_func)
+ css::uno::Sequence<css::uno::Any> const &arguments)
{
- // 2nd phase initialization needed
- init_func = static_cast<cppu::constructor_InitializationFunc>(&OwnSubFilterService::constructorInit);
-
- return static_cast<cppu::OWeakObject *>(new OwnSubFilterService);
+ return cppu::acquire(new OwnSubFilterService(arguments));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */