summaryrefslogtreecommitdiff
path: root/writerperfect/source/writer
diff options
context:
space:
mode:
Diffstat (limited to 'writerperfect/source/writer')
-rw-r--r--writerperfect/source/writer/MSWorksImportFilter.cxx14
-rw-r--r--writerperfect/source/writer/MSWorksImportFilter.hxx3
-rw-r--r--writerperfect/source/writer/MWAWImportFilter.cxx16
-rw-r--r--writerperfect/source/writer/MWAWImportFilter.hxx3
-rw-r--r--writerperfect/source/writer/WordPerfectImportFilter.cxx28
5 files changed, 14 insertions, 50 deletions
diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx
index f37b808e9d66..d6af1b4bb08d 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.cxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.cxx
@@ -19,6 +19,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>
#include <ucbhelper/content.hxx>
@@ -187,20 +188,13 @@ throw (RuntimeException)
return OUString ( "com.sun.star.comp.Writer.MSWorksImportFilter" );
}
-#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
-#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
-sal_Bool SAL_CALL MSWorksImportFilter_supportsService( const OUString &ServiceName )
-throw (RuntimeException)
-{
- return ( ServiceName == SERVICE_NAME1 || ServiceName == SERVICE_NAME2 );
-}
Sequence< OUString > SAL_CALL MSWorksImportFilter_getSupportedServiceNames( )
throw (RuntimeException)
{
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
@@ -221,7 +215,7 @@ throw (RuntimeException)
sal_Bool SAL_CALL MSWorksImportFilter::supportsService( const OUString &rServiceName )
throw (RuntimeException)
{
- return MSWorksImportFilter_supportsService( rServiceName );
+ return cppu::supportsService( this, rServiceName );
}
Sequence< OUString > SAL_CALL MSWorksImportFilter::getSupportedServiceNames( )
throw (RuntimeException)
diff --git a/writerperfect/source/writer/MSWorksImportFilter.hxx b/writerperfect/source/writer/MSWorksImportFilter.hxx
index 5a107e596ad1..08ff2314bbea 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.hxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.hxx
@@ -76,9 +76,6 @@ public:
OUString MSWorksImportFilter_getImplementationName()
throw ( ::com::sun::star::uno::RuntimeException );
-sal_Bool SAL_CALL MSWorksImportFilter_supportsService( const OUString &ServiceName )
-throw ( ::com::sun::star::uno::RuntimeException );
-
::com::sun::star::uno::Sequence< OUString > SAL_CALL MSWorksImportFilter_getSupportedServiceNames( )
throw ( ::com::sun::star::uno::RuntimeException );
diff --git a/writerperfect/source/writer/MWAWImportFilter.cxx b/writerperfect/source/writer/MWAWImportFilter.cxx
index 50f5e11dfce3..ff4d7af6a089 100644
--- a/writerperfect/source/writer/MWAWImportFilter.cxx
+++ b/writerperfect/source/writer/MWAWImportFilter.cxx
@@ -19,6 +19,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>
#include <ucbhelper/content.hxx>
@@ -1030,24 +1031,15 @@ throw (RuntimeException)
return OUString ( "com.sun.star.comp.Writer.MWAWImportFilter" );
}
-#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
-#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
-sal_Bool SAL_CALL MWAWImportFilter_supportsService( const OUString &ServiceName )
-throw (RuntimeException)
-{
- return ( ServiceName == SERVICE_NAME1 || ServiceName == SERVICE_NAME2 );
-}
Sequence< OUString > SAL_CALL MWAWImportFilter_getSupportedServiceNames( )
throw (RuntimeException)
{
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 MWAWImportFilter_createInstance( const Reference< XComponentContext > &rContext)
throw( Exception )
@@ -1064,7 +1056,7 @@ throw (RuntimeException)
sal_Bool SAL_CALL MWAWImportFilter::supportsService( const OUString &rServiceName )
throw (RuntimeException)
{
- return MWAWImportFilter_supportsService( rServiceName );
+ return cppu::supportsService( this, rServiceName );
}
Sequence< OUString > SAL_CALL MWAWImportFilter::getSupportedServiceNames( )
throw (RuntimeException)
diff --git a/writerperfect/source/writer/MWAWImportFilter.hxx b/writerperfect/source/writer/MWAWImportFilter.hxx
index 0ccccb13fa91..ca28db768bbf 100644
--- a/writerperfect/source/writer/MWAWImportFilter.hxx
+++ b/writerperfect/source/writer/MWAWImportFilter.hxx
@@ -76,9 +76,6 @@ public:
OUString MWAWImportFilter_getImplementationName()
throw ( ::com::sun::star::uno::RuntimeException );
-sal_Bool SAL_CALL MWAWImportFilter_supportsService( const OUString &ServiceName )
-throw ( ::com::sun::star::uno::RuntimeException );
-
::com::sun::star::uno::Sequence< OUString > SAL_CALL MWAWImportFilter_getSupportedServiceNames( )
throw ( ::com::sun::star::uno::RuntimeException );
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx
index 3141b452d12a..589125c17b38 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx
@@ -19,6 +19,7 @@
#include <com/sun/star/io/XSeekable.hpp>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include <xmloff/attrlist.hxx>
#include <sfx2/passwd.hxx>
@@ -240,24 +241,15 @@ throw (RuntimeException)
return OUString ( "com.sun.star.comp.Writer.WordPerfectImportFilter" );
}
-#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
-#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
-sal_Bool SAL_CALL WordPerfectImportFilter_supportsService( const OUString &ServiceName )
-throw (RuntimeException)
-{
- return ( ServiceName == SERVICE_NAME1 || ServiceName == SERVICE_NAME2 );
-}
Sequence< OUString > SAL_CALL WordPerfectImportFilter_getSupportedServiceNames( )
throw (RuntimeException)
{
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 WordPerfectImportFilter_createInstance( const Reference< XComponentContext > & rContext)
throw( Exception )
@@ -274,7 +266,7 @@ throw (RuntimeException)
sal_Bool SAL_CALL WordPerfectImportFilter::supportsService( const OUString &rServiceName )
throw (RuntimeException)
{
- return WordPerfectImportFilter_supportsService( rServiceName );
+ return cppu::supportsService( this, rServiceName );
}
Sequence< OUString > SAL_CALL WordPerfectImportFilter::getSupportedServiceNames( )
throw (RuntimeException)
@@ -366,7 +358,7 @@ throw (RuntimeException)
sal_Bool SAL_CALL WordPerfectImportFilterDialog::supportsService( const OUString &rServiceName )
throw (RuntimeException)
{
- return WordPerfectImportFilterDialog_supportsService( rServiceName );
+ return cppu::supportsService( this, rServiceName );
}
Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog::getSupportedServiceNames( )
@@ -381,22 +373,14 @@ throw (RuntimeException)
return OUString ( "com.sun.star.comp.Writer.WordPerfectImportFilterDialog" );
}
-#define SERVICE_NAME "com.sun.star.ui.dialogs.FilterOptionsDialog"
-sal_Bool SAL_CALL WordPerfectImportFilterDialog_supportsService( const OUString &ServiceName )
-throw (RuntimeException)
-{
- return ( ServiceName == SERVICE_NAME );
-}
-
Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog_getSupportedServiceNames( )
throw (RuntimeException)
{
Sequence < OUString > aRet(1);
OUString *pArray = aRet.getArray();
- pArray[0] = OUString ( SERVICE_NAME );
+ pArray[0] = OUString ( "com.sun.star.ui.dialogs.FilterOptionsDialog" );
return aRet;
}
-#undef SERVICE_NAME
Reference< XInterface > SAL_CALL WordPerfectImportFilterDialog_createInstance( const Reference< XComponentContext > & rContext)
throw( Exception )