mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
62 lines
1.3 KiB
C++
62 lines
1.3 KiB
C++
#ifndef X2T_TESTER_H
|
|
#define X2T_TESTER_H
|
|
|
|
#include <iostream>
|
|
#include <map>
|
|
#include <vector>
|
|
#include <fstream>
|
|
|
|
#include "../../../Common/OfficeFileFormats.h"
|
|
#include "../../../Common/OfficeFileFormatChecker.h"
|
|
|
|
#include "../../../DesktopEditor/graphics/Timer.h"
|
|
#include "../../../DesktopEditor/graphics/TemporaryCS.h"
|
|
#include "../../../DesktopEditor/common/File.h"
|
|
#include "../../../DesktopEditor/common/Directory.h"
|
|
#include "../../../DesktopEditor/xml/include/xmlutils.h"
|
|
#include "../../../DesktopEditor/common/StringBuilder.h"
|
|
#include "../../../DesktopEditor/fontengine/ApplicationFontsWorker.h"
|
|
|
|
#include "../../../OfficeUtils/src/OfficeUtils.h"
|
|
|
|
|
|
class Cx2tTester
|
|
{
|
|
public:
|
|
Cx2tTester(std::wstring configPath);
|
|
~Cx2tTester();
|
|
|
|
void Start();
|
|
|
|
private:
|
|
struct Report
|
|
{
|
|
std::wstring inputFile;
|
|
std::wstring outputFile;
|
|
std::wstring inputExt;
|
|
std::wstring outputExt;
|
|
int exitCode;
|
|
};
|
|
|
|
void setConfig(const std::wstring& configPath);
|
|
void setReportHeader();
|
|
|
|
void writeReport(const Report& report);
|
|
int convert(const std::wstring& inputPath, const std::wstring& outputPath);
|
|
|
|
std::wstring m_reportPath;
|
|
std::wstring m_inputFolder;
|
|
std::wstring m_outputFolder;
|
|
std::wstring m_x2tPath;
|
|
|
|
std::wstring m_xmlParams;
|
|
|
|
std::wofstream m_reportStream;
|
|
|
|
// from 1 to N formats
|
|
std::map<int, std::vector<int>> m_formats;
|
|
|
|
};
|
|
|
|
#endif // X2T_TESTER_H
|