summaryrefslogtreecommitdiff
path: root/package/source
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 /package/source
parent88d87cefb61b03909b26ea3ad89e2dc7b5538a0f (diff)
fdo#54938: Convert package, writerfilter and writerperfect
Change-Id: I5220e172bf9722ad86eef3bc557c30779f07201c Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'package/source')
-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
9 files changed, 16 insertions, 24 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()