diff options
Diffstat (limited to 'writerperfect/source/draw/CMXImportFilter.cxx')
-rw-r--r-- | writerperfect/source/draw/CMXImportFilter.cxx | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/writerperfect/source/draw/CMXImportFilter.cxx b/writerperfect/source/draw/CMXImportFilter.cxx index d73b5051b4b5..7efdb8ad0ac3 100644 --- a/writerperfect/source/draw/CMXImportFilter.cxx +++ b/writerperfect/source/draw/CMXImportFilter.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/xml/sax/XParser.hpp> #include <com/sun/star/io/XSeekable.hpp> #include <com/sun/star/uno/Reference.h> +#include <cppuhelper/supportsservice.hxx> #include <xmloff/attrlist.hxx> @@ -174,26 +175,16 @@ throw (RuntimeException) return OUString ( "com.sun.star.comp.Draw.CMXImportFilter" ); } -#define SERVICE_NAME1 "com.sun.star.document.ImportFilter" -#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection" -sal_Bool SAL_CALL CMXImportFilter_supportsService( const OUString &ServiceName ) -throw (RuntimeException) -{ - SAL_INFO("writerperfect", "CMXImportFilter_supportsService"); - return ( ServiceName == SERVICE_NAME1 || ServiceName == SERVICE_NAME2 ); -} Sequence< OUString > SAL_CALL CMXImportFilter_getSupportedServiceNames( ) throw (RuntimeException) { SAL_INFO("writerperfect", "CMXImportFilter_getSupportedServiceNames"); Sequence < OUString > aRet(2); OUString *pArray = aRet.getArray(); - pArray[0] = OUString ( SERVICE_NAME1 ); - pArray[1] = OUString ( SERVICE_NAME2 ); + pArray[0] = OUString ( "com.sun.star.document.ImportFilter" ); + pArray[1] = OUString ( "com.sun.star.document.ExtendedTypeDetection" ); return aRet; } -#undef SERVICE_NAME2 -#undef SERVICE_NAME1 Reference< XInterface > SAL_CALL CMXImportFilter_createInstance( const Reference< XComponentContext > & rContext) throw( Exception ) @@ -213,7 +204,7 @@ sal_Bool SAL_CALL CMXImportFilter::supportsService( const OUString &rServiceName throw (RuntimeException) { SAL_INFO("writerperfect", "CMXImportFilter::supportsService"); - return CMXImportFilter_supportsService( rServiceName ); + return cppu::supportsService( this, rServiceName ); } Sequence< OUString > SAL_CALL CMXImportFilter::getSupportedServiceNames( ) throw (RuntimeException) |