summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/source/manifest/ManifestReader.cxx8
-rw-r--r--package/source/manifest/ManifestReader.hxx1
-rw-r--r--package/source/manifest/ManifestWriter.cxx7
-rw-r--r--package/source/manifest/ManifestWriter.hxx1
-rw-r--r--package/source/zippackage/ZipPackage.cxx3
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx4
-rw-r--r--package/source/zippackage/ZipPackageFolderEnumeration.cxx4
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx3
-rw-r--r--package/source/zippackage/zipfileaccess.cxx9
-rw-r--r--writerfilter/source/filter/ImportFilter.cxx21
-rw-r--r--writerfilter/source/filter/RtfFilter.cxx12
-rw-r--r--writerfilter/source/filter/WriterFilterDetection.cxx13
-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
27 files changed, 61 insertions, 189 deletions
diff --git a/package/source/manifest/ManifestReader.cxx b/package/source/manifest/ManifestReader.cxx
index 2e2b6a0922c0..ac8d75bf287e 100644
--- a/package/source/manifest/ManifestReader.cxx
+++ b/package/source/manifest/ManifestReader.cxx
@@ -21,6 +21,7 @@
#include <ManifestImport.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/factory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/xml/sax/SAXParseException.hpp>
#include <com/sun/star/xml/sax/Parser.hpp>
@@ -92,11 +93,6 @@ OUString ManifestReader::static_getImplementationName()
return OUString( "com.sun.star.packages.manifest.comp.ManifestReader" );
}
-sal_Bool SAL_CALL ManifestReader::static_supportsService(OUString const & rServiceName)
-{
- return rServiceName == getSupportedServiceNames()[0];
-}
-
Sequence < OUString > ManifestReader::static_getSupportedServiceNames()
{
Sequence < OUString > aNames(1);
@@ -113,7 +109,7 @@ OUString ManifestReader::getImplementationName()
sal_Bool SAL_CALL ManifestReader::supportsService(OUString const & rServiceName)
throw (RuntimeException)
{
- return static_supportsService ( rServiceName );
+ return cppu::supportsService(this, rServiceName );
}
Sequence < OUString > ManifestReader::getSupportedServiceNames()
diff --git a/package/source/manifest/ManifestReader.hxx b/package/source/manifest/ManifestReader.hxx
index d050405ace15..72fe473ad153 100644
--- a/package/source/manifest/ManifestReader.hxx
+++ b/package/source/manifest/ManifestReader.hxx
@@ -56,7 +56,6 @@ public:
// Component constructor
static OUString static_getImplementationName();
static ::com::sun::star::uno::Sequence < OUString > static_getSupportedServiceNames();
- sal_Bool SAL_CALL static_supportsService(OUString const & rServiceName);
static ::com::sun::star::uno::Reference < com::sun::star::lang::XSingleServiceFactory > createServiceFactory( com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > const & rServiceFactory );
};
#endif
diff --git a/package/source/manifest/ManifestWriter.cxx b/package/source/manifest/ManifestWriter.cxx
index eaf67942ab4e..7d69b37261b6 100644
--- a/package/source/manifest/ManifestWriter.cxx
+++ b/package/source/manifest/ManifestWriter.cxx
@@ -21,6 +21,7 @@
#include <ManifestExport.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/factory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/xml/sax/Writer.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -74,10 +75,6 @@ OUString ManifestWriter::static_getImplementationName()
return OUString ( "com.sun.star.packages.manifest.comp.ManifestWriter" );
}
-sal_Bool SAL_CALL ManifestWriter::static_supportsService(OUString const & rServiceName)
-{
- return rServiceName == getSupportedServiceNames()[0];
-}
Sequence < OUString > ManifestWriter::static_getSupportedServiceNames()
{
Sequence < OUString > aNames(1);
@@ -94,7 +91,7 @@ OUString ManifestWriter::getImplementationName()
sal_Bool SAL_CALL ManifestWriter::supportsService(OUString const & rServiceName)
throw (RuntimeException)
{
- return static_supportsService ( rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
Sequence < OUString > ManifestWriter::getSupportedServiceNames()
throw (RuntimeException)
diff --git a/package/source/manifest/ManifestWriter.hxx b/package/source/manifest/ManifestWriter.hxx
index 4b7e773c729b..f4b77a0f17e6 100644
--- a/package/source/manifest/ManifestWriter.hxx
+++ b/package/source/manifest/ManifestWriter.hxx
@@ -57,7 +57,6 @@ public:
static OUString static_getImplementationName();
static ::com::sun::star::uno::Sequence < OUString > static_getSupportedServiceNames();
static ::com::sun::star::uno::Reference < com::sun::star::lang::XSingleServiceFactory > createServiceFactory( com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > const & rServiceFactory );
- sal_Bool SAL_CALL static_supportsService(OUString const & rServiceName);
};
#endif
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 3f6a0f5be159..34068ec54cd1 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -77,6 +77,7 @@
#include <comphelper/ofopxmlhelper.hxx>
#include <comphelper/documentconstants.hxx>
#include <comphelper/sequenceashashmap.hxx>
+#include <cppuhelper/supportsservice.hxx>
using namespace std;
using namespace osl;
@@ -1591,7 +1592,7 @@ Sequence< OUString > ZipPackage::static_getSupportedServiceNames()
sal_Bool SAL_CALL ZipPackage::static_supportsService( OUString const & rServiceName )
{
- return rServiceName == getSupportedServiceNames()[0];
+ return cppu::supportsService(this, rServiceName);
}
OUString ZipPackage::getImplementationName()
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index 0c4695944ca2..ca441b009369 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -27,6 +27,7 @@
#include <ZipPackageFolderEnumeration.hxx>
#include <com/sun/star/packages/zip/ZipConstants.hpp>
#include <com/sun/star/embed/StorageFormats.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include <osl/diagnose.h>
#include <osl/time.h>
#include <rtl/digest.h>
@@ -833,10 +834,11 @@ uno::Sequence< OUString > ZipPackageFolder::getSupportedServiceNames()
aNames[0] = "com.sun.star.packages.PackageFolder";
return aNames;
}
+
sal_Bool SAL_CALL ZipPackageFolder::supportsService( OUString const & rServiceName )
throw (uno::RuntimeException)
{
- return rServiceName == getSupportedServiceNames()[0];
+ return cppu::supportsService(this, rServiceName);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/zippackage/ZipPackageFolderEnumeration.cxx b/package/source/zippackage/ZipPackageFolderEnumeration.cxx
index e3b1676cd83a..64b48b33eeec 100644
--- a/package/source/zippackage/ZipPackageFolderEnumeration.cxx
+++ b/package/source/zippackage/ZipPackageFolderEnumeration.cxx
@@ -19,6 +19,7 @@
#include <ZipPackageFolderEnumeration.hxx>
#include <ContentInfo.hxx>
+#include <cppuhelper/supportsservice.hxx>
using namespace com::sun::star;
@@ -61,10 +62,11 @@ uno::Sequence< OUString > ZipPackageFolderEnumeration::getSupportedServiceNames(
aNames[0] = "com.sun.star.packages.PackageFolderEnumeration";
return aNames;
}
+
sal_Bool SAL_CALL ZipPackageFolderEnumeration::supportsService( OUString const & rServiceName )
throw (uno::RuntimeException)
{
- return rServiceName == getSupportedServiceNames()[0];
+ return cppu::supportsService(this, rServiceName);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index bb96203bb141..c4f7d3a10f2f 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -41,6 +41,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/seekableinput.hxx>
#include <comphelper/storagehelper.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <rtl/instance.hxx>
@@ -920,7 +921,7 @@ Sequence< OUString > ZipPackageStream::getSupportedServiceNames()
sal_Bool SAL_CALL ZipPackageStream::supportsService( OUString const & rServiceName )
throw ( RuntimeException )
{
- return rServiceName == getSupportedServiceNames()[0];
+ return cppu::supportsService(this, rServiceName);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index afce398a511b..17c5cf27b525 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/io/XStream.hpp>
#include <com/sun/star/io/XSeekable.hpp>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <zipfileaccess.hxx>
#include <ZipEnumeration.hxx>
#include <ZipPackageSink.hxx>
@@ -446,13 +447,7 @@ OUString SAL_CALL OZipFileAccess::getImplementationName()
sal_Bool SAL_CALL OZipFileAccess::supportsService( const OUString& ServiceName )
throw ( uno::RuntimeException )
{
- uno::Sequence< OUString > aSeq = impl_staticGetSupportedServiceNames();
-
- for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
- if ( ServiceName == aSeq[nInd] )
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
uno::Sequence< OUString > SAL_CALL OZipFileAccess::getSupportedServiceNames()
diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx
index 784a18aef680..94a98a9f847e 100644
--- a/writerfilter/source/filter/ImportFilter.cxx
+++ b/writerfilter/source/filter/ImportFilter.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/mediadescriptor.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <oox/core/filterdetect.hxx>
#include <dmapper/DomainMapper.hxx>
#include <WriterFilter.hxx>
@@ -254,28 +255,14 @@ OUString WriterFilter_getImplementationName () throw (uno::RuntimeException)
return OUString ( "com.sun.star.comp.Writer.WriterFilter" );
}
-#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
-#define SERVICE_NAME2 "com.sun.star.document.ExportFilter"
-
-
-sal_Bool WriterFilter_supportsService( const OUString& ServiceName ) throw (uno::RuntimeException)
-{
- return (ServiceName == SERVICE_NAME1 || ServiceName == SERVICE_NAME2 );
-}
-
-
uno::Sequence< OUString > WriterFilter_getSupportedServiceNames( ) throw (uno::RuntimeException)
{
uno::Sequence < OUString > aRet(2);
OUString* pArray = aRet.getArray();
- pArray[0] = SERVICE_NAME1;
- pArray[1] = SERVICE_NAME2;
+ pArray[0] = "com.sun.star.document.ImportFilter";
+ pArray[1] = "com.sun.star.document.ExportFilter";
return aRet;
}
-#undef SERVICE_NAME1
-#undef SERVICE_NAME2
-
-
uno::Reference< uno::XInterface > WriterFilter_createInstance( const uno::Reference< uno::XComponentContext >& xContext)
throw( uno::Exception )
@@ -293,7 +280,7 @@ OUString WriterFilter::getImplementationName( ) throw (uno::RuntimeException)
sal_Bool WriterFilter::supportsService( const OUString& rServiceName ) throw (uno::RuntimeException)
{
- return WriterFilter_supportsService( rServiceName );
+ return cppu::supportsService( this, rServiceName );
}
diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx
index 466afd672a62..ee78bf1d6ce9 100644
--- a/writerfilter/source/filter/RtfFilter.cxx
+++ b/writerfilter/source/filter/RtfFilter.cxx
@@ -23,6 +23,7 @@
#include <tools/solar.h>
#include <RtfFilter.hxx>
#include <comphelper/mediadescriptor.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <dmapper/DomainMapper.hxx>
#include <rtftok/RTFDocument.hxx>
#include <com/sun/star/frame/XFrame.hpp>
@@ -174,11 +175,9 @@ OUString RtfFilter::getImplementationName( ) throw (uno::RuntimeException)
return RtfFilter_getImplementationName();
}
-#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
-#define SERVICE_NAME2 "com.sun.star.document.ExportFilter"
sal_Bool RtfFilter::supportsService( const OUString& rServiceName ) throw (uno::RuntimeException)
{
- return ( rServiceName == SERVICE_NAME1 || rServiceName == SERVICE_NAME2 );
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > RtfFilter::getSupportedServiceNames( ) throw (uno::RuntimeException)
@@ -187,7 +186,6 @@ uno::Sequence< OUString > RtfFilter::getSupportedServiceNames( ) throw (uno::Ru
}
/* Helpers, used by shared lib exports. */
-
OUString RtfFilter_getImplementationName () throw (uno::RuntimeException)
{
return OUString ( "com.sun.star.comp.Writer.RtfFilter" );
@@ -197,12 +195,10 @@ uno::Sequence< OUString > RtfFilter_getSupportedServiceNames( ) throw (uno::Run
{
uno::Sequence < OUString > aRet(2);
OUString* pArray = aRet.getArray();
- pArray[0] = SERVICE_NAME1;
- pArray[1] = SERVICE_NAME2;
+ pArray[0] = "com.sun.star.document.ImportFilter";
+ pArray[1] = "com.sun.star.document.ExportFilter";
return aRet;
}
-#undef SERVICE_NAME1
-#undef SERVICE_NAME2
uno::Reference< uno::XInterface > RtfFilter_createInstance( const uno::Reference< uno::XComponentContext >& xContext)
throw( uno::Exception )
diff --git a/writerfilter/source/filter/WriterFilterDetection.cxx b/writerfilter/source/filter/WriterFilterDetection.cxx
index 926c7c0f423f..50dcaccd24b2 100644
--- a/writerfilter/source/filter/WriterFilterDetection.cxx
+++ b/writerfilter/source/filter/WriterFilterDetection.cxx
@@ -18,6 +18,7 @@
*/
#include <cppuhelper/implementationentry.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <WriterFilterDetection.hxx>
#include <comphelper/storagehelper.hxx>
#include <com/sun/star/io/XInputStream.hpp>
@@ -47,7 +48,6 @@ OUString WriterFilterDetection_getImplementationName () throw (uno::RuntimeExcep
return OUString ( "com.sun.star.comp.Writer.WriterFilterDetector" );
}
-#define SERVICE_NAME1 "com.sun.star.document.ExtendedTypeDetection"
OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& rDescriptor )
@@ -132,20 +132,13 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r
}
-sal_Bool WriterFilterDetection_supportsService( const OUString& ServiceName ) throw (uno::RuntimeException)
-{
- return ServiceName == SERVICE_NAME1;
-}
-
-
uno::Sequence< OUString > WriterFilterDetection_getSupportedServiceNames( ) throw (uno::RuntimeException)
{
uno::Sequence < OUString > aRet(1);
OUString* pArray = aRet.getArray();
- pArray[0] = OUString ( SERVICE_NAME1 );
+ pArray[0] = OUString ( "com.sun.star.document.ExtendedTypeDetection" );
return aRet;
}
-#undef SERVICE_NAME1
uno::Reference< uno::XInterface > WriterFilterDetection_createInstance( const uno::Reference< uno::XComponentContext >& xContext)
@@ -163,7 +156,7 @@ OUString WriterFilterDetection::getImplementationName( ) throw (uno::RuntimeExc
sal_Bool WriterFilterDetection::supportsService( const OUString& rServiceName ) throw (uno::RuntimeException)
{
- return WriterFilterDetection_supportsService( rServiceName );
+ return cppu::supportsService( this, rServiceName );
}
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 )