mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
Fixed bugs in reading hwp format and added test example
This commit is contained in:
28
HwpFile/HWPFile.cpp
Normal file
28
HwpFile/HWPFile.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
#include "HWPFile.h"
|
||||
|
||||
#include "HwpDoc/HWPFile_Private.h"
|
||||
#include "../DesktopEditor/common/File.h"
|
||||
|
||||
CHWPFile::CHWPFile(const std::wstring& wsFileName)
|
||||
: m_pInternal(new HWP::CHWPFile_Private(wsFileName))
|
||||
{}
|
||||
|
||||
CHWPFile::~CHWPFile()
|
||||
{
|
||||
if (nullptr != m_pInternal)
|
||||
delete m_pInternal;
|
||||
}
|
||||
|
||||
bool CHWPFile::Open()
|
||||
{
|
||||
if (nullptr == m_pInternal)
|
||||
return false;
|
||||
|
||||
return m_pInternal->Open();
|
||||
}
|
||||
|
||||
void CHWPFile::Close()
|
||||
{
|
||||
if (nullptr != m_pInternal)
|
||||
m_pInternal->Close();
|
||||
}
|
||||
Reference in New Issue
Block a user