From 6e12fb3be33379fa87b90ffae047cffe1370eef9 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 9 Jan 2014 10:12:01 +0100 Subject: Consolidate XServiceInfo for classes derived from SvXMLImport Change-Id: I5a269d8b7e95049c67ae14b06a79b417bc91a474 --- dbaccess/source/filter/xml/xmlfilter.cxx | 18 ++++++++++++++---- dbaccess/source/filter/xml/xmlfilter.hxx | 11 ++++++++--- 2 files changed, 22 insertions(+), 7 deletions(-) (limited to 'dbaccess/source/filter') diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index a85bfbdada16..3bda64eb25ac 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -347,7 +347,7 @@ sal_Int32 ReadThroughComponent( DBG_NAME(ODBFilter) ODBFilter::ODBFilter( const uno::Reference< XComponentContext >& _rxContext ) - :SvXMLImport(_rxContext) + :SvXMLImport(_rxContext, getImplementationName_Static()) ,m_bNewFormat(false) { DBG_CTOR(ODBFilter,NULL); @@ -369,9 +369,19 @@ ODBFilter::~ODBFilter() throw() DBG_DTOR(ODBFilter,NULL); } -IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(ODBFilter, "com.sun.star.comp.sdb.DBFilter") -IMPLEMENT_SERVICE_INFO_SUPPORTS(ODBFilter) -IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(ODBFilter, "com.sun.star.document.ImportFilter") +OUString ODBFilter::getImplementationName_Static() + throw (css::uno::RuntimeException) +{ + return OUString("com.sun.star.comp.sdb.DBFilter"); +} + +css::uno::Sequence ODBFilter::getSupportedServiceNames_Static() + throw (css::uno::RuntimeException) +{ + css::uno::Sequence s(1); + s[0] = "com.sun.star.document.ImportFilter"; + return s; +} ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ODBFilter::Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB) diff --git a/dbaccess/source/filter/xml/xmlfilter.hxx b/dbaccess/source/filter/xml/xmlfilter.hxx index 0d083d0238d0..971e56b0ae8d 100644 --- a/dbaccess/source/filter/xml/xmlfilter.hxx +++ b/dbaccess/source/filter/xml/xmlfilter.hxx @@ -37,7 +37,6 @@ #include #include #include -#include "apitools.hxx" #include #include @@ -114,8 +113,14 @@ public: // XFilter virtual sal_Bool SAL_CALL filter( const Sequence< PropertyValue >& rDescriptor ) throw(RuntimeException); - // XServiceInfo - DECLARE_SERVICE_INFO_STATIC( ); + static OUString SAL_CALL getImplementationName_Static() + throw (css::uno::RuntimeException); + + static css::uno::Sequence SAL_CALL + getSupportedServiceNames_Static() throw (css::uno::RuntimeException); + + static css::uno::Reference SAL_CALL Create( + css::uno::Reference const & _rxORB); // helper class virtual void SetViewSettings(const com::sun::star::uno::Sequence& aViewProps); -- cgit v1.2.3