mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-19 03:33:06 +08:00
The writing code for converting hwp format and fixed bugs
This commit is contained in:
@ -3,6 +3,8 @@
|
||||
#include "HwpDoc/HWPFile_Private.h"
|
||||
#include "../DesktopEditor/common/File.h"
|
||||
|
||||
#include "HwpDoc/Conversion/Converter2OOXML.h"
|
||||
|
||||
CHWPFile::CHWPFile(const std::wstring& wsFileName)
|
||||
: m_pInternal(new HWP::CHWPFile_Private(wsFileName))
|
||||
{}
|
||||
@ -13,6 +15,11 @@ CHWPFile::~CHWPFile()
|
||||
delete m_pInternal;
|
||||
}
|
||||
|
||||
void CHWPFile::SetTempDirectory(const std::wstring& wsTempDirectory)
|
||||
{
|
||||
m_wsTempDirectory = wsTempDirectory;
|
||||
}
|
||||
|
||||
bool CHWPFile::Open()
|
||||
{
|
||||
if (nullptr == m_pInternal)
|
||||
@ -26,3 +33,13 @@ void CHWPFile::Close()
|
||||
if (nullptr != m_pInternal)
|
||||
m_pInternal->Close();
|
||||
}
|
||||
|
||||
bool CHWPFile::ConvertToOOXML(const std::wstring& wsFilePath)
|
||||
{
|
||||
HWP::CConverter2OOXML oConverter;
|
||||
|
||||
oConverter.SetHWPFile(m_pInternal);
|
||||
oConverter.SetTempDirectory(m_wsTempDirectory);
|
||||
|
||||
return oConverter.ConvertTo(wsFilePath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user