[Libreoffice-commits] core.git: package/inc package/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 21 10:20:57 UTC 2021
package/inc/ZipFile.hxx | 2 +-
package/source/zipapi/ZipFile.cxx | 4 ++--
package/source/zippackage/ZipPackage.cxx | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 0c3da17e4190f9fd7038d1d52a92e0748396c1d8
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Jul 21 10:07:30 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Jul 21 12:20:23 2021 +0200
pass ZipEnumeration around by value
Change-Id: I8418bd3eb6a8013f55f4283c7d96755d95a60c1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119305
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx
index 01a7b562edcc..abfb6674ae18 100644
--- a/package/inc/ZipFile.hxx
+++ b/package/inc/ZipFile.hxx
@@ -165,7 +165,7 @@ public:
const OUString& aMediaType,
const rtl::Reference<comphelper::RefCountedMutex>& aMutexHolder );
- std::unique_ptr<ZipEnumeration> entries();
+ ZipEnumeration entries();
};
#endif
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index e0c07537b749..02c2253182b0 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -660,9 +660,9 @@ uno::Reference< XInputStream > ZipFile::createStreamForZipEntry(
return xBufStream;
}
-std::unique_ptr<ZipEnumeration> ZipFile::entries()
+ZipEnumeration ZipFile::entries()
{
- return std::make_unique<ZipEnumeration>(aEntries);
+ return aEntries;
}
uno::Reference< XInputStream > ZipFile::getInputStream( ZipEntry& rEntry,
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 0bf1b331fd5f..2e4e9c2b2c21 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -519,16 +519,16 @@ void ZipPackage::parseContentType()
void ZipPackage::getZipFileContents()
{
- std::unique_ptr<ZipEnumeration> xEnum = m_pZipFile->entries();
+ ZipEnumeration aEnum = m_pZipFile->entries();
OUString sTemp, sDirName;
sal_Int32 nOldIndex, nStreamIndex;
FolderHash::iterator aIter;
- while (xEnum->hasMoreElements())
+ while (aEnum.hasMoreElements())
{
nOldIndex = 0;
ZipPackageFolder* pCurrent = m_xRootFolder.get();
- const ZipEntry & rEntry = *xEnum->nextElement();
+ const ZipEntry & rEntry = *aEnum.nextElement();
OUString rName = rEntry.sPath;
if ( m_bForceRecovery )
More information about the Libreoffice-commits
mailing list