diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-09 10:12:01 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-09 10:12:19 +0100 |
commit | 6e12fb3be33379fa87b90ffae047cffe1370eef9 (patch) | |
tree | 1e39f01609c1471bbb0a2b0dcb85c6c67a7ff1f4 /dbaccess | |
parent | 6d25220ad6c869bb7cd79cf678d092b81558a8d2 (diff) |
Consolidate XServiceInfo for classes derived from SvXMLImport
Change-Id: I5a269d8b7e95049c67ae14b06a79b417bc91a474
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/filter/xml/xmlfilter.cxx | 18 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlfilter.hxx | 11 |
2 files changed, 22 insertions, 7 deletions
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<OUString> ODBFilter::getSupportedServiceNames_Static() + throw (css::uno::RuntimeException) +{ + css::uno::Sequence<OUString> 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 <unotools/localfilehelper.hxx> #include <unotools/ucbstreamhelper.hxx> #include <xmloff/xmlimp.hxx> -#include "apitools.hxx" #include <map> #include <memory> @@ -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<OUString> SAL_CALL + getSupportedServiceNames_Static() throw (css::uno::RuntimeException); + + static css::uno::Reference<css::uno::XInterface> SAL_CALL Create( + css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxORB); // helper class virtual void SetViewSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aViewProps); |