diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-10-26 14:22:21 -0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-30 16:27:50 +0100 |
commit | 0865c446c2ac3facd75f03020e934e71403429e1 (patch) | |
tree | 83b56e5a2b93eaab39749d0b31c66805f9556cfa /package/source/zippackage | |
parent | 88d87cefb61b03909b26ea3ad89e2dc7b5538a0f (diff) |
fdo#54938: Convert package, writerfilter and writerperfect
Change-Id: I5220e172bf9722ad86eef3bc557c30779f07201c
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'package/source/zippackage')
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 3 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageFolder.cxx | 4 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageFolderEnumeration.cxx | 4 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 3 | ||||
-rw-r--r-- | package/source/zippackage/zipfileaccess.cxx | 9 |
5 files changed, 12 insertions, 11 deletions
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() |