[Libreoffice-commits] core.git: shell/inc shell/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Nov 26 14:54:04 UTC 2020


 shell/inc/zipfile.hxx                  |    8 --------
 shell/source/win32/zipfile/zipfile.cxx |   24 ------------------------
 2 files changed, 32 deletions(-)

New commits:
commit 70b3bdd4028431690f15d95f4d03e5df6f97c1b7
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Nov 26 14:15:30 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Nov 26 15:53:19 2020 +0100

    ZipFile::GetFileLongestFileNameLength is unused
    
    ...since 04366df3bca16d4e0cbe254551e44427ae6338bb "Simple Zip file-format
    implementation to avoid the need of minizip"
    
    Change-Id: I20fd35c1f48912b1744063aadf0b917ca56288d8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106694
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/shell/inc/zipfile.hxx b/shell/inc/zipfile.hxx
index f845368bf78a..6c74cdf0e941 100644
--- a/shell/inc/zipfile.hxx
+++ b/shell/inc/zipfile.hxx
@@ -128,14 +128,6 @@ public:
     */
     bool HasContent(const std::string& ContentName) const;
 
-private:
-    /** Returns the length of the longest file name
-        in the current zip file
-
-        @throws ZipException if a zip error occurs
-    */
-    long GetFileLongestFileNameLength() const;
-
 private:
     StreamInterface* m_pStream;
     bool m_bShouldFree;
diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx
index 78c140dbce2a..19203e631ed5 100644
--- a/shell/source/win32/zipfile/zipfile.cxx
+++ b/shell/source/win32/zipfile/zipfile.cxx
@@ -549,28 +549,4 @@ bool ZipFile::HasContent(const std::string &ContentName) const
     return std::any_of(dir->begin(), dir->end(), internal::stricmp(ContentName));
 }
 
-
-/** Returns the length of the longest file name
-        in the current zip file
-*/
-long ZipFile::GetFileLongestFileNameLength() const
-{
-    long lmax = 0;
-    if (!findCentralDirectoryEnd(m_pStream))
-        return lmax;
-    CentralDirectoryEnd end;
-    if (!readCentralDirectoryEnd(m_pStream, end))
-        return lmax;
-    m_pStream->sseek(end.cdir_offset, SEEK_SET);
-    CentralDirectoryEntry entry;
-    while (m_pStream->stell() != -1 && o3tl::make_unsigned(m_pStream->stell()) < end.cdir_offset + end.cdir_size)
-    {
-        if (!readCentralDirectoryEntry(m_pStream, entry))
-            return lmax;
-        if (entry.filename_size > lmax)
-            lmax = entry.filename_size;
-    }
-    return lmax;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list