Files
Yajbir Singh f1b860b25c
Some checks failed
check / markdownlint (push) Has been cancelled
check / spellchecker (push) Has been cancelled
updated
2025-12-11 19:03:17 +05:30

49 lines
1.3 KiB
C++

#ifndef HWPFILE_H
#define HWPFILE_H
#include "HwpFileHeader.h"
#include "OLEdoc/CompoundFile.h"
#include "HWPElements/HWPRecordBinData.h"
#include "HWPSection.h"
namespace HWP
{
class CHWPFile
{
HWP_STRING m_sFileName;
CCompoundFile m_oOleFile;
CHwpFileHeader m_oFileHeader;
int m_nVersion;
CHWPDocInfo m_oDocInfo;
VECTOR<CHWPSection*> m_arBodyTexts;
VECTOR<CHWPSection*> m_arViewTexts;
public:
CHWPFile(const HWP_STRING& sFileName);
~CHWPFile();
VECTOR<const CHWPSection*> GetSections();
const CCompoundFile* GetOleFile() const;
bool Detect();
bool Open();
void Close();
bool GetFileHeader();
const CHWPDocInfo* GetDocInfo() const;
bool GetDocInfo(int nVersion);
bool GetComponent(const HWP_STRING& sEntryName, CHWPStream& oBuffer);
bool GetChildStream(const HWP_STRING& sEntryName, ECompressed eCompressed, CHWPStream& oBuffer);
private:
CDirectoryEntry* FindChildEntry(const HWP_STRING& sBasePath, const CDirectoryEntry& oBaseEntry, const HWP_STRING& sEntryName) const;
HWP_STRING SaveChildEntry(const HWP_STRING& sRootPath, const HWP_STRING& sEntryName, ECompressed eCompressed);
bool Unzip(CHWPStream& oInput, CHWPStream& oBuffer);
bool Decrypt(CHWPStream& oInput, CHWPStream& oBuffer);
bool GetBodyText(int nVersion);
bool GetViewText(int nVersion);
};
}
#endif // HWPFILE_H