diff options
author | Martin Gallwey <mtg@openoffice.org> | 2000-11-29 02:21:56 +0000 |
---|---|---|
committer | Martin Gallwey <mtg@openoffice.org> | 2000-11-29 02:21:56 +0000 |
commit | 07c2807484991b45fdd6cb87485d854567f2f87b (patch) | |
tree | bb523c478b3fa02cb0e32f2533896d662f7c5aef /package/inc/ZipEnumeration.hxx | |
parent | 81c60a38c4187ad2fc4885eff6dcc28c382bc4f4 (diff) |
#80556# bug fixes
Diffstat (limited to 'package/inc/ZipEnumeration.hxx')
-rw-r--r-- | package/inc/ZipEnumeration.hxx | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/package/inc/ZipEnumeration.hxx b/package/inc/ZipEnumeration.hxx index 29616a482711..835404dc2f09 100644 --- a/package/inc/ZipEnumeration.hxx +++ b/package/inc/ZipEnumeration.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ZipEnumeration.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: mtg $ $Date: 2000-11-21 12:07:58 $ + * last change: $Author: mtg $ $Date: 2000-11-29 03:18:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -73,17 +73,41 @@ #include "ZipEntryImpl.hxx" #endif +struct entryEqFunc +{ + sal_Bool operator()( const rtl::OUString &r1, + const rtl::OUString &r2) const + { + return r1 == r2; + } +}; + +struct entryHashFunc +{ + sal_Int32 operator()(const rtl::OUString &r1) const + { + return r1.hashCode(); + } +}; +#include <hash_map> +typedef std::hash_map < rtl::OUString, com::sun::star::package::ZipEntry, entryHashFunc, entryEqFunc > EntryHash; + +#ifndef _ZIP_FILE_HXX_ +#include "ZipFile.hxx" +#endif + + class ZipEnumeration : public cppu::WeakImplHelper1 < com::sun::star::container::XEnumeration> { private: - com::sun::star::uno::Sequence< com::sun::star::package::ZipEntry > xZipList; + EntryHash &rEntryHash; + EntryHash::const_iterator aIterator; sal_uInt16 nCurrent; public: 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::uno::RuntimeException); virtual ~ZipEnumeration(void); - ZipEnumeration(void); - ZipEnumeration( com::sun::star::uno::Sequence< com::sun::star::package::ZipEntry > &xList); + ZipEnumeration( EntryHash &rNewEntryHash); //ZipEnumeration( com::sun::star::uno::Reference < com::sun::star::uno::Sequence< com::sun::star::package::ZipEntry > >&xList); /* ZipEnumeration(const com::sun::star::uno::Sequence< |