mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
phrasal content
This commit is contained in:
@ -10,13 +10,14 @@
|
||||
#include "../../DesktopEditor/common/SystemUtils.h"
|
||||
#include "../../DesktopEditor/common/StringBuilder.h"
|
||||
#include "../../DesktopEditor/xml/include/xmlutils.h"
|
||||
#include "../../OfficeUtils/src/OfficeUtils.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
CHtmlFile2 oFile;
|
||||
|
||||
// Файл, который открываем
|
||||
std::wstring sFile = NSFile::GetProcessDirectory() + L"/../../../examples/test4.xhtml";
|
||||
std::wstring sFile = NSFile::GetProcessDirectory() + L"/../../../examples/test2.xhtml";
|
||||
|
||||
// Директория, где будем создавать xhtml
|
||||
std::wstring sOutputDirectory = NSFile::GetProcessDirectory() + L"/res";
|
||||
@ -27,7 +28,11 @@ int main()
|
||||
|
||||
HRESULT nResConvert = oFile.Open(sFile, sOutputDirectory);
|
||||
if(nResConvert == S_OK)
|
||||
{
|
||||
std::cout << "Success" << std::endl;
|
||||
COfficeUtils oZip;
|
||||
oZip.CompressFileOrDirectory(sOutputDirectory, sOutputDirectory + L"/" + NSFile::GetFileName(sFile) + L".docx");
|
||||
}
|
||||
else
|
||||
std::cout << "Failure" << std::endl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user