diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-11-26 14:15:30 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-11-26 15:53:19 +0100 |
commit | 70b3bdd4028431690f15d95f4d03e5df6f97c1b7 (patch) | |
tree | c07788f8be9559babd09612b3f7fedaeb5ebcdc4 /shell | |
parent | e2af5a1a0aa05884dc93775f0a5864dbb9a94f81 (diff) |
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@redhat.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/inc/zipfile.hxx | 8 | ||||
-rw-r--r-- | shell/source/win32/zipfile/zipfile.cxx | 24 |
2 files changed, 0 insertions, 32 deletions
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 @@ -129,14 +129,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: */ |