summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-10-26 14:22:21 -0200
committerStephan Bergmann <sbergman@redhat.com>2013-10-30 16:27:50 +0100
commit0865c446c2ac3facd75f03020e934e71403429e1 (patch)
tree83b56e5a2b93eaab39749d0b31c66805f9556cfa /writerperfect
parent88d87cefb61b03909b26ea3ad89e2dc7b5538a0f (diff)
fdo#54938: Convert package, writerfilter and writerperfect
Change-Id: I5220e172bf9722ad86eef3bc557c30779f07201c Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/source/draw/CDRImportFilter.cxx17
-rw-r--r--writerperfect/source/draw/CDRImportFilter.hxx3
-rw-r--r--writerperfect/source/draw/CMXImportFilter.cxx17
-rw-r--r--writerperfect/source/draw/CMXImportFilter.hxx3
-rw-r--r--writerperfect/source/draw/MSPUBImportFilter.cxx17
-rw-r--r--writerperfect/source/draw/MSPUBImportFilter.hxx3
-rw-r--r--writerperfect/source/draw/VisioImportFilter.cxx17
-rw-r--r--writerperfect/source/draw/VisioImportFilter.hxx3
-rw-r--r--writerperfect/source/draw/WPGImportFilter.cxx17
-rw-r--r--writerperfect/source/draw/WPGImportFilter.hxx3
-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
15 files changed, 34 insertions, 130 deletions
diff --git a/writerperfect/source/draw/CDRImportFilter.cxx b/writerperfect/source/draw/CDRImportFilter.cxx
index 650a773bca7e..44e22838cf05 100644
--- a/writerperfect/source/draw/CDRImportFilter.cxx
+++ b/writerperfect/source/draw/CDRImportFilter.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.CDRImportFilter" );
}
-#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
-#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
-sal_Bool SAL_CALL CDRImportFilter_supportsService( const OUString &ServiceName )
-throw (RuntimeException)
-{
- SAL_INFO("writerperfect", "CDRImportFilter_supportsService");
- return ( ServiceName == SERVICE_NAME1 || ServiceName == SERVICE_NAME2 );
-}
Sequence< OUString > SAL_CALL CDRImportFilter_getSupportedServiceNames( )
throw (RuntimeException)
{
SAL_INFO("writerperfect", "CDRImportFilter_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 CDRImportFilter_createInstance( const Reference< XComponentContext > & rContext)
throw( Exception )
@@ -213,7 +204,7 @@ sal_Bool SAL_CALL CDRImportFilter::supportsService( const OUString &rServiceName
throw (RuntimeException)
{
SAL_INFO("writerperfect", "CDRImportFilter::supportsService");
- return CDRImportFilter_supportsService( rServiceName );
+ return cppu::supportsService( this, rServiceName );
}
Sequence< OUString > SAL_CALL CDRImportFilter::getSupportedServiceNames( )
throw (RuntimeException)
diff --git a/writerperfect/source/draw/CDRImportFilter.hxx b/writerperfect/source/draw/CDRImportFilter.hxx
index efdfae8ce54c..e0e318feefc1 100644
--- a/writerperfect/source/draw/CDRImportFilter.hxx
+++ b/writerperfect/source/draw/CDRImportFilter.hxx
@@ -77,9 +77,6 @@ public:
OUString CDRImportFilter_getImplementationName()
throw ( ::com::sun::star::uno::RuntimeException );
-sal_Bool SAL_CALL CDRImportFilter_supportsService( const OUString &ServiceName )
-throw ( ::com::sun::star::uno::RuntimeException );
-
::com::sun::star::uno::Sequence< OUString > SAL_CALL CDRImportFilter_getSupportedServiceNames( )
throw ( ::com::sun::star::uno::RuntimeException );
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)
diff --git a/writerperfect/source/draw/CMXImportFilter.hxx b/writerperfect/source/draw/CMXImportFilter.hxx
index a218ff83194a..309bfb427bdb 100644
--- a/writerperfect/source/draw/CMXImportFilter.hxx
+++ b/writerperfect/source/draw/CMXImportFilter.hxx
@@ -77,9 +77,6 @@ public:
OUString CMXImportFilter_getImplementationName()
throw ( ::com::sun::star::uno::RuntimeException );
-sal_Bool SAL_CALL CMXImportFilter_supportsService( const OUString &ServiceName )
-throw ( ::com::sun::star::uno::RuntimeException );
-
::com::sun::star::uno::Sequence< OUString > SAL_CALL CMXImportFilter_getSupportedServiceNames( )
throw ( ::com::sun::star::uno::RuntimeException );
diff --git a/writerperfect/source/draw/MSPUBImportFilter.cxx b/writerperfect/source/draw/MSPUBImportFilter.cxx
index 60768887aa14..ed09f0a5697b 100644
--- a/writerperfect/source/draw/MSPUBImportFilter.cxx
+++ b/writerperfect/source/draw/MSPUBImportFilter.cxx
@@ -17,6 +17,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>
@@ -170,26 +171,16 @@ throw (RuntimeException)
return OUString ( "com.sun.star.comp.Draw.MSPUBImportFilter" );
}
-#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
-#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
-sal_Bool SAL_CALL MSPUBImportFilter_supportsService( const OUString &ServiceName )
-throw (RuntimeException)
-{
- SAL_INFO("writerperfect", "MSPUBImportFilter_supportsService");
- return ( ServiceName == SERVICE_NAME1 || ServiceName == SERVICE_NAME2 );
-}
Sequence< OUString > SAL_CALL MSPUBImportFilter_getSupportedServiceNames( )
throw (RuntimeException)
{
SAL_INFO("writerperfect", "MSPUBImportFilter_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 MSPUBImportFilter_createInstance( const Reference< XComponentContext > & rContext)
throw( Exception )
@@ -209,7 +200,7 @@ sal_Bool SAL_CALL MSPUBImportFilter::supportsService( const OUString &rServiceNa
throw (RuntimeException)
{
SAL_INFO("writerperfect", "MSPUBImportFilter::supportsService");
- return MSPUBImportFilter_supportsService( rServiceName );
+ return cppu::supportsService( this, rServiceName );
}
Sequence< OUString > SAL_CALL MSPUBImportFilter::getSupportedServiceNames( )
throw (RuntimeException)
diff --git a/writerperfect/source/draw/MSPUBImportFilter.hxx b/writerperfect/source/draw/MSPUBImportFilter.hxx
index 90bb2aaee1b6..4a7fb8053f97 100644
--- a/writerperfect/source/draw/MSPUBImportFilter.hxx
+++ b/writerperfect/source/draw/MSPUBImportFilter.hxx
@@ -74,9 +74,6 @@ public:
OUString MSPUBImportFilter_getImplementationName()
throw ( ::com::sun::star::uno::RuntimeException );
-sal_Bool SAL_CALL MSPUBImportFilter_supportsService( const OUString &ServiceName )
-throw ( ::com::sun::star::uno::RuntimeException );
-
::com::sun::star::uno::Sequence< OUString > SAL_CALL MSPUBImportFilter_getSupportedServiceNames( )
throw ( ::com::sun::star::uno::RuntimeException );
diff --git a/writerperfect/source/draw/VisioImportFilter.cxx b/writerperfect/source/draw/VisioImportFilter.cxx
index 5565dd3de67f..2c38c45b897a 100644
--- a/writerperfect/source/draw/VisioImportFilter.cxx
+++ b/writerperfect/source/draw/VisioImportFilter.cxx
@@ -17,6 +17,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>
@@ -170,26 +171,16 @@ throw (RuntimeException)
return OUString ( "com.sun.star.comp.Draw.VisioImportFilter" );
}
-#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
-#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
-sal_Bool SAL_CALL VisioImportFilter_supportsService( const OUString &ServiceName )
-throw (RuntimeException)
-{
- SAL_INFO("writerperfect", "VisioImportFilter_supportsService");
- return ( ServiceName == SERVICE_NAME1 || ServiceName == SERVICE_NAME2 );
-}
Sequence< OUString > SAL_CALL VisioImportFilter_getSupportedServiceNames( )
throw (RuntimeException)
{
SAL_INFO("writerperfect", "VisioImportFilter_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 VisioImportFilter_createInstance( const Reference< XComponentContext > & rContext)
throw( Exception )
@@ -209,7 +200,7 @@ sal_Bool SAL_CALL VisioImportFilter::supportsService( const OUString &rServiceNa
throw (RuntimeException)
{
SAL_INFO("writerperfect", "VisioImportFilter::supportsService");
- return VisioImportFilter_supportsService( rServiceName );
+ return cppu::supportsService( this, rServiceName );
}
Sequence< OUString > SAL_CALL VisioImportFilter::getSupportedServiceNames( )
throw (RuntimeException)
diff --git a/writerperfect/source/draw/VisioImportFilter.hxx b/writerperfect/source/draw/VisioImportFilter.hxx
index b0018652c598..699e2c6cdac5 100644
--- a/writerperfect/source/draw/VisioImportFilter.hxx
+++ b/writerperfect/source/draw/VisioImportFilter.hxx
@@ -74,9 +74,6 @@ public:
OUString VisioImportFilter_getImplementationName()
throw ( ::com::sun::star::uno::RuntimeException );
-sal_Bool SAL_CALL VisioImportFilter_supportsService( const OUString &ServiceName )
-throw ( ::com::sun::star::uno::RuntimeException );
-
::com::sun::star::uno::Sequence< OUString > SAL_CALL VisioImportFilter_getSupportedServiceNames( )
throw ( ::com::sun::star::uno::RuntimeException );
diff --git a/writerperfect/source/draw/WPGImportFilter.cxx b/writerperfect/source/draw/WPGImportFilter.cxx
index 07729157a47b..5636650da04b 100644
--- a/writerperfect/source/draw/WPGImportFilter.cxx
+++ b/writerperfect/source/draw/WPGImportFilter.cxx
@@ -23,6 +23,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>
@@ -176,26 +177,16 @@ throw (RuntimeException)
return OUString ( "com.sun.star.comp.Draw.WPGImportFilter" );
}
-#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
-#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
-sal_Bool SAL_CALL WPGImportFilter_supportsService( const OUString &ServiceName )
-throw (RuntimeException)
-{
- SAL_INFO("writerperfect", "WPGImportFilter_supportsService");
- return ( ServiceName == SERVICE_NAME1 || ServiceName == SERVICE_NAME2 );
-}
Sequence< OUString > SAL_CALL WPGImportFilter_getSupportedServiceNames( )
throw (RuntimeException)
{
SAL_INFO("writerperfect", "WPGImportFilter_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 WPGImportFilter_createInstance( const Reference< XComponentContext > & rContext)
throw( Exception )
@@ -215,7 +206,7 @@ sal_Bool SAL_CALL WPGImportFilter::supportsService( const OUString &rServiceName
throw (RuntimeException)
{
SAL_INFO("writerperfect", "WPGImportFilter::supportsService");
- return WPGImportFilter_supportsService( rServiceName );
+ return cppu::supportsService( this, rServiceName );
}
Sequence< OUString > SAL_CALL WPGImportFilter::getSupportedServiceNames( )
throw (RuntimeException)
diff --git a/writerperfect/source/draw/WPGImportFilter.hxx b/writerperfect/source/draw/WPGImportFilter.hxx
index 12bbf58a68cf..9598b33e4b55 100644
--- a/writerperfect/source/draw/WPGImportFilter.hxx
+++ b/writerperfect/source/draw/WPGImportFilter.hxx
@@ -79,9 +79,6 @@ public:
OUString WPGImportFilter_getImplementationName()
throw ( ::com::sun::star::uno::RuntimeException );
-sal_Bool SAL_CALL WPGImportFilter_supportsService( const OUString &ServiceName )
-throw ( ::com::sun::star::uno::RuntimeException );
-
::com::sun::star::uno::Sequence< OUString > SAL_CALL WPGImportFilter_getSupportedServiceNames( )
throw ( ::com::sun::star::uno::RuntimeException );
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 )