ZipFile::GetFileLongestFileNameLength is unused
...since 04366df3bc
"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>
This commit is contained in:
parent
e2af5a1a0a
commit
70b3bdd402
2 changed files with 0 additions and 32 deletions
|
@ -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;
|
||||
|
|
|
@ -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: */
|
||||
|
|
Loading…
Reference in a new issue