summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Gallwey <mtg@openoffice.org>2001-11-15 19:30:34 +0000
committerMartin Gallwey <mtg@openoffice.org>2001-11-15 19:30:34 +0000
commit21f49ac87f8f21a15c9c0903351f10d5f9556077 (patch)
tree19128f6fc6c7cc6ff0c333dc401d532212bfad55
parent3da402de735542e628897cf3f9f967bd18dc5501 (diff)
#94679# support XTypeProvider and XServiceInfo
-rw-r--r--package/source/zippackage/ZipPackageFolderEnumeration.cxx27
-rw-r--r--package/source/zippackage/ZipPackageFolderEnumeration.hxx28
2 files changed, 45 insertions, 10 deletions
diff --git a/package/source/zippackage/ZipPackageFolderEnumeration.cxx b/package/source/zippackage/ZipPackageFolderEnumeration.cxx
index 69a69a0ee148..e76211057242 100644
--- a/package/source/zippackage/ZipPackageFolderEnumeration.cxx
+++ b/package/source/zippackage/ZipPackageFolderEnumeration.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ZipPackageFolderEnumeration.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: mtg $ $Date: 2001-09-14 15:17:22 $
+ * last change: $Author: mtg $ $Date: 2001-11-15 20:30:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,12 +59,14 @@
*
************************************************************************/
#ifndef _ZIP_PACKAGE_FOLDER_ENUMERATION_HXX
-#include "ZipPackageFolderEnumeration.hxx"
+#include <ZipPackageFolderEnumeration.hxx>
#endif
#ifndef _CONTENT_INFO_HXX_
#include <ContentInfo.hxx>
#endif
+
using namespace com::sun::star;
+using rtl::OUString;
ZipPackageFolderEnumeration::ZipPackageFolderEnumeration ( ContentHash &rInput)
: rContents (rInput)
@@ -91,3 +93,22 @@ uno::Any SAL_CALL ZipPackageFolderEnumeration::nextElement( )
aIterator++;
return aAny;
}
+
+OUString ZipPackageFolderEnumeration::getImplementationName()
+ throw (uno::RuntimeException)
+{
+ return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "ZipPackageFolderEnumeration" ) );
+}
+
+uno::Sequence< OUString > ZipPackageFolderEnumeration::getSupportedServiceNames()
+ throw (uno::RuntimeException)
+{
+ uno::Sequence< OUString > aNames(1);
+ aNames[0] = OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.packages.PackageFolderEnumeration" ) );
+ return aNames;
+}
+sal_Bool SAL_CALL ZipPackageFolderEnumeration::supportsService( OUString const & rServiceName )
+ throw (uno::RuntimeException)
+{
+ return rServiceName == getSupportedServiceNames()[0];
+}
diff --git a/package/source/zippackage/ZipPackageFolderEnumeration.hxx b/package/source/zippackage/ZipPackageFolderEnumeration.hxx
index c4e70936795c..e254176c457f 100644
--- a/package/source/zippackage/ZipPackageFolderEnumeration.hxx
+++ b/package/source/zippackage/ZipPackageFolderEnumeration.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ZipPackageFolderEnumeration.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: mtg $ $Date: 2001-09-14 15:16:27 $
+ * last change: $Author: mtg $ $Date: 2001-11-15 20:30:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -61,19 +61,24 @@
#ifndef _ZIP_PACKAGE_FOLDER_ENUMERATION_HXX
#define _ZIP_PACKAGE_FOLDER_ENUMERATION_HXX
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
-#include <cppuhelper/implbase1.hxx> // helper for implementations
+#ifndef _CPPUHELPER_IMPLBASE2_HXX_
+#include <cppuhelper/implbase2.hxx> // helper for implementations
#endif
#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATION_HPP_
#include <com/sun/star/container/XEnumeration.hpp>
#endif
+#ifndef _COM_SUN_STAR_LANG_XPSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
#ifndef _HASH_MAPS_HXX
#include <HashMaps.hxx>
#endif
-class ZipPackageFolderEnumeration : public cppu::WeakImplHelper1<
- com::sun::star::container::XEnumeration
- >
+class ZipPackageFolderEnumeration : public cppu::WeakImplHelper2
+<
+ com::sun::star::container::XEnumeration,
+ com::sun::star::lang::XServiceInfo
+>
{
protected:
ContentHash &rContents;
@@ -82,11 +87,20 @@ public:
//ZipPackageFolderEnumeration (std::hash_map < rtl::OUString, com::sun::star::uno::Reference < com::sun::star::container::XNamed >, hashFunc, eqFunc > &rInput);
ZipPackageFolderEnumeration (ContentHash &rInput);
virtual ~ZipPackageFolderEnumeration( void );
+
// XEnumeration
virtual sal_Bool SAL_CALL hasMoreElements( )
throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL nextElement( )
throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
+ throw (::com::sun::star::uno::RuntimeException);
+
};
#endif