summaryrefslogtreecommitdiff
path: root/package/source/zipapi/ZipEnumeration.cxx
diff options
context:
space:
mode:
authorMartin Gallwey <mtg@openoffice.org>2001-04-27 13:56:07 +0000
committerMartin Gallwey <mtg@openoffice.org>2001-04-27 13:56:07 +0000
commitfa2de5099c00fabb952c039269f23f7f3689c586 (patch)
tree0476064e5fcd36451648736e4dcb6fccafd1f062 /package/source/zipapi/ZipEnumeration.cxx
parent7ddd39239c37d8a9b58f4c8fc17ff2b47fe0a20b (diff)
#86409# Support encryption in package files + a couple of optimisations
Diffstat (limited to 'package/source/zipapi/ZipEnumeration.cxx')
-rw-r--r--package/source/zipapi/ZipEnumeration.cxx22
1 files changed, 9 insertions, 13 deletions
diff --git a/package/source/zipapi/ZipEnumeration.cxx b/package/source/zipapi/ZipEnumeration.cxx
index e5c373d4a6c4..dedd320b1d3a 100644
--- a/package/source/zipapi/ZipEnumeration.cxx
+++ b/package/source/zipapi/ZipEnumeration.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ZipEnumeration.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: mtg $ $Date: 2001-04-19 14:13:40 $
+ * last change: $Author: mtg $ $Date: 2001-04-27 14:56:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -61,12 +61,10 @@
#ifndef _ZIP_ENUMERATION_HXX
#include <ZipEnumeration.hxx>
#endif
-#ifndef _COM_SUN_STAR_PACKAGES_ZIPCONSTANTS_HPP_
-#include <com/sun/star/packages/ZipConstants.hpp>
-#endif
using namespace rtl;
using namespace com::sun::star;
+using namespace com::sun::star::packages;
/** Provides an Enumeration over the contents of a Zip file */
@@ -78,17 +76,15 @@ ZipEnumeration::ZipEnumeration( EntryHash & rNewEntryHash)
ZipEnumeration::~ZipEnumeration( void )
{
}
-sal_Bool SAL_CALL ZipEnumeration::hasMoreElements() throw (uno::RuntimeException)
+sal_Bool SAL_CALL ZipEnumeration::hasMoreElements()
{
return (aIterator != rEntryHash.end());
}
-uno::Any SAL_CALL ZipEnumeration::nextElement() throw (uno::RuntimeException)
+const ZipEntry* SAL_CALL ZipEnumeration::nextElement()
{
- uno::Any aAny;
- if (aIterator == rEntryHash.end())
- throw container::NoSuchElementException();
- aAny <<= (*aIterator).second;
- aIterator++;
- return aAny;
+ if (aIterator != rEntryHash.end())
+ return &((*aIterator++).second);
+ else
+ return NULL;
}