mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Refactoring
This commit is contained in:
@ -63,9 +63,7 @@
|
||||
|
||||
#include "../common/ProcessEnv.h"
|
||||
|
||||
#ifdef DOCBUILDER_LICENSING
|
||||
#include "license_gen/src/common/utils.h"
|
||||
#endif
|
||||
#include "docbuilder_addon.h"
|
||||
|
||||
#ifdef CreateFile
|
||||
#undef CreateFile
|
||||
@ -998,15 +996,11 @@ namespace NSDoctRenderer
|
||||
{
|
||||
Init();
|
||||
|
||||
#ifdef DOCBUILDER_LICENSING
|
||||
std::wstring licenseFilePath = m_sX2tPath + L"/sdkjs/license.xml";
|
||||
NSLicenseUtils::LicenseData licenseData = NSLicenseUtils::parseLicenseFile(licenseFilePath);
|
||||
if (!NSLicenseUtils::verify(licenseData))
|
||||
{
|
||||
CV8RealTimeWorker::_LOGGING_ERROR_(L"error (save)", L"license is invalid!");
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
CDocBuilderAddon oSaveAddon(m_sX2tPath);
|
||||
|
||||
int nPreSaveError = oSaveAddon.GetX2tPreSaveError();
|
||||
if (0 != nPreSaveError)
|
||||
return nPreSaveError;
|
||||
|
||||
if (-1 == m_nFileType)
|
||||
{
|
||||
@ -1100,6 +1094,8 @@ namespace NSDoctRenderer
|
||||
if (!sOptions.empty())
|
||||
oBuilder.WriteString(UTF8_TO_U(sOptions));
|
||||
|
||||
oBuilder.WriteString(oSaveAddon.GetX2tSaveAddon());
|
||||
|
||||
oBuilder.WriteString(L"</TaskQueueDataConvert>");
|
||||
|
||||
std::wstring sXmlConvert = oBuilder.GetData();
|
||||
|
||||
Reference in New Issue
Block a user