Compare commits

..

19 Commits

Author SHA1 Message Date
e4e6acd1bc [android][x2t] added doctrenderer file stub 2018-09-27 15:03:47 +03:00
7418b2327a Merge remote-tracking branch 'origin/develop' into develop 2018-09-27 14:10:28 +03:00
18d610e3e0 [android][x2t] added example of converter 2018-09-27 14:09:12 +03:00
4e81420eed [ios][x2t] fixed build 2018-09-26 16:18:50 +03:00
e26f836da7 Merge commit '69d2b12f5315e96442fc5a0620d4f4c2070c4e77' into develop 2018-09-24 18:34:51 +03:00
69d2b12f53 . 2018-09-24 17:48:02 +03:00
f2260748c8 . 2018-09-24 17:48:02 +03:00
b59f84b262 . 2018-09-24 17:48:02 +03:00
3e5fed8482 x2t - fix return codes 2018-09-24 17:48:02 +03:00
538e477818 Revert "[test] Define AVS_ERROR_FIRST as 0 to avoid issues with assignment and comparison uint64, int64, int32"
This reverts commit 05694d13f3.
2018-09-24 13:19:18 +03:00
b212e878c6 Merge pull request #114 from ONLYOFFICE/release/v5.2.0
Release/v5.2.0
2018-09-24 01:13:01 +03:00
05694d13f3 [test] Define AVS_ERROR_FIRST as 0 to avoid issues with assignment and comparison uint64, int64, int32 2018-09-24 01:04:14 +03:00
1dd72c99a2 Remove define GetCharWidth 2018-09-21 16:43:39 +02:00
4b73e58693 [bug] Fix missing function name 2018-09-21 17:36:32 +03:00
bee4f57dd3 [bug] Fix opening encrypted odf files 2018-09-21 17:36:32 +03:00
dd40e3e53c Merge pull request #111 from ONLYOFFICE/feature/ComboFonts
Fix bug with squares in combobox fonts (& empty rects)
2018-09-21 14:54:43 +03:00
d657ece017 Fix bug with squares in combobox fonts (& empty rects) 2018-09-21 14:36:14 +03:00
b21b1b8aaf [bug] Fix missing function name 2018-09-21 13:02:23 +03:00
09fb980060 [bug] Fix opening encrypted odf files 2018-09-21 12:01:01 +03:00
132 changed files with 8514 additions and 2516 deletions

View File

@ -61,7 +61,7 @@ namespace DocFileFormat
namespace DocFileFormat
{
long Converter::Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress)
_UINT32 Converter::Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress)
{
if (!doc || !docx) return S_FALSE;
@ -202,20 +202,18 @@ namespace DocFileFormat
return S_OK;
}
long Converter::LoadAndConvert(const std::wstring& strSrcFile, const std::wstring& strDstDirectory, const std::wstring& password, const ProgressCallback* progress, bool &bMacros)
_UINT32 Converter::LoadAndConvert(const std::wstring& strSrcFile, const std::wstring& strDstDirectory, const std::wstring& password, const ProgressCallback* progress, bool &bMacros)
{
long result = S_FALSE;
WordDocument doc(progress, m_sTempFolder);
WordprocessingDocument docx(strDstDirectory, &doc);
result = doc.LoadDocument(strSrcFile, password);
_UINT32 result = doc.LoadDocument(strSrcFile, password);
if (result == S_OK)
if (result == 0)
{
result = Convert(&doc, &docx, progress);
if (result == S_OK)
if (result == 0)
{
docx.SaveDocument(bMacros);

View File

@ -32,6 +32,7 @@
#pragma once
#include <string>
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
struct ProgressCallback;
@ -48,9 +49,9 @@ namespace DocFileFormat
std::wstring m_sTempFolder;
long LoadAndConvert(const std::wstring & strSrcFile, const std::wstring & strDstDirectory, const std::wstring & password, const ProgressCallback* progress, bool &bMacros);
_UINT32 LoadAndConvert(const std::wstring & strSrcFile, const std::wstring & strDstDirectory, const std::wstring & password, const ProgressCallback* progress, bool &bMacros);
private:
long Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress);
_UINT32 Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress);
};
}

View File

@ -117,7 +117,7 @@ namespace DocFileFormat
namespace DocFileFormat
{
int WordDocument::LoadDocument(const std::wstring & fileName, const std::wstring & password)
_UINT32 WordDocument::LoadDocument(const std::wstring & fileName, const std::wstring & password)
{
m_sFileName = fileName;
m_sPassword = password;

View File

@ -94,7 +94,7 @@ namespace DocFileFormat
WordDocument (const ProgressCallback* pCallFunc, const std::wstring & tempFolder );
virtual ~WordDocument();
int LoadDocument(const std::wstring & fileName, const std::wstring & password);
_UINT32 LoadDocument(const std::wstring & fileName, const std::wstring & password);
int nWordVersion;
int nDocumentCodePage;

View File

@ -34,9 +34,9 @@
#include "../DocDocxConverter/Converter.h"
#include "../../OfficeUtils/src/OfficeUtils.h"
HRESULT COfficeDocFile::LoadFromFile(const std::wstring & docFile, const std::wstring & docxDirectory, const std::wstring & password, bool &bMacros, ProgressCallback *ffCallBack)
_UINT32 COfficeDocFile::LoadFromFile(const std::wstring & docFile, const std::wstring & docxDirectory, const std::wstring & password, bool &bMacros, ProgressCallback *ffCallBack)
{
HRESULT hr = S_FALSE;
_UINT32 hr = 0;
DocFileFormat::Converter docToDocx;
docToDocx.m_sTempFolder = m_sTempFolder;
@ -46,7 +46,7 @@ HRESULT COfficeDocFile::LoadFromFile(const std::wstring & docFile, const std::w
return hr;
}
HRESULT COfficeDocFile::SaveToFile (const std::wstring & sDstFileName, const std::wstring & sSrcFileName, ProgressCallback *ffCallBack )
_UINT32 COfficeDocFile::SaveToFile (const std::wstring & sDstFileName, const std::wstring & sSrcFileName, ProgressCallback *ffCallBack )
{
return S_OK;
return 0;
}

View File

@ -53,8 +53,8 @@ public:
std::wstring m_sTempFolder;
HRESULT LoadFromFile(const std::wstring & sSrcFileName, const std::wstring & sDstFileName, const std::wstring & password, bool &bMacros, ProgressCallback *ffCallBack = NULL);
HRESULT SaveToFile(const std::wstring & sDstFileName, const std::wstring & sSrcFileName, ProgressCallback *ffCallBack = NULL);
_UINT32 LoadFromFile(const std::wstring & sSrcFileName, const std::wstring & sDstFileName, const std::wstring & password, bool &bMacros, ProgressCallback *ffCallBack = NULL);
_UINT32 SaveToFile(const std::wstring & sDstFileName, const std::wstring & sSrcFileName, ProgressCallback *ffCallBack = NULL);
};

View File

@ -85,7 +85,7 @@ namespace BinXlsxRW{
sMediaPath = pathMediaDir.GetPath();
sEmbedPath = pathEmbedDir.GetPath();
}
int CXlsxSerializer::loadFromFile(const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions, const std::wstring& sMediaDir, const std::wstring& sEmbedDir)
_UINT32 CXlsxSerializer::loadFromFile(const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions, const std::wstring& sMediaDir, const std::wstring& sEmbedDir)
{
std::wstring strFileInDir = NSSystemPath::GetDirectoryName(sSrcFileName);
@ -100,7 +100,7 @@ namespace BinXlsxRW{
BinXlsxRW::BinaryFileReader oBinaryFileReader;
return oBinaryFileReader.ReadFile(sSrcFileName, sDstPath, &oDrawingConverter, sXMLOptions);
}
int CXlsxSerializer::saveToFile(const std::wstring& sDstFileName, const std::wstring& sSrcPath, const std::wstring& sXMLOptions)
_UINT32 CXlsxSerializer::saveToFile(const std::wstring& sDstFileName, const std::wstring& sSrcPath, const std::wstring& sXMLOptions)
{
COfficeFontPicker* pFontPicker = new COfficeFontPicker();
pFontPicker->Init(m_sFontDir);
@ -136,7 +136,7 @@ namespace BinXlsxRW{
oOfficeDrawingConverter.SetFontPicker(pFontPicker);
BinXlsxRW::BinaryFileWriter oBinaryFileWriter(fp);
int result = oBinaryFileWriter.Open(sSrcPath, sDstFileName, pEmbeddedFontsManager, &oOfficeDrawingConverter, sXMLOptions, m_bIsNoBase64);
_UINT32 result = oBinaryFileWriter.Open(sSrcPath, sDstFileName, pEmbeddedFontsManager, &oOfficeDrawingConverter, sXMLOptions, m_bIsNoBase64);
RELEASEOBJECT(pFontPicker);
return result;

View File

@ -33,6 +33,7 @@
#define XLSX_SERIALIZER
#include <string>
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
namespace OOX
{
@ -62,8 +63,8 @@ namespace BinXlsxRW {
static void CreateXlsxFolders (const std::wstring& sXmlOptions, const std::wstring& sDstPath, std::wstring& sMediaPath, std::wstring& sEmbedPath);
int loadFromFile (const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions, const std::wstring& sMediaDir, const std::wstring& sEmbedPath);
int saveToFile (const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions);
_UINT32 loadFromFile (const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions, const std::wstring& sMediaDir, const std::wstring& sEmbedPath);
_UINT32 saveToFile (const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions);
bool saveChart (NSBinPptxRW::CBinaryFileReader* pReader, long lLength, const std::wstring& sFilename, const long& lChartNumber);

View File

@ -43,7 +43,7 @@
#include "../include/odf/odf_document.h"
int ConvertOds2Xlsx(cpdoccore::odf_reader::odf_document & inputOdf, const std::wstring & dstPath, const std::wstring & fontsPath)
_UINT32 ConvertOds2Xlsx(cpdoccore::odf_reader::odf_document & inputOdf, const std::wstring & dstPath, const std::wstring & fontsPath)
{
cpdoccore::oox::package::xlsx_document outputXlsx;
cpdoccore::oox::xlsx_conversion_context conversionContext( &inputOdf);
@ -56,7 +56,7 @@ int ConvertOds2Xlsx(cpdoccore::odf_reader::odf_document & inputOdf, const std::w
outputXlsx.write(dstPath);
return 0;
}
int ConvertOdt2Docx(cpdoccore::odf_reader::odf_document & inputOdf, const std::wstring & dstPath, const std::wstring & fontsPath)
_UINT32 ConvertOdt2Docx(cpdoccore::odf_reader::odf_document & inputOdf, const std::wstring & dstPath, const std::wstring & fontsPath)
{
cpdoccore::oox::package::docx_document outputDocx;
cpdoccore::oox::docx_conversion_context conversionContext(&inputOdf);
@ -70,7 +70,7 @@ int ConvertOdt2Docx(cpdoccore::odf_reader::odf_document & inputOdf, const std::w
return 0;
}
int ConvertOdp2Pptx(cpdoccore::odf_reader::odf_document & inputOdf, const std::wstring & dstPath, const std::wstring & fontsPath)
_UINT32 ConvertOdp2Pptx(cpdoccore::odf_reader::odf_document & inputOdf, const std::wstring & dstPath, const std::wstring & fontsPath)
{
cpdoccore::oox::package::pptx_document outputPptx;
cpdoccore::oox::pptx_conversion_context conversionContext(&inputOdf);
@ -83,9 +83,9 @@ int ConvertOdp2Pptx(cpdoccore::odf_reader::odf_document & inputOdf, const std::w
return 0;
}
int ConvertODF2OOXml(const std::wstring & srcPath, const std::wstring & dstPath, const std::wstring & fontsPath, const std::wstring & tempPath, const std::wstring & password, const ProgressCallback* CallBack)
_UINT32 ConvertODF2OOXml(const std::wstring & srcPath, const std::wstring & dstPath, const std::wstring & fontsPath, const std::wstring & tempPath, const std::wstring & password, const ProgressCallback* CallBack)
{
int nResult = 0;
_UINT32 nResult = 0;
try
{
@ -134,9 +134,9 @@ int ConvertODF2OOXml(const std::wstring & srcPath, const std::wstring & dstPath,
}
int ConvertOTF2ODF(const std::wstring & srcPath)
_UINT32 ConvertOTF2ODF(const std::wstring & srcPath)
{
int nResult = 0;
_UINT32 nResult = 0;
std::wstring manifest_xml = srcPath + FILE_SEPARATOR_STR + L"META-INF" + FILE_SEPARATOR_STR + L"manifest.xml";
std::wstring mimetype_xml = srcPath + FILE_SEPARATOR_STR + L"mimetype";

View File

@ -31,10 +31,11 @@
*/
#include "../../DesktopEditor/common/Types.h"
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
#include <string>
struct ProgressCallback;
int ConvertODF2OOXml(const std::wstring & srcPath, const std::wstring & dstPath, const std::wstring & fontsPath, const std::wstring & tempPath, const std::wstring & password, const ProgressCallback* CallBack);
_UINT32 ConvertODF2OOXml(const std::wstring & srcPath, const std::wstring & dstPath, const std::wstring & fontsPath, const std::wstring & tempPath, const std::wstring & password, const ProgressCallback* CallBack);
int ConvertOTF2ODF(const std::wstring & otfPath);
_UINT32 ConvertOTF2ODF(const std::wstring & otfPath);

View File

@ -52,7 +52,7 @@ COfficePPTFile::~COfficePPTFile()
CloseFile();
}
long COfficePPTFile::OpenFile(const std::wstring & sFileName, const std::wstring & password, bool &bMacros)
_UINT32 COfficePPTFile::OpenFile(const std::wstring & sFileName, const std::wstring & password, bool &bMacros)
{
CloseFile();
@ -103,14 +103,14 @@ bool COfficePPTFile::CloseFile()
return S_OK;
}
HRESULT COfficePPTFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring password, bool &bMacros)
_UINT32 COfficePPTFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring password, bool &bMacros)
{
if (m_strTempDirectory.empty())
{
m_strTempDirectory = NSDirectory::GetTempPath();
}
long nResult = OpenFile(sSrcFileName, password, bMacros);
_UINT32 nResult = OpenFile(sSrcFileName, password, bMacros);
if (nResult != S_OK)
{
CloseFile();

View File

@ -66,9 +66,9 @@ public:
return m_strTempDirectory;
}
HRESULT LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring password, bool &bMacros);
_UINT32 LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring password, bool &bMacros);
long OpenFile(const std::wstring & fileName, const std::wstring & password, bool &bMacros);
_UINT32 OpenFile(const std::wstring & fileName, const std::wstring & password, bool &bMacros);
bool CloseFile();
private:

View File

@ -74,9 +74,9 @@ public:
~CPPTXFile();
HRESULT LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring sXMLOptions);
_UINT32 LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring sXMLOptions);
HRESULT SaveToFile(std::wstring sDstFileName, std::wstring sSrcPath, std::wstring sXMLOptions);
_UINT32 SaveToFile(std::wstring sDstFileName, std::wstring sSrcPath, std::wstring sXMLOptions);
HRESULT get_TempDirectory(std::wstring* pVal);
HRESULT put_TempDirectory(std::wstring newVal);
@ -96,8 +96,9 @@ public:
HRESULT SetThemesDir (std::wstring bsDir);
HRESULT SetUseSystemFonts (bool useSystemFonts);
void SetIsNoBase64 (bool bIsNoBase64);
HRESULT OpenFileToPPTY (std::wstring bsInput, std::wstring bsOutput);
HRESULT OpenDirectoryToPPTY (std::wstring bsInput, std::wstring bsOutput);
HRESULT ConvertPPTYToPPTX (std::wstring bsInput, std::wstring bsOutput, std::wstring bsThemesFolder);
_UINT32 OpenFileToPPTY (std::wstring bsInput, std::wstring bsOutput);
_UINT32 OpenDirectoryToPPTY (std::wstring bsInput, std::wstring bsOutput);
_UINT32 ConvertPPTYToPPTX (std::wstring bsInput, std::wstring bsOutput, std::wstring bsThemesFolder);
};
#endif //ASC_OFFICE_PPTX_FILE

View File

@ -47,6 +47,7 @@
#include "Editor/PPTXWriter.h"
#include "PPTXFormat/PPTXEvent.h"
#include "../Common/OfficeFileErrorDescription.h"
CPPTXFile::CPPTXFile(extract_to_directory fCallbackExtract, compress_from_directory fCallbackCompress, progress_operation fCallbackProgress, void* pCallbackArg)
{
@ -82,20 +83,20 @@ CPPTXFile::~CPPTXFile()
{
RELEASEOBJECT(m_pPptxDocument);
}
HRESULT CPPTXFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring sXMLOptions)
_UINT32 CPPTXFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring sXMLOptions)
{
std::wstring localTempDir(sDstPath);
if(!localTempDir.empty())
{
bool res = NSDirectory::CreateDirectory(localTempDir);
if (res == false) return S_FALSE;
if (res == false) return AVS_FILEUTILS_ERROR_CONVERT;
put_TempDirectory(sDstPath);
}
else
{
bool res = NSDirectory::CreateDirectory(m_strTempDir);
if (res == false) return S_FALSE;
if (res == false) return AVS_FILEUTILS_ERROR_CONVERT;
}
localTempDir = m_strTempDir;
@ -103,7 +104,7 @@ HRESULT CPPTXFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath
if (m_pCallbackArg)
{
if(!m_fCallbackExtract(m_pCallbackArg, srcFileName , localTempDir))
return S_FALSE;
return AVS_FILEUTILS_ERROR_CONVERT;
}
else
{
@ -116,19 +117,19 @@ HRESULT CPPTXFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath
if(!m_pPptxDocument->isValid(localTempDir))
{
RELEASEOBJECT(m_pPptxDocument);
return S_FALSE;
return AVS_FILEUTILS_ERROR_CONVERT;
}
m_pPptxDocument->read(localTempDir, (PPTX::IPPTXEvent*)this);
if(GetPercent() < 1000000)
{
RELEASEOBJECT(m_pPptxDocument);
return S_FALSE;
return AVS_FILEUTILS_ERROR_CONVERT;
}
smart_ptr<PPTX::Presentation> presentation = m_pPptxDocument->Get(OOX::Presentation::FileTypes::Presentation).smart_dynamic_cast<PPTX::Presentation>();
if (!presentation.is_init())
{
NSDirectory::DeleteDirectory(m_strTempDir, false);
return S_FALSE;
return AVS_FILEUTILS_ERROR_CONVERT;
}
m_strDirectory = sSrcFileName;
@ -136,12 +137,12 @@ HRESULT CPPTXFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath
if (-1 != nIndex)
m_strDirectory = m_strDirectory.substr(0, nIndex);
return S_OK;
return 0;
}
HRESULT CPPTXFile::SaveToFile(std::wstring sDstFileName, std::wstring sSrcPath, std::wstring sXMLOptions)
_UINT32 CPPTXFile::SaveToFile(std::wstring sDstFileName, std::wstring sSrcPath, std::wstring sXMLOptions)
{
if (NULL == m_pPptxDocument)
return S_FALSE;
return AVS_FILEUTILS_ERROR_CONVERT;
OOX::CPath oPath;
oPath.m_strFilename = std::wstring(sSrcPath);
@ -149,7 +150,7 @@ HRESULT CPPTXFile::SaveToFile(std::wstring sDstFileName, std::wstring sSrcPath,
std::wstring srcFilePath = sSrcPath;
std::wstring dstFileName = sDstFileName;
return m_fCallbackCompress ? (m_fCallbackCompress(m_pCallbackArg, srcFilePath, dstFileName) ? S_OK : S_FALSE) : S_OK;
return m_fCallbackCompress ? (m_fCallbackCompress(m_pCallbackArg, srcFilePath, dstFileName) ? 0 : AVS_FILEUTILS_ERROR_CONVERT) : 0;
}
HRESULT CPPTXFile::get_TempDirectory(std::wstring* pVal)
{
@ -237,7 +238,7 @@ void CPPTXFile::SetIsNoBase64(bool bIsNoBase64)
{
m_bIsNoBase64 = bIsNoBase64;
}
HRESULT CPPTXFile::OpenFileToPPTY(std::wstring bsInput, std::wstring bsOutput)
_UINT32 CPPTXFile::OpenFileToPPTY(std::wstring bsInput, std::wstring bsOutput)
{
if (m_strTempDir.empty())
{
@ -268,14 +269,14 @@ HRESULT CPPTXFile::OpenFileToPPTY(std::wstring bsInput, std::wstring bsOutput)
}
std::wstring bsLocalInputTemp= pathLocalInputTemp.GetPath();
HRESULT hr = OpenDirectoryToPPTY(bsLocalInputTemp, bsOutput);
_UINT32 hr = OpenDirectoryToPPTY(bsLocalInputTemp, bsOutput);
if (notDeleteInput == false)
NSDirectory::DeleteDirectory(pathLocalInputTemp.GetPath());
return hr;
}
HRESULT CPPTXFile::OpenDirectoryToPPTY(std::wstring bsInput, std::wstring bsOutput)
_UINT32 CPPTXFile::OpenDirectoryToPPTY(std::wstring bsInput, std::wstring bsOutput)
{
OOX::CPath pathInputDirectory = bsInput;
@ -285,20 +286,20 @@ HRESULT CPPTXFile::OpenDirectoryToPPTY(std::wstring bsInput, std::wstring bsOutp
if (!m_pPptxDocument->isValid(pathInputDirectory.GetPath())) // true ???
{
RELEASEOBJECT(m_pPptxDocument);
return S_FALSE;
return AVS_FILEUTILS_ERROR_CONVERT;
}
m_pPptxDocument->read(pathInputDirectory.GetPath() + FILE_SEPARATOR_STR, (PPTX::IPPTXEvent*)this);
if(GetPercent() < 1000000)
{
RELEASEOBJECT(m_pPptxDocument);
return S_FALSE;
return AVS_FILEUTILS_ERROR_CONVERT;
}
smart_ptr<PPTX::Presentation> presentation = m_pPptxDocument->Get(OOX::Presentation::FileTypes::Presentation).smart_dynamic_cast<PPTX::Presentation>();
if (!presentation.is_init())
{
NSDirectory::DeleteDirectory(m_strTempDir, false);
return S_FALSE;
return AVS_FILEUTILS_ERROR_CONVERT;
}
m_strDirectory = pathInputDirectory.GetDirectory();
@ -335,7 +336,7 @@ HRESULT CPPTXFile::OpenDirectoryToPPTY(std::wstring bsInput, std::wstring bsOutp
return S_OK;
}
HRESULT CPPTXFile::ConvertPPTYToPPTX(std::wstring bsInput, std::wstring bsOutput, std::wstring bsThemesFolder)//bsOutput и файл и директория может быть
_UINT32 CPPTXFile::ConvertPPTYToPPTX(std::wstring bsInput, std::wstring bsOutput, std::wstring bsThemesFolder)//bsOutput и файл и директория может быть
{
OOX::CPath pathLocalTempDirectory;
@ -368,14 +369,15 @@ HRESULT CPPTXFile::ConvertPPTYToPPTX(std::wstring bsInput, std::wstring bsOutput
oWriter.OpenPPTY(pSrcBuffer, lFileSize, srcFolder, bsThemesFolder);
RELEASEARRAYOBJECTS(pSrcBuffer);
HRESULT hRes = S_OK;
_UINT32 hRes = 0;
if (m_fCallbackCompress)
{
std::wstring strOutput = bsOutput;
std::wstring strInput = pathLocalTempDirectory.GetPath();
hRes = m_fCallbackCompress(m_pCallbackArg, strInput, strOutput) ? S_OK : S_FALSE;
hRes = m_fCallbackCompress(m_pCallbackArg, strInput, strOutput) ? 0 : AVS_FILEUTILS_ERROR_CONVERT;
NSDirectory::DeleteDirectory(strInput);
}

View File

@ -717,7 +717,7 @@ namespace NSBinPptxRW
void CBinaryFileWriter::WriteUSHORT(const _UINT16& lValue)
{
CheckBufferSize(UINT16_SIZEOF);
#ifdef _IOS
#if defined(_IOS) || defined(__ANDROID__)
memcpy(m_pStreamCur, &lValue, sizeof(_UINT16));
#else
*((_UINT16*)m_pStreamCur) = lValue; // EXC_ARM_DA_ALIGN on ios
@ -728,7 +728,7 @@ namespace NSBinPptxRW
void CBinaryFileWriter::WriteULONG(const _UINT32& lValue)
{
CheckBufferSize(UINT32_SIZEOF);
#ifdef _IOS
#if defined(_IOS) || defined(__ANDROID__)
memcpy(m_pStreamCur, &lValue, sizeof(_UINT32));
#else
*((_UINT32*)m_pStreamCur) = lValue; // EXC_ARM_DA_ALIGN on ios
@ -739,7 +739,7 @@ namespace NSBinPptxRW
void CBinaryFileWriter::WriteLONG(const _INT32& lValue)
{
CheckBufferSize(INT32_SIZEOF);
#ifdef _IOS
#if defined(_IOS) || defined(__ANDROID__)
memcpy(m_pStreamCur, &lValue, sizeof(_INT32));
#else
*((_INT32*)m_pStreamCur) = lValue; // EXC_ARM_DA_ALIGN on ios
@ -750,7 +750,7 @@ namespace NSBinPptxRW
void CBinaryFileWriter::WriteLONG64(const _INT64& lValue)
{
CheckBufferSize(INT64_SIZEOF);
#ifdef _IOS
#if defined(_IOS) || defined(__ANDROID__)
memcpy(m_pStreamCur, &lValue, sizeof(_INT64));
#else
*((_INT64*)m_pStreamCur) = lValue; // EXC_ARM_DA_ALIGN on ios
@ -761,7 +761,7 @@ namespace NSBinPptxRW
void CBinaryFileWriter::WriteINT(const _INT32& lValue)
{
CheckBufferSize(INT32_SIZEOF);
#ifdef _IOS
#if defined(_IOS) || defined(__ANDROID__)
memcpy(m_pStreamCur, &lValue, sizeof(_INT32));
#else
*((_INT32*)m_pStreamCur) = lValue; // EXC_ARM_DA_ALIGN on ios
@ -794,7 +794,7 @@ namespace NSBinPptxRW
void CBinaryFileWriter::WriteDoubleReal(const double& dValue)
{
CheckBufferSize(DOUBLE_SIZEOF);
#ifdef _IOS
#if defined(_IOS) || defined(__ANDROID__)
memcpy(m_pStreamCur, &dValue, sizeof(double));
#else
*((double*)m_pStreamCur) = dValue; // EXC_ARM_DA_ALIGN on ios
@ -815,7 +815,7 @@ namespace NSBinPptxRW
_UINT32 lSizeMem = lSize * sizeof(char);
CheckBufferSize(UINT32_SIZEOF + lSizeMem);
#ifdef _IOS
#if defined(_IOS) || defined(__ANDROID__)
memcpy(m_pStreamCur, &lSizeMem, sizeof(_UINT32));
#else
*((_UINT32*)m_pStreamCur) = lSizeMem; // EXC_ARM_DA_ALIGN on ios
@ -926,7 +926,7 @@ namespace NSBinPptxRW
{
*pData = (BYTE)m_arMainTables[i].Type;
++pData;
#ifdef _IOS
#if defined(_IOS) || defined(__ANDROID__)
memcpy(pData, &m_arMainTables[i].SeekPos, sizeof(_INT32));
#else
*((_INT32*)pData) = m_arMainTables[i].SeekPos; // EXC_ARM_DA_ALIGN on ios
@ -1661,7 +1661,7 @@ namespace NSBinPptxRW
{
if (m_lPos + 1 >= m_lSize)
return 0;
#ifdef _IOS
#if defined(_IOS) || defined(__ANDROID__)
_UINT16 res = 0;
memcpy(&res, m_pDataCur, sizeof(_UINT16));
#else
@ -1677,7 +1677,7 @@ namespace NSBinPptxRW
{
if (m_lPos + 3 >= m_lSize)
return 0;
#ifdef _IOS
#if defined(_IOS) || defined(__ANDROID__)
_UINT32 res = 0;
memcpy(&res, m_pDataCur, sizeof(_UINT32));
#else
@ -1691,7 +1691,7 @@ namespace NSBinPptxRW
{
if (m_lPos + 7 >= m_lSize)
return 0;
#ifdef _IOS
#if defined(_IOS) || defined(__ANDROID__)
_INT64 res = 0;
memcpy(&res, m_pDataCur, sizeof(_INT64));
#else
@ -1717,7 +1717,7 @@ namespace NSBinPptxRW
{
if (m_lPos + (int)DOUBLE_SIZEOF > m_lSize)
return 0;
#ifdef _IOS
#if defined(_IOS) || defined(__ANDROID__)
double res = 0.0;
memcpy(&res, m_pDataCur, sizeof(double));
#else

View File

@ -39,6 +39,8 @@
#include "Writer/OOXWriter.h"
#include "Reader/OOXReader.h"
#include "../../../Common/OfficeFileErrorDescription.h"
const double g_cdMaxReadRtfPercent = 0.70;
const double g_cdMaxWriteRtfPercent = 0.30;
const double g_cdMaxReadOoxPercent = 0.70;
@ -50,7 +52,7 @@ const double g_cdMaxWriteOoxPercent = 0.30;
#pragma comment(lib, "Gdi32.lib")
#endif
HRESULT RtfConvertationManager::ConvertRtfToOOX( std::wstring sSrcFileName, std::wstring sDstPath )
_UINT32 RtfConvertationManager::ConvertRtfToOOX( std::wstring sSrcFileName, std::wstring sDstPath )
{
m_bParseFirstItem = true;
@ -91,11 +93,11 @@ HRESULT RtfConvertationManager::ConvertRtfToOOX( std::wstring sSrcFileName, std:
NSDirectory::DeleteDirectory(oWriter.m_sTempFolder);
if( true == succes )
return S_OK;
return 0;
else
return S_FALSE;
return AVS_FILEUTILS_ERROR_CONVERT;
}
HRESULT RtfConvertationManager::ConvertOOXToRtf( std::wstring sDstFileName, std::wstring sSrcPath )
_UINT32 RtfConvertationManager::ConvertOOXToRtf( std::wstring sDstFileName, std::wstring sSrcPath )
{
m_bParseFirstItem = true;
@ -127,8 +129,8 @@ HRESULT RtfConvertationManager::ConvertOOXToRtf( std::wstring sDstFileName, std:
NSDirectory::DeleteDirectory(oReader.m_sTempFolder);
NSDirectory::DeleteDirectory(oWriter.m_sTempFolder);
if( true == succes) return S_OK;
return S_FALSE;
if( true == succes) return 0;
return AVS_FILEUTILS_ERROR_CONVERT;
}
void RtfConvertationManager::OnCompleteItemRtf()
{

View File

@ -32,6 +32,7 @@
#pragma once
#include <string>
#include "../../../Common/DocxFormat/Source/Base/Types_32.h"
class OOXWriter;
class OOXReader;
@ -54,9 +55,9 @@ public:
m_poRtfReader = NULL;
}
long ConvertRtfToOOX( std::wstring sSrcFileName, std::wstring sDstPath);
_UINT32 ConvertRtfToOOX( std::wstring sSrcFileName, std::wstring sDstPath);
long ConvertOOXToRtf( std::wstring sDstFileName, std::wstring sSrcPath);
_UINT32 ConvertOOXToRtf( std::wstring sDstFileName, std::wstring sSrcPath);
void OnCompleteItemRtf();
void OnCompleteItemOOX();

View File

@ -43,7 +43,7 @@
#include "../../../Common/DocxFormat/Source/DocxFormat/App.h"
#include "../../../Common/DocxFormat/Source/DocxFormat/Core.h"
#include "../../../DesktopEditor/common/SystemUtils.h"
#include "../../../Common/OfficeFileErrorDescription.h"
namespace NSBinPptxRW
{
class CDrawingConverter;
@ -106,10 +106,10 @@ static int ParseTxtOptions(const std::wstring & sXmlOptions)
}
HRESULT CTxtXmlFile::txt_LoadFromFile(const std::wstring & sSrcFileName, const std::wstring & sDstPath, const std::wstring & sXMLOptions)
_UINT32 CTxtXmlFile::txt_LoadFromFile(const std::wstring & sSrcFileName, const std::wstring & sDstPath, const std::wstring & sXMLOptions)
{
Writers::FileWriter *pDocxWriter = new Writers::FileWriter(sDstPath, L"", true, 1, false, NULL, L"");
if (pDocxWriter == NULL) return S_FALSE;
if (pDocxWriter == NULL) return AVS_FILEUTILS_ERROR_CONVERT;
CreateDocxEmpty(sDstPath, pDocxWriter);
@ -127,7 +127,7 @@ HRESULT CTxtXmlFile::txt_LoadFromFile(const std::wstring & sSrcFileName, const s
}
catch(...)
{
return S_FALSE;
return AVS_FILEUTILS_ERROR_CONVERT;
}
pDocxWriter->m_oDocumentWriter.Write(); //overwrite document.xml
@ -135,11 +135,11 @@ HRESULT CTxtXmlFile::txt_LoadFromFile(const std::wstring & sSrcFileName, const s
delete pDocxWriter;
pDocxWriter = NULL;
return S_OK;
return 0;
}
HRESULT CTxtXmlFile::txt_SaveToFile(const std::wstring & sDstFileName, const std::wstring & sSrcPath, const std::wstring & sXMLOptions)
_UINT32 CTxtXmlFile::txt_SaveToFile(const std::wstring & sDstFileName, const std::wstring & sSrcPath, const std::wstring & sXMLOptions)
{
try
{
@ -170,10 +170,10 @@ HRESULT CTxtXmlFile::txt_SaveToFile(const std::wstring & sDstFileName, const std
}
catch(...)
{
return S_FALSE;
return AVS_FILEUTILS_ERROR_CONVERT;
}
return S_OK;
return 0;
}

View File

@ -51,8 +51,8 @@ class CTxtXmlFile : public TxtXml::ITxtXmlEvent
public:
virtual bool Progress(long ID, long Percent);
HRESULT txt_LoadFromFile(const std::wstring & sSrcFileName, const std::wstring & sDstPath, const std::wstring & sXMLOptions);
HRESULT txt_SaveToFile (const std::wstring & sDstFileName, const std::wstring & sSrcPath, const std::wstring & sXMLOptions);
_UINT32 txt_LoadFromFile(const std::wstring & sSrcFileName, const std::wstring & sDstPath, const std::wstring & sXMLOptions);
_UINT32 txt_SaveToFile (const std::wstring & sDstFileName, const std::wstring & sSrcPath, const std::wstring & sXMLOptions);
CTxtXmlFile();

View File

@ -36,7 +36,7 @@
#include "../../../Common/OfficeFileErrorDescription.h"
long ConvertXls2Xlsx(const std::wstring & srcFile, const std::wstring & dstPath, const std::wstring & password, const std::wstring & fontsPath, const std::wstring & tempPath, const ProgressCallback* pCallBack, bool &bMacros)
_UINT32 ConvertXls2Xlsx(const std::wstring & srcFile, const std::wstring & dstPath, const std::wstring & password, const std::wstring & fontsPath, const std::wstring & tempPath, const ProgressCallback* pCallBack, bool &bMacros)
{
XlsConverter converter(srcFile, dstPath, password, fontsPath, tempPath, pCallBack, bMacros);

View File

@ -30,7 +30,8 @@
*
*/
#include <string>
#include "../../../Common/DocxFormat/Source/Base/Types_32.h"
struct ProgressCallback;
long ConvertXls2Xlsx(const std::wstring & srcFile, const std::wstring & dstPath, const std::wstring & password, const std::wstring& fontsPath, const std::wstring & tempPath, const ProgressCallback* CallBack, bool & bMacros);
_UINT32 ConvertXls2Xlsx(const std::wstring & srcFile, const std::wstring & dstPath, const std::wstring & password, const std::wstring& fontsPath, const std::wstring & tempPath, const ProgressCallback* CallBack, bool & bMacros);

View File

@ -708,7 +708,7 @@ NAMESPACE_END
// ***************** Miscellaneous ********************
// Nearly all Intel's and AMD's have SSE. Enable it independent of SSE ASM and intrinscs
#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64) && !defined(CRYPTOPP_DISABLE_ASM) && !defined(_IOS)
#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64) && !defined(CRYPTOPP_DISABLE_ASM) && !(defined(_IOS) || defined(__ANDROID__))
#define CRYPTOPP_BOOL_ALIGN16 1
#else
#define CRYPTOPP_BOOL_ALIGN16 0

View File

@ -29,6 +29,11 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#ifdef __ANDROID__
#include <gcvt.h>
#endif
#include "CommonInclude.h"
#include "Common.h"

View File

@ -34,9 +34,9 @@
#include "../DesktopEditor/common/File.h"
#include "../OfficeUtils/src/OfficeUtils.h"
#if defined FILE_FORMAT_CHECKER_WITH_MACRO
#include "../ASCOfficePPTFile/PPTFormatLib/PPTFormatLib.h"
#endif
//#if defined FILE_FORMAT_CHECKER_WITH_MACRO
// #include "../ASCOfficePPTFile/PPTFormatLib/PPTFormatLib.h"
//#endif
#include "3dParty/pole/pole.h"
#include <algorithm>
@ -362,17 +362,17 @@ bool COfficeFileFormatChecker::isOfficeFile(const std::wstring & _fileName)
}
else if ( isPptFormatFile(&storage) )
{
#if defined FILE_FORMAT_CHECKER_WITH_MACRO
COfficePPTFile pptFile;
bMacroEnabled = true;
long nResult = pptFile.OpenFile(fileName, L"", bMacroEnabled);
if (nResult != S_OK)
{
return false;
}
pptFile.CloseFile();
#endif
//#if defined FILE_FORMAT_CHECKER_WITH_MACRO
// COfficePPTFile pptFile;
//
// bMacroEnabled = true;
// long nResult = pptFile.OpenFile(fileName, L"", bMacroEnabled);
// if (nResult != S_OK)
// {
// return false;
// }
// pptFile.CloseFile();
//#endif
nFileType = AVS_OFFICESTUDIO_FILE_PRESENTATION_PPT;
return true;
}

View File

@ -10,6 +10,10 @@
* Copyright 1997-2007 by Dave Coffin, dcoffin a cybercom o net
*/
#ifdef __ANDROID__
#include <swab.h>
#endif
#include "ximaraw.h"
#include "../../common/File.h"

View File

@ -0,0 +1,60 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "doctrenderer.h"
#include "docbuilder.h"
#ifdef BOOL
#undef BOOL
#endif
#include <iostream>
namespace NSDoctRenderer
{
CDoctrenderer::CDoctrenderer(const std::wstring& sAllFontsPath) {}
CDoctrenderer::~CDoctrenderer() {}
bool CDoctrenderer::Execute(const std::wstring& strXml, std::wstring& strError)
{
return false;
}
std::vector<std::wstring> CDoctrenderer::GetImagesInChanges()
{
std::vector<std::wstring> stub;
return stub;
}
void CDocBuilder::Dispose() {}
}

View File

@ -35,6 +35,10 @@
#include "../common/Types.h"
#include "../common/File.h"
#ifdef GetCharWidth
#undef GetCharWidth
#endif
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif

View File

@ -29,6 +29,11 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#ifdef __ANDROID__
#include <pthread_setcanceltype.h>
#endif
#include "./BaseThread.h"
#if defined(_WIN32) || defined(_WIN64) ||defined(_WIN32_WCE)

View File

@ -1,6 +1,6 @@
#ifndef X2T_VERSION_H
#define X2T_VERSION_H
#define X2T_VERSION "2.4.545.0"
#define X2T_VERSION "2.4.547.0"
#endif

File diff suppressed because it is too large Load Diff

View File

@ -40,6 +40,7 @@
#endif
#include <string>
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
namespace NExtractTools
{
@ -48,160 +49,160 @@ class InputParamsMailMerge;
}
namespace NExtractTools
{
int docx2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int docx_dir2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int docx2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int doct_bin2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
int doct_bin2docx_dir (const std::wstring &sFrom, const std::wstring &sToResult, const std::wstring &sTo, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
int doct2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
_UINT32 docx2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 docx_dir2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 docx2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 doct_bin2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
_UINT32 doct_bin2docx_dir (const std::wstring &sFrom, const std::wstring &sToResult, const std::wstring &sTo, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
_UINT32 doct2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
int dotm2docm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int dotm2docm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int dotx2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int dotx2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int docm2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int docm2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int dotm2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int dotm2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 dotm2docm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 dotm2docm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 dotx2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 dotx2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 docm2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 docm2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 dotm2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 dotm2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int xlsx2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xlsx_dir2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params, bool bXmlOptions, const std::wstring &sXlsxFile);
int xlsx2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xlst_bin2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
int xlst_bin2xlsx_dir (const std::wstring &sFrom, const std::wstring &sToResult, const std::wstring &sTo, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
int xlst2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
_UINT32 xlsx2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 xlsx_dir2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params, bool bXmlOptions, const std::wstring &sXlsxFile);
_UINT32 xlsx2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 xlst_bin2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
_UINT32 xlst_bin2xlsx_dir (const std::wstring &sFrom, const std::wstring &sToResult, const std::wstring &sTo, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
_UINT32 xlst2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
int xltx2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xltx2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int xltm2xlsm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xltm2xlsm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int xlsm2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xlsm2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int xltm2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xltm2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 xltx2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 xltx2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 xltm2xlsm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 xltm2xlsm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 xlsm2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 xlsm2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 xltm2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 xltm2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int pptx2pptt_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int pptx_dir2pptt_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int pptx2pptt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int pptt_bin2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
int pptt_bin2pptx_dir (const std::wstring &sFrom, const std::wstring &sToResult, const std::wstring &sTo, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
int pptt2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
_UINT32 pptx2pptt_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 pptx_dir2pptt_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 pptx2pptt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 pptt_bin2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
_UINT32 pptt_bin2pptx_dir (const std::wstring &sFrom, const std::wstring &sToResult, const std::wstring &sTo, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
_UINT32 pptt2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
int csv2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int csv2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int csv2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int xlst2csv (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xlsx2csv (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xlst_bin2csv (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 csv2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 csv2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 csv2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 xlst2csv (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 xlsx2csv (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 xlst_bin2csv (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int bin2pdf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bPaid, const std::wstring &sThemeDir, InputParams& params);
_UINT32 bin2pdf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bPaid, const std::wstring &sThemeDir, InputParams& params);
int ppsx2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int ppsx2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int potx2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int potx2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int ppsm2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int ppsm2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int potm2pptm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int potm2pptm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int ppsm2pptm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int ppsm2pptm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int pptm2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int pptm2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int potm2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int potm2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 ppsx2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 ppsx2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 potx2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 potx2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 ppsm2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 ppsm2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 potm2pptm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 potm2pptm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 ppsm2pptm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 ppsm2pptm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 pptm2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 pptm2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
_UINT32 potm2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 potm2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
int ppt2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int ppt2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int ppt2pptt_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int ppt2pptt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int ppt2pptm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int ppt2pptm_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 ppt2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 ppt2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 ppt2pptt_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 ppt2pptt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 ppt2pptm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 ppt2pptm_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int rtf2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int rtf2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int rtf2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int rtf2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int docx2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int docx_dir2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int doct2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
int doct_bin2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
_UINT32 rtf2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 rtf2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 rtf2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 rtf2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 docx2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 docx_dir2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 doct2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
_UINT32 doct_bin2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
int doc2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int doc2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int doc2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int doc2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int docx_dir2doc (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int doc2docm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int doc2docm_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 doc2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 doc2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 doc2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 doc2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 docx_dir2doc (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 doc2docm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 doc2docm_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xls2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xls2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xls2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xls2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xls2xlsm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int xls2xlsm_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 xls2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 xls2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 xls2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 xls2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 xls2xlsm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 xls2xlsm_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int txt2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int txt2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int txt2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int txt2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int docx_dir2txt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 txt2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 txt2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 txt2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 txt2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
_UINT32 docx_dir2txt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
int odf2oox (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int odf2oox_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int odf2oot (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int odf2oot_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 odf2oox (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 odf2oox_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 odf2oot (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 odf2oot_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int odf_flat2oox (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int odf_flat2oox_dir(const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int odf_flat2oot (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int odf_flat2oot_bin(const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 odf_flat2oox (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 odf_flat2oox_dir(const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 odf_flat2oot (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 odf_flat2oot_bin(const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int docx2odt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int docx_dir2odt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int xlsx2ods (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int xlsx_dir2ods (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int pptx2odp (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int pptx_dir2odp (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 docx2odt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 docx_dir2odt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 xlsx2ods (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 xlsx_dir2ods (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 pptx2odp (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 pptx_dir2odp (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int fromMscrypt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int mscrypt2oox (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int mscrypt2oot (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int mscrypt2oot_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 fromMscrypt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 mscrypt2oox (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 mscrypt2oot (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 mscrypt2oot_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int oox2mscrypt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 oox2mscrypt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int html2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int html2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
int html2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 html2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 html2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
_UINT32 html2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
//-------------------------------------------------------------------------------------------------------------------------------------------------
int dir2zip (const std::wstring &sFrom, const std::wstring &sTo);
int zip2dir (const std::wstring &sFrom, const std::wstring &sTo);
_UINT32 dir2zip (const std::wstring &sFrom, const std::wstring &sTo);
_UINT32 zip2dir (const std::wstring &sFrom, const std::wstring &sTo);
int convertmailmerge (const InputParamsMailMerge& oMailMergeSend,const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bPaid, const std::wstring &sThemeDir, InputParams& params);
_UINT32 convertmailmerge (const InputParamsMailMerge& oMailMergeSend,const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bPaid, const std::wstring &sThemeDir, InputParams& params);
int fromDocxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
int fromDoctBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
int fromDocument (const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTemp, InputParams& params);
_UINT32 fromDocxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
_UINT32 fromDoctBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
_UINT32 fromDocument (const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTemp, InputParams& params);
int fromXlsxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params, const std::wstring &sXlsxFile);
int fromXlstBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
int fromSpreadsheet (const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTemp, InputParams& params);
_UINT32 fromXlsxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params, const std::wstring &sXlsxFile);
_UINT32 fromXlstBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
_UINT32 fromSpreadsheet (const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTemp, InputParams& params);
int fromPptxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
int fromPpttBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
int fromPresentation(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTemp, InputParams& params);
_UINT32 fromPptxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
_UINT32 fromPpttBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
_UINT32 fromPresentation(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTemp, InputParams& params);
int fromT(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
int fromCrossPlatform(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
int fromCanvasPdf(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
_UINT32 fromT(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
_UINT32 fromCrossPlatform(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
_UINT32 fromCanvasPdf(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
int fromInputParams(InputParams& oInputParams);
int detectMacroInFile(InputParams& oInputParams);
_UINT32 fromInputParams(InputParams& oInputParams);
_UINT32 detectMacroInFile(InputParams& oInputParams);
X2T_DECL_EXPORT int FromFile(const std::wstring& file);
X2T_DECL_EXPORT int FromXml(const std::wstring& xml);
X2T_DECL_EXPORT _UINT32 FromFile(const std::wstring& file);
X2T_DECL_EXPORT _UINT32 FromXml(const std::wstring& xml);
}
#endif // ASCCONVERTERS_H

File diff suppressed because it is too large Load Diff

View File

@ -403,7 +403,7 @@ namespace NExtractTools
}
std::sort (aChangesFiles.begin(), aChangesFiles.end(), compare_string_by_length);
for(int i = 0; i < aChangesFiles.size(); ++i)
for(size_t i = 0; i < aChangesFiles.size(); ++i)
{
oBuilder.WriteString(_T("<Change>"));
oBuilder.WriteEncodeXmlString(aChangesFiles[i]);
@ -419,7 +419,7 @@ namespace NExtractTools
oBuilder.WriteString(_T("</Settings>"));
return oBuilder.GetData();
}
int apply_changes(const std::wstring &sBinFrom, const std::wstring &sToResult, NSDoctRenderer::DoctRendererFormat::FormatFile eType, const std::wstring &sThemeDir, std::wstring &sBinTo, const InputParams& params)
_UINT32 apply_changes(const std::wstring &sBinFrom, const std::wstring &sToResult, NSDoctRenderer::DoctRendererFormat::FormatFile eType, const std::wstring &sThemeDir, std::wstring &sBinTo, const InputParams& params)
{
std::wstring sBinDir = NSDirectory::GetFolderPath(sBinFrom);
std::wstring sChangesDir = sBinDir + FILE_SEPARATOR_STR + _T("changes");
@ -464,7 +464,7 @@ namespace NExtractTools
{
std::vector<std::wstring> aImages = oDoctRenderer.GetImagesInChanges();
//todo сделать interface у COfficeUtils, чтобы можно было делать архив из файлов в разных папках.
for(int i = 0; i < aImages.size(); ++i)
for(size_t i = 0; i < aImages.size(); ++i)
{
std::wstring sImageName = aImages[i];
std::wstring sImage = sImagesDirectory + FILE_SEPARATOR_STR + sImageName;

View File

@ -677,7 +677,7 @@ namespace NExtractTools
oLimit.uncompressed = std::stoul(oZipNode.GetAttribute(L"uncompressed", L"0"));
oLimit.pattern = oZipNode.GetAttribute(L"template", L"");
}
for (int j = 0; j < aTypes.size(); ++j)
for (size_t j = 0; j < aTypes.size(); ++j)
{
m_mapInputLimits[COfficeFileFormatChecker::GetFormatByExtension(L"." + aTypes[j])] = oLimit;
}
@ -999,7 +999,7 @@ namespace NExtractTools
}
return str;
}
static int getReturnErrorCode(int nDefine)
static int getReturnErrorCode(_UINT32 nDefine)
{
return 0 == nDefine ? 0 : nDefine - AVS_ERROR_FIRST - AVS_FILEUTILS_ERROR_FIRST;
}
@ -1170,7 +1170,7 @@ namespace NExtractTools
std::wstring getDoctXml(NSDoctRenderer::DoctRendererFormat::FormatFile eFromType, NSDoctRenderer::DoctRendererFormat::FormatFile eToType,
const std::wstring& sTFileDir, const std::wstring& sPdfBinFile, const std::wstring& sImagesDirectory,
const std::wstring& sThemeDir, int nTopIndex, const std::wstring& sMailMerge, const InputParams& params);
int apply_changes(const std::wstring &sBinFrom, const std::wstring &sToResult, NSDoctRenderer::DoctRendererFormat::FormatFile eType, const std::wstring &sThemeDir, std::wstring &sBinTo, const InputParams& params);
_UINT32 apply_changes(const std::wstring &sBinFrom, const std::wstring &sToResult, NSDoctRenderer::DoctRendererFormat::FormatFile eType, const std::wstring &sThemeDir, std::wstring &sBinTo, const InputParams& params);
#endif
}
#endif // CEXTRACTTOOLS_H

View File

@ -116,7 +116,7 @@ static std::wstring utf8_to_unicode(const char *src)
if (argc >= 3) sArg2 = std::wstring(argv [2]);
#endif
int result = 0;
_UINT32 result = 0;
std::wstring sXmlExt = _T(".xml");
if((sArg1.length() > 3) && (sXmlExt == sArg1.substr(sArg1.length() - sXmlExt.length(), sXmlExt.length())))
{

View File

@ -0,0 +1,18 @@
*.iml
gradlew
gradlew.bat
keystore-release.properties
/local.properties
/.idea/workspace.xml
/.idea/libraries
/build
/captures
/gradle
/extra-builds/native/libs
/extra-builds/native/toolchain
/extra-builds/native/src/iconv
.gradle
.idea
.DS_Store
.externalNativeBuild

View File

@ -0,0 +1,3 @@
# README #
New android Documents app...

View File

@ -0,0 +1,46 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
/*
-Xms1024m
-Xmx4096m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=512m
-XX:+UseConcMarkSweepGC
-XX:+UseCompressedOops
-XX:-HeapDumpOnOutOfMemoryError
-XX:SoftRefLRUPolicyMSPerMB=50
*/
buildscript {
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://jitpack.io' }
mavenCentral()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:3.2.0'
classpath 'io.fabric.tools:gradle:1.25.1'
classpath 'de.undercouch:gradle-download-task:3.4.3'
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url 'https://maven.google.com' }
maven { url 'https://maven.fabric.io/public' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

View File

@ -0,0 +1 @@
/build

View File

@ -0,0 +1,892 @@
apply plugin: 'com.android.library'
apply plugin: 'de.undercouch.download'
apply from: "$rootProject.projectDir/extra-builds/gradle/common.gradle"
/*
* Help:
* https://developer.android.com/ndk/guides/cmake
* https://developer.android.com/ndk/guides/standalone_toolchain
* */
// Common native libs path
def TOOLCHAIN_VERSION = 4.9
def HOST_PLATFORM = "linux-x86_64"
def PATH_NDK = getBackSlash(android.ndkDirectory.path)
def PATH_TOOLCHAIN = "$PATH_NDK/toolchains/\$1/prebuilt/$HOST_PLATFORM/bin"
def PATH_STANDALONE_SCRIPT = "$PATH_NDK/build/tools"
def PATH_3PARTY = "$project.ext.SRC_CORE/Common/3dParty"
// Keys for constant
def MASK_LIB = 'lib*.*'
// OpenSsl
def OPENSSL_SRC = "$PATH_3PARTY/openssl/openssl"
def OPENSSL_LIBS_PATH = "$project.ext.PATH_TO_NATIVE_LIBS/openssl"
def OPENSSL_LIBS_INSTALL = "$OPENSSL_LIBS_PATH/install"
// Curl
def CURL_SRC = "$PATH_3PARTY/curl/curl"
def CURL_LIBS_PATH = "$project.ext.PATH_TO_NATIVE_LIBS/curl"
def CURL_LIBS_INSTALL = "$CURL_LIBS_PATH/install"
// Iconv
def ICONV_NAME = "libiconv-1.15"
def ICONV_NAME_GZ = ICONV_NAME + ".tar.gz"
def ICONV_URL = "https://ftp.gnu.org/pub/gnu/libiconv/$ICONV_NAME_GZ"
def ICONV_SRC = "$project.ext.PATH_TO_NATIVE_SRC/iconv"
def ICONV_SRC_UNPACK = "$ICONV_SRC/$ICONV_NAME"
def ICONV_SRC_GZ = "$ICONV_SRC/$ICONV_NAME_GZ"
def ICONV_LIBS_PATH = "$project.ext.PATH_TO_NATIVE_LIBS/iconv"
def ICONV_LIBS_INSTALL = "$ICONV_LIBS_PATH/install"
// Icu
def ICU_SRC = "$PATH_3PARTY/icu/" + getDirName("$PATH_3PARTY/icu")
def ICU_BUILD = "$ICU_SRC/build"
def ICU_SRC_ROOT = "$ICU_SRC/icu/source"
def ICU_LIBS_PATH = "$project.ext.PATH_TO_NATIVE_LIBS/icu"
def ICU_LIBS_INSTALL = "$ICU_LIBS_PATH/install"
// Boost
def BOOST_VERSION = "1.58.0"
def BOOST_CONFIG = "$project.ext.PATH_TO_NATIVE_SRC/boost/configs"
def BOOST_SRC = "$PATH_3PARTY/boost/boost_" + BOOST_VERSION.replace(".", "_")
def BOOST_LIBS_PATH = "$project.ext.PATH_TO_NATIVE_LIBS/boost"
def BOOST_LIBS_INSTALL = "$BOOST_LIBS_PATH/install"
android {
buildToolsVersion '27.0.3'
compileSdkVersion 28
defaultConfig {
minSdkVersion project.ext.SDK_MIN
targetSdkVersion 28
versionCode 1
versionName "1.0"
// Constants for java
buildConfigField "String", "LIB_CORE", "\"$project.ext.LIB_CORE\""
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang',
'-DANDROID_STL=c++_static',
'-DANDROID_ARM_NEON=TRUE',
// Custom arguments for cmake
'-DARG_SRC_CORE=' + project.ext.SRC_CORE,
'-DARG_LIB_CORE=' + project.ext.LIB_CORE,
'-DARG_LIBS=' + project.ext.PATH_TO_NATIVE_LIBS
cppFlags '-std=c++14',
'-fexceptions',
'-frtti'
}
}
ndk {
abiFilters project.ext.ABI_ARM, project.ext.ABI_x86
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
jniDebuggable true
}
}
externalNativeBuild {
cmake {
path 'src/main/cpp/CMakeLists.txt'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "com.android.support:appcompat-v7:$project.ext.SUPPORT"
}
/*
* Common NDK values
* */
def getValues() {
return [
'armeabi-v7a' : [
'ABI' : 'armeabi-v7a',
'TCN' : 'arm',
'TCP' : 'arm-linux-androideabi-',
'ARCH' : 'arm-linux-androideabi',
'WAPATH' : 'armv7-a/'
]
,
'x86' : [
'ABI' : 'x86',
'TCN' : 'x86',
'TCP' : 'x86-',
'ARCH' : 'i686-linux-android',
'WAPATH' : ''
]
// ,
// 'arm64-v8a' : [
// 'ABI' : 'arm64-v8a',
// 'TCN' : 'arm64',
// 'TCP' : 'aarch64-linux-android-',
// 'ARCH' : 'aarch64-linux-android'
// ]
// ,
// 'x86_64' : [
// 'ABI' : 'x86_64',
// 'TCN' : 'x86_64',
// 'TCP' : 'x86_64-',
// 'ARCH' : 'x86_64-linux-android'
// ]
]
}
/*
* Get from: <NDK_PATH>/build/core/toolchains/<ARCHs>
* */
def getFlagsForArch(String abi, boolean isDebug) {
// Common flags
def FLAGS_ARM_DEBUG = isDebug? "-O0 -UNDEBUG" : "-O2 -DNDEBUG"
def FLAGS_INCLUDE_BASE = "$FLAGS_ARM_DEBUG -g -Os -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes"
def FLAGS_LINK_BASE = "-no-canonical-prefixes"
// Specific flags
def FLAGS = null
switch (abi) {
case 'armeabi-v7a':
def CFLAGS = "$FLAGS_INCLUDE_BASE -marm -fpic -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -Wl,--fix-cortex-a8"
FLAGS = [
INCLUDE_CFLAGS : "$CFLAGS",
INCLUDE_CPPFLAGS : "$CFLAGS -fexceptions -frtti",
LINK : "$FLAGS_LINK_BASE -Wl,--fix-cortex-a8"
]
break;
case 'x86':
def CFLAGS = "$FLAGS_INCLUDE_BASE -mtune=intel -mssse3 -mfpmath=sse"
FLAGS = [
INCLUDE_CFLAGS : "$CFLAGS",
INCLUDE_CPPFLAGS : "$CFLAGS -fexceptions -frtti",
LINK : "$FLAGS_LINK_BASE"
]
break;
default:
throw new GradleScriptException('Unknown abi for flags...')
}
println "\nFlags for $abi:"
println " $FLAGS.INCLUDE_CFLAGS"
println " $FLAGS.INCLUDE_CPPFLAGS"
println " $FLAGS.LINK\n"
return FLAGS
}
/*
* Create standalone build path with set enviroment
* */
def createStandalone(String standaloneDir, String standaloneDest, String sdkMin, String abi, boolean isClang, boolean isDebug) {
def values = getValues()
println "\nStandalone dir script path: $standaloneDir"
println "Standalone dir destination path: $standaloneDest"
println "Sdk min version: $sdkMin"
println "Abi: $abi"
println "Arch: ${values[abi].ARCH}"
println "Is debug: $isDebug\n"
def resultCode = exec {
println "\nCreate standalone script..."
workingDir standaloneDir
commandLine "./make-standalone-toolchain.sh", \
"--install-dir=$standaloneDest", \
"--arch=${values[abi].TCN}", \
"--platform=android-$sdkMin", \
"--stl=libc++", \
"--force"
}
println "Standalone script result code: $resultCode"
def PATH = null
if (resultCode.exitValue == 0) {
def FLAGS = getFlagsForArch(abi, isDebug)
def BIN = "$standaloneDest/bin"
def SYSROOT = "$standaloneDest/sysroot"
def CC = isClang? 'clang' : 'gcc'
def CXX = isClang? 'clang++' : 'g++'
def AS = isClang? 'clang' : 'as'
def CFLAGS = "--sysroot=$SYSROOT" +
" -D__ANDROID_API__=$sdkMin" +
" -I$SYSROOT/usr/include" +
" -I$SYSROOT/usr/include/${values[abi].ARCH}" +
" -I$standaloneDest/include/python2.7"
def LDFLAGS = "--sysroot=$SYSROOT" +
" $FLAGS.LINK" +
" -L$SYSROOT/usr/lib" +
" -L$standaloneDest/lib" +
" -L$standaloneDest/lib64"
def LDLIBS = "$standaloneDest/${values[abi].ARCH}/lib/${values[abi].WAPATH}libstdc++.a"
PATH = [
PATH : getPathEnv(BIN),
ROOT : standaloneDest,
BIN : BIN,
CC : "${values[abi].ARCH}-$CC",
CXX : "${values[abi].ARCH}-$CXX",
CPP : "${values[abi].ARCH}-cpp",
LD : "${values[abi].ARCH}-ld",
AS : "${values[abi].ARCH}-$AS",
AR : "${values[abi].ARCH}-ar",
RANLIB : "${values[abi].ARCH}-ranlib",
STRIP : "${values[abi].ARCH}-strip",
SYSROOT : SYSROOT,
CPPFLAGS : "$CFLAGS $FLAGS.INCLUDE_CPPFLAGS",
LDFLAGS : "$LDFLAGS",
LDLIBS : "$LDLIBS"
]
println "\nStandalone created SUCCESS!"
PATH.each { key, value ->
println " $key: $value"
}
}
return PATH
}
/*
* Packing all compiled includes/libraries
* */
task packingLibs(type: Tar) {
doFirst { println "\nPacking libraries..." }
eachFile { println it.file }
archiveName project.ext.LIBS_PACK_NAME
compression Compression.GZIP
destinationDir file(project.ext.PATH_TO_NATIVE_BUILDS)
from (files(project.ext.PATH_TO_NATIVE_BUILDS))
include "libs/**"
}
/*
* Unpacking all compiled includes/libraries
* */
task unpackingLibs(type: Copy) {
if (!isFolderNotEmpty(project.ext.PATH_TO_NATIVE_LIBS)) {
doFirst { println "\nUnpacking libraries..." }
eachFile { println it.file }
from tarTree(resources.gzip("$project.ext.PATH_TO_NATIVE_ARCHS"))
into project.ext.PATH_TO_NATIVE_BUILDS
} else {
println "Folder already exist: $project.ext.PATH_TO_NATIVE_LIBS"
}
}
/*
* https://wiki.openssl.org/index.php/Android
* Success for: OpenSSL 1.1.1-pre10-dev
* This task works only for Unix
* OpenSsl build work with NDK_PATH not standalone path!
* */
task buildOpenSsl() {
if (isUnix()) {
doLast {
println ""
println "------------------------- OpenSSL -------------------------"
println "Min SDK version: $project.ext.SDK_MIN"
println "Path to OpenSsl src: $OPENSSL_SRC"
println "Path to OpenSsl output libs: $OPENSSL_LIBS_PATH"
println "Path to Android NDK: $PATH_NDK"
if (file(OPENSSL_SRC).exists()) {
// Create folders
mkdir OPENSSL_LIBS_PATH
mkdir OPENSSL_LIBS_INSTALL
// Build for all platforms
getValues().each { abi, value ->
println "\nStart build for OpenSSL:"
println "ABI: " + value.ABI
println "ARCH: " + value.ARCH
println "TCHAIN NAME: " + value.TCN
// Pathways for libraries
def PATH = getPathEnv(PATH_TOOLCHAIN.replace("\$1", value.TCP + TOOLCHAIN_VERSION))
def INCLUDE_PATH = "$OPENSSL_LIBS_PATH/" + value.ABI + "/include"
def LIB_PATH = "$OPENSSL_LIBS_PATH/" + value.ABI + "/lib"
println "PATH: $PATH"
println "INCLUDE_PATH: $INCLUDE_PATH"
println "LIB_PATH: $LIB_PATH"
// TODO add more checks
if (!file(INCLUDE_PATH).exists() || !file(LIB_PATH).exists()) {
// Exec config for each arch
exec {
println "\nExec Configure..."
workingDir OPENSSL_SRC
environment "ANDROID_NDK", PATH_NDK
environment "PATH", PATH
commandLine "./Configure", "--prefix=$OPENSSL_LIBS_INSTALL", "--openssldir=$OPENSSL_LIBS_INSTALL", \
"android-" + value.TCN, "-D__ANDROID_API__=$project.ext.SDK_MIN", \
"no-shared", "no-ssl2", "no-ssl3", "no-comp", "no-hw", "no-engine"
}
// Clean build files
exec {
println "\nExec make clean..."
workingDir OPENSSL_SRC
commandLine "make", "clean"
}
// Build libraries
exec {
println "\nExec make..."
workingDir OPENSSL_SRC
environment "ANDROID_NDK", PATH_NDK
environment "PATH", PATH
commandLine "make", "-j4"
}
// Install libraries
exec {
println "\nExec make install_sw..."
workingDir OPENSSL_SRC
environment "PATH", PATH
commandLine "make", "install_sw"
}
// Copy include directory
copy {
println "\nCopy openssl include..."
eachFile { println it.file }
from OPENSSL_LIBS_INSTALL + "/include"
into INCLUDE_PATH
}
// Copy libraries
copy {
println "\nCopy openssl libraries..."
eachFile { println it.file }
from OPENSSL_LIBS_INSTALL + "/lib"
include MASK_LIB
into LIB_PATH
}
}
}
} else {
println "OpenSsl source path doesn't exist..."
}
}
}
}
/*
* https://curl.haxx.se/docs/install.html
* http://www.matteomattei.com/how-to-cross-compile-curl-library-with-ssl-and-zlib-support/
* https://habr.com/post/184960/
* This task works only for Unix
* */
task buildCurl() {
if (isUnix()) {
doLast {
println ""
println "------------------------- cURL -------------------------"
println "Min SDK version: $project.ext.SDK_MIN"
println "Path to Curl src: $CURL_SRC"
println "Path to Curl output libs: $CURL_LIBS_PATH"
println "Path to Android NDK: $PATH_NDK"
if (file(CURL_SRC).exists()) {
// Create folders
mkdir CURL_LIBS_PATH
mkdir CURL_LIBS_INSTALL
// Build for all platforms
getValues().each { abi, value ->
println "\nStart build for cURL:"
println "ABI: " + value.ABI
println "ARCH: " + value.ARCH
println "TCHAIN NAME: " + value.TCN
// Pathways for libraries
def INCLUDE_PATH = CURL_LIBS_PATH + "/" + value.ABI + "/include"
def LIB_PATH = CURL_LIBS_PATH + "/" + value.ABI + "/lib"
println "INCLUDE_PATH: $INCLUDE_PATH"
println "LIB_PATH: $LIB_PATH"
// TODO add more checks
if (!file(INCLUDE_PATH).exists() || !file(LIB_PATH).exists()) {
// Create standalone toolchain
def PATHWAYS = createStandalone(PATH_STANDALONE_SCRIPT, "$project.ext.PATH_STANDALONE_DEST", "$project.ext.SDK_MIN", value.ABI, true, false)
// Set environment
def OPENSSL_INCLUDE_PATH = "$OPENSSL_LIBS_PATH/" + value.ABI + "/include"
def OPENSSL_LIB_PATH = "$OPENSSL_LIBS_PATH/" + value.ABI + "/lib"
// TODO issue for aarch64, doesn't linked with OpenSsl
def OPENSSL_ENABLE = value.TCN == 'arm64'? "--without-ssl" : "--with-ssl"
PATHWAYS.CPPFLAGS += " -I$OPENSSL_INCLUDE_PATH"
PATHWAYS.LDFLAGS += " -L$OPENSSL_LIB_PATH"
PATHWAYS['LIBS'] = "-lssl -lcrypto"
// Create config every time for clean
exec {
println "\nExec buildconf..."
workingDir CURL_SRC
environment << PATHWAYS
commandLine "./buildconf"
}
// Exec config for each arch
exec {
println "\nExec configure..."
workingDir CURL_SRC
environment << PATHWAYS
commandLine "./configure", "--prefix=" + CURL_LIBS_INSTALL, "--host=" + value.ARCH, "--target=" + value.ARCH, \
OPENSSL_ENABLE, "--enable-static", "--disable-shared", "--enable-ipv6", "--enable-threaded-resolver", \
"--disable-dict", "--disable-gopher", "--disable-ldap", "--disable-ldaps", "--disable-manual", \
"--disable-telnet", "--disable-verbose"
}
// Clean libraries
exec {
println "\nExec make clean..."
workingDir CURL_SRC
environment << PATHWAYS
commandLine "make", "clean"
}
// Build libraries
exec {
println "\nExec make..."
workingDir CURL_SRC
environment << PATHWAYS
commandLine "make", "-j4"
}
// Install libraries
exec {
println "\nExec make install..."
workingDir CURL_SRC
environment << PATHWAYS
commandLine "make", "install"
}
// Copy include directory
copy {
println "\nCopy curl include..."
eachFile { println it.file }
from CURL_LIBS_INSTALL + "/include"
into INCLUDE_PATH
}
// Copy libraries
copy {
println "\nCopy curl libraries..."
eachFile { println it.file }
from CURL_LIBS_INSTALL + "/lib"
include MASK_LIB
into LIB_PATH
}
}
}
} else {
println "Curl source path doesn't exist..."
}
}
}
}
/*
* https://medium.com/@zw3rk/building-iconv-for-android-e3581a52668f
* This task works only for Unix
* */
task buildIconv() {
if (isUnix()) {
doLast {
println ""
println "------------------------- Iconv -------------------------"
println "Min SDK version: $project.ext.SDK_MIN"
println "Path to Iconv url: $ICONV_URL"
println "Path to Iconv src: $ICONV_SRC"
println "Path to Iconv output libs: $ICONV_LIBS_PATH"
println "Path to Android NDK: $PATH_NDK"
// Create folders
mkdir ICONV_LIBS_PATH
mkdir ICONV_LIBS_INSTALL
mkdir ICONV_SRC
// Download iconv last version
if (!file(ICONV_SRC_GZ).exists()) {
download {
println "\nDownload iconv..."
src ICONV_URL
dest ICONV_SRC
overwrite true
onlyIfModified true
}
}
// Unpack src
if (!file(ICONV_SRC_UNPACK).exists()) {
copy {
println "\nUnpack iconv archive..."
eachFile { println it.file }
from tarTree(resources.gzip(ICONV_SRC_GZ))
into ICONV_SRC
}
}
// Build for all platforms
getValues().each { abi, value ->
println "\nStart build for Iconv:"
println "ABI: " + value.ABI
println "ARCH: " + value.ARCH
println "TCHAIN NAME: " + value.TCN
// Pathways for libraries
def INCLUDE_PATH = ICONV_LIBS_PATH + "/" + value.ABI + "/include"
def LIB_PATH = ICONV_LIBS_PATH + "/" + value.ABI + "/lib"
println "INCLUDE_PATH: $INCLUDE_PATH"
println "LIB_PATH: $LIB_PATH"
// TODO add more checks
if (!file(INCLUDE_PATH).exists() || !file(LIB_PATH).exists()) {
// Create standalone toolchain
def PATHWAYS = createStandalone(PATH_STANDALONE_SCRIPT, "$project.ext.PATH_STANDALONE_DEST", "$project.ext.SDK_MIN", value.ABI, true, false)
// Exec config for each arch
exec {
println "\nExec configure..."
workingDir ICONV_SRC_UNPACK
environment << PATHWAYS
commandLine "./configure", "--prefix=" + ICONV_LIBS_INSTALL, "--host=" + value.ARCH, \
"--with-sysroot=" + PATHWAYS.SYSROOT, "--enable-static", "--enable-shared=no"
}
// Clean builds
exec {
println "\nExec make clean..."
workingDir ICONV_SRC_UNPACK
environment << PATHWAYS
commandLine "make", "clean"
}
// Build libraries
exec {
println "\nExec make..."
workingDir ICONV_SRC_UNPACK
environment << PATHWAYS
commandLine "make", "-j4"
}
// Install libraries
exec {
println "\nExec make install..."
workingDir ICONV_SRC_UNPACK
environment << PATHWAYS
commandLine "make", "install"
}
// Copy include directory
copy {
println "\nCopy iconv include..."
eachFile { println it.file }
from ICONV_LIBS_INSTALL + "/include"
into INCLUDE_PATH
}
// Copy libraries
copy {
println "\nCopy iconv libraries..."
eachFile { println it.file }
from ICONV_LIBS_INSTALL + "/lib"
include MASK_LIB
into LIB_PATH
}
}
}
}
}
}
/*
* https://github.com/pelya/libiconv-libicu-android
* This task works only for Unix
* */
task buildIcu() {
if (isUnix()) {
doLast {
println ""
println "------------------------- ICU -------------------------"
println "Min SDK version: $project.ext.SDK_MIN"
println "Path to Icu src: $ICU_SRC"
println "Path to Icu src root: $ICU_SRC_ROOT"
println "Path to Icu output libs: $ICU_LIBS_PATH"
println "Path to Icu output builds: $ICU_BUILD"
println "Path to Android NDK: $PATH_NDK"
if (!file(ICU_LIBS_PATH).exists()) {
if (file(ICU_SRC).exists()) {
// Create folders
mkdir ICU_LIBS_PATH
mkdir ICU_LIBS_INSTALL
mkdir ICU_BUILD
// First build for the system where the cross-build is run
def PRE_CPPFLAGS = "-O3 -fno-short-wchar -DU_USING_ICU_NAMESPACE=1 -fno-short-enums " +
"-DU_HAVE_NL_LANGINFO_CODESET=0 -D__STDC_INT64__ -DU_TIMEZONE=0 " +
"-DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_BREAK_ITERATION=1 " +
"-DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_TRANSLITERATION=0 " +
"-DUCONFIG_NO_REGULAR_EXPRESSIONS=1"
def CFLAGS = "-Os"
def CXXFLAGS="--std=c++11"
// Exec config for each arch
exec {
println "\nExec runConfigureICU..."
workingDir ICU_SRC_ROOT
environment "CFLAGS", CFLAGS
environment "CPPFLAGS", PRE_CPPFLAGS
environment "CXXFLAGS", CXXFLAGS
commandLine "./runConfigureICU", "Linux", "--prefix=$ICU_BUILD", \
"-enable-static", "--enable-shared=no", "--enable-extras=no", "--enable-tests=no", \
"--enable-strict=no", "--enable-icuio=no", "--enable-layout=no", "--enable-layoutex=no", \
"--enable-tools=no", "--enable-samples=no", "--enable-dyload=no"
}
exec {
println "\nExec make clean for runConfigureICU..."
workingDir ICU_SRC_ROOT
commandLine "make", "clean"
}
exec {
println "\nExec make for runConfigureICU..."
workingDir ICU_SRC_ROOT
environment "CFLAGS", CFLAGS
environment "CXXFLAGS", CXXFLAGS
commandLine "make", "-j4"
}
// Build for all platforms
getValues().each { abi, value ->
println "\nStart build for ICU:"
println "ABI: " + value.ABI
println "ARCH: " + value.ARCH
println "TCHAIN NAME: " + value.TCN
def INCLUDE_PATH = ICU_LIBS_PATH + "/" + value.ABI + "/include"
def LIB_PATH = ICU_LIBS_PATH + "/" + value.ABI + "/lib"
println "INCLUDE_PATH: $INCLUDE_PATH"
println "LIB_PATH: $LIB_PATH"
// TODO add more checks
if (!file(INCLUDE_PATH).exists() || !file(LIB_PATH).exists()) {
// Create standalone toolchain
def PATHWAYS = createStandalone(PATH_STANDALONE_SCRIPT, "$project.ext.PATH_STANDALONE_DEST", "$project.ext.SDK_MIN", value.ABI, true, false)
// Build config
exec {
println "\nExec configure..."
workingDir ICU_SRC_ROOT
environment << PATHWAYS
commandLine "./configure", "--host=" + value.ARCH, "--with-cross-build=$ICU_SRC_ROOT", "--prefix=$ICU_LIBS_INSTALL", \
"-enable-static", "--enable-shared=no", "--enable-extras=no", "--enable-tests=no", \
"--enable-strict=no", "--enable-icuio=no", "--enable-layout=no", "--enable-layoutex=no", \
"--enable-tools=no", "--enable-samples=no", "--enable-dyload=no"
}
// Install libraries
exec {
println "\nExec make clean..."
workingDir ICU_SRC_ROOT
environment << PATHWAYS
commandLine "make", "clean"
}
// Build libraries
exec {
println "\nExec make..."
workingDir ICU_SRC_ROOT
environment << PATHWAYS
commandLine "make", "-j4"
}
// Install libraries
exec {
println "\nExec make install..."
workingDir ICU_SRC_ROOT
environment << PATHWAYS
commandLine "make", "install"
}
// Copy include directory
copy {
println "\nCopy iconv include..."
eachFile { println it.file }
from ICU_LIBS_INSTALL + "/include"
into INCLUDE_PATH
}
// Copy libraries
copy {
println "\nCopy iconv libraries..."
eachFile { println it.file }
from ICU_LIBS_INSTALL + "/lib"
include MASK_LIB
into LIB_PATH
}
}
}
} else {
println "Icu source path doesn't exist..."
}
}
}
}
}
/*
* This task works only for Unix
* */
task buildBoost() {
if (isUnix()) {
doLast {
println ""
println "------------------------- Boost -------------------------"
println "Min SDK version: $project.ext.SDK_MIN"
println "Path to Boost output libs: $BOOST_LIBS_PATH"
println "Path to Boost output src: $BOOST_SRC"
println "Path to Android NDK: $PATH_NDK"
if (file(BOOST_SRC).exists()) {
// Create folders
mkdir BOOST_LIBS_PATH
mkdir BOOST_LIBS_INSTALL
mkdir BOOST_SRC
// Make config
getValues().each { abi, value ->
println "\nStart build for Boost:"
println "ABI: " + value.ABI
println "ARCH: " + value.ARCH
println "TCHAIN NAME: " + value.TCN
def LIB_PATH = BOOST_LIBS_PATH + "/" + value.ABI
println "LIB_PATH: $LIB_PATH"
// TODO add more checks
if (!file(LIB_PATH).exists()) {
// Create standalone toolchain
def PATHWAYS = createStandalone(PATH_STANDALONE_SCRIPT, "$project.ext.PATH_STANDALONE_DEST", "$project.ext.SDK_MIN", value.ABI, true, false)
// Exec bootstrap
// Doesn't build with clang
exec {
println "\nExec bootstrap..."
workingDir BOOST_SRC
environment << PATHWAYS
commandLine "./bootstrap.sh", "--prefix=" + BOOST_LIBS_INSTALL, \
"--with-icu=$ICU_LIBS_PATH/$value.ABI", \
"--with-libraries=filesystem,system,date_time,regex"
}
// Copy config
copy {
println "\nCopy boost config..."
def configName = "user-config_${value.ABI}.jam"
eachFile { println it.file }
from "$BOOST_CONFIG/$configName"
into "$BOOST_SRC/tools/build/src"
rename configName, 'user-config.jam'
}
// Exec b2 clean
exec {
println "\nExec b2 clean..."
workingDir BOOST_SRC
environment << PATHWAYS
commandLine "./b2", "--clean", "-j4"
}
// Exec b2 build
exec {
println "\nExec b2 build..."
workingDir BOOST_SRC
environment << PATHWAYS
commandLine "./bjam", "toolset=clang",
"target-os=linux", "threading=multi", "link=static", \
"runtime-link=static", "variant=release", "threadapi=pthread", \
"--stagedir=$LIB_PATH", "-j4"
}
}
}
} else {
println "Boost source path doesn't exist..."
}
}
}
}
/*
* Add here pre build tasks
* */
task build3dPArty() {
buildOpenSsl.execute()
buildCurl.execute()
buildIconv.execute()
buildIcu.execute()
buildBoost.execute()
}
/*
* Add task for run before build
* */
preBuild.dependsOn build3dPArty

View File

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -0,0 +1 @@
<manifest package="com.onlyoffice.core" />

View File

@ -0,0 +1,414 @@
cmake_minimum_required(VERSION 3.4.1)
# Examples
# Exclude from list by regex
#list(FILTER XML_EDITOR_CPP EXCLUDE REGEX "^${XML_EDITOR_DIR}libxml2/test.*\.c$")
set(CMAKE_VERBOSE_MAKEFILE on)
# Set global definition
add_definitions(
-D__ANDROID__
-D_LINUX
)
# Add checks arguments here
# Core path arg
if (NOT DEFINED ARG_SRC_CORE)
message(FATAL_ERROR "You must set argument \"ARG_SRC_CORE\" with path to core...")
elseif (NOT EXISTS ${ARG_SRC_CORE})
message(FATAL_ERROR "Core source path doesn't exist!")
endif()
# Result lib name
if (NOT DEFINED ARG_LIB_CORE)
message(FATAL_ERROR "You must set argument \"ARG_LIB_CORE\" with result lib's name...")
endif()
# 3Party libs path arg
if (NOT DEFINED ARG_LIBS)
message(FATAL_ERROR "You must set argument \"ARG_LIBS\" with path to 3d-party library...")
elseif (NOT EXISTS ${ARG_LIBS})
message(FATAL_ERROR "3d party libraries path doesn't exist!")
endif()
# ---------- Libs names ----------
# Main lib
set(LIB_NAME_CORE ${ARG_LIB_CORE})
# Converter lib name
set(LIB_NAME_X2T x2t-converter)
# 3d party libraries
set(LIB_NAME_OPENSSL openssl)
set(LIB_NAME_SSL ssl)
set(LIB_NAME_CRYPTO crypto)
set(LIB_NAME_CURL curl)
set(LIB_NAME_ICONV iconv)
set(LIB_NAME_BOOST boost)
set(LIB_NAME_BOOST_REGEX boost_regex)
set(LIB_NAME_ICU icu)
set(LIB_NAME_ICU_DATA icudata)
set(LIB_NAME_ICU_i18n icui18n)
set(LIB_NAME_ICU_UC icuuc)
# Common
set(LIB_NAME_CPUFEATURE cpufeature)
set(LIB_NAME_UNICODE_CONVERTER unicodeconv)
set(LIB_NAME_OFFICE_UTILS officeutils)
set(LIB_NAME_CRYPTO_READER crypto-reader)
set(LIB_NAME_DOCX_RENDER docx-render)
set(LIB_NAME_CRYPTOPP cryptopp)
set(LIB_NAME_XLSX_SERIALIZE xlsx-serialize)
set(LIB_NAME_POLE pole)
set(LIB_NAME_DOWNLOADER downloader)
# Desktop editor
set(LIB_NAME_AGG agg)
set(LIB_NAME_FREETYPES freetype)
set(LIB_NAME_EDITOR_COMMON editor-common)
set(LIB_NAME_EDITOR_XML editor-xml)
set(LIB_NAME_FONT_ENGINE font-engine)
set(LIB_NAME_DOCT_RENDER doct-render)
# CxImage libraries
set(LIB_NAME_CXIMAGE cximage)
set(LIB_NAME_JASPER jasper)
set(LIB_NAME_JPEG jpeg)
set(LIB_NAME_PNG png)
set(LIB_NAME_JBIG jbig)
set(LIB_NAME_TIFF tiff)
set(LIB_NAME_RAW raw)
set(LIB_NAME_MNG mng)
set(LIB_NAME_PSD psd)
set(LIB_NAME_ZLIB zlib)
# Formats
set(LIB_NAME_DOCXFORMAT docxformat)
set(LIB_NAME_PDF_WRITER pdf-writer)
set(LIB_NAME_PDF_READER pdf-reader)
set(LIB_NAME_DJVU djvu)
set(LIB_NAME_HTML_FILE html-file)
set(LIB_NAME_HTML_RENDER html-render)
set(LIB_NAME_TXT txt)
set(LIB_NAME_DOC doc)
set(LIB_NAME_DOCX docx)
set(LIB_NAME_PPT ppt)
set(LIB_NAME_PPTX pptx)
set(LIB_NAME_RTF rtf)
set(LIB_NAME_ODF_READER odf-reader)
set(LIB_NAME_ODF_WRITER odf-writer)
set(LIB_NAME_XLS xls)
set(LIB_NAME_XPS xps)
# ---------- Paths sources ----------
# Core src dir path
set(CORE_DIR ${ARG_SRC_CORE})
message(STATUS "Core source path: ${CORE_DIR}")
# Prebuild libraries path
set(LIBS_DIR ${ARG_LIBS})
message(STATUS "Prebuild libraries path: ${LIBS_DIR}")
# OpenSsl libs path
set(SSL_INCLUDE_DIR ${LIBS_DIR}/${LIB_NAME_OPENSSL}/${ANDROID_ABI}/include)
message(STATUS "OpenSsl include path: ${SSL_INCLUDE_DIR}")
set(SSL_LIB_DIR ${LIBS_DIR}/${LIB_NAME_OPENSSL}/${ANDROID_ABI}/lib)
message(STATUS "OpenSsl lib path: ${SSL_LIB_DIR}")
# Curl libs path
set(CURL_INCLUDE_DIR ${LIBS_DIR}/${LIB_NAME_CURL}/${ANDROID_ABI}/include)
message(STATUS "Curl include path: ${CURL_INCLUDE_DIR}")
set(CURL_LIB_DIR ${LIBS_DIR}/${LIB_NAME_CURL}/${ANDROID_ABI}/lib)
message(STATUS "Curl lib path: ${CURL_LIB_DIR}")
# Iconv libs path
set(ICONV_INCLUDE_DIR ${LIBS_DIR}/${LIB_NAME_ICONV}/${ANDROID_ABI}/include)
message(STATUS "Iconv include path: ${ICONV_INCLUDE_DIR}")
set(ICONV_LIB_DIR ${LIBS_DIR}/${LIB_NAME_ICONV}/${ANDROID_ABI}/lib)
message(STATUS "Iconv lib path: ${ICONV_LIB_DIR}")
# Boost src dir path
set(BOOST_INCLUDE_DIR ${CORE_DIR}/Common/3dParty/${LIB_NAME_BOOST}/boost_1_58_0)
message(STATUS "Boost include path: ${BOOST_INCLUDE_DIR}")
set(BOOST_LIB_DIR ${LIBS_DIR}/${LIB_NAME_BOOST}/${ANDROID_ABI}/lib)
message(STATUS "Boost lib path: ${BOOST_LIB_DIR}")
# Icu src dir path
set(ICU_INCLUDE_DIR ${LIBS_DIR}/${LIB_NAME_ICU}/${ANDROID_ABI}/include)
message(STATUS "Icu include path: ${ICU_INCLUDE_DIR}")
set(ICU_LIB_DIR ${LIBS_DIR}/${LIB_NAME_ICU}/${ANDROID_ABI}/lib)
message(STATUS "Icu lib path: ${ICU_LIB_DIR}")
# Add global path for lib resources here
# Workaround src dir path
set(WORKAROUND_DIR ${CMAKE_CURRENT_SOURCE_DIR}/workaround)
message(STATUS "Workaround source path: ${WORKAROUND_DIR}")
# Check path
if (NOT EXISTS ${WORKAROUND_DIR})
message(FATAL_ERROR "Workaround source path doesn't exist!")
endif()
# Core project dir path
set(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
message(STATUS "Core project path: ${SRC_DIR}")
# Core temp build dir path
set(BUILD_DIR ${CMAKE_BINARY_DIR}/tmp)
message(STATUS "Core build path: ${BUILD_DIR}")
file(MAKE_DIRECTORY ${BUILD_DIR})
# CpuFeature src path
set(CPU_FEATURE_DIR ${ANDROID_NDK}/sources/android/cpufeatures)
message(STATUS "CpuFeature source path: ${CPU_FEATURE_DIR}")
# Core modules path
# X2T
set(X2T_DIR ${CORE_DIR}/X2tConverter/)
message(STATUS "X2t converter source path: ${X2T_DIR}")
# Common
# CryptoPP src path
set(CRYPTOPP_DIR ${CORE_DIR}/Common/3dParty/cryptopp/)
message(STATUS "CryptoPP source path: ${CRYPTOPP_DIR}")
# Pole src path
set(POLE_DIR ${CORE_DIR}/Common/3dParty/pole/)
message(STATUS "Pole source path: ${POLE_DIR}")
# File downloader src path
set(DOWNLOADER_DIR ${CORE_DIR}/Common/FileDownloader/)
message(STATUS "File downloader source path: ${DOWNLOADER_DIR}")
# Unicode converter
set(UNICODE_CONVERTER_DIR ${CORE_DIR}/UnicodeConverter/)
message(STATUS "Unicode converter source path: ${UNICODE_CONVERTER_DIR}")
# Office utils
set(OFFICE_UTILS_DIR ${CORE_DIR}/OfficeUtils/)
message(STATUS "Office utils converter source path: ${OFFICE_UTILS_DIR}")
# Xlsx serialize src path
set(XLSX_SERIALIZE_DIR ${CORE_DIR}/XlsxSerializerCom/)
message(STATUS "Xlsx serialize source path: ${XLSX_SERIALIZE_DIR}")
# Crypto reader src path
set(CRYPTO_READER_DIR ${CORE_DIR}/OfficeCryptReader/)
message(STATUS "Crypto reader source path: ${CRYPTO_READER_DIR}")
# Docx renderer src path
set(DOCX_RENDER_DIR ${CORE_DIR}/DocxRenderer/)
message(STATUS "Docx render source path: ${DOCX_RENDER_DIR}")
# DesktopEditor
# FreeTypes src path
set(FREETYPES_DIR ${CORE_DIR}/DesktopEditor/freetype-2.5.2/)
message(STATUS "FreeTypes source path: ${FREETYPES_DIR}")
# Agg src path
set(AGG_DIR ${CORE_DIR}/DesktopEditor/agg-2.4/)
message(STATUS "Agg source path: ${AGG_DIR}")
# Common editor
set(COMMON_EDITOR_DIR ${CORE_DIR}/DesktopEditor/common/)
message(STATUS "Common editor source path: ${COMMON_EDITOR_DIR}")
# Graphics editor
set(GRAPHICS_EDITOR_DIR ${CORE_DIR}/DesktopEditor/graphics/)
message(STATUS "Graphics editor source path: ${GRAPHICS_EDITOR_DIR}")
# Raster editor
set(RASTER_EDITOR_DIR ${CORE_DIR}/DesktopEditor/raster/)
message(STATUS "Raster editor source path: ${RASTER_EDITOR_DIR}")
# Font engine
set(FONT_ENGINE_DIR ${CORE_DIR}/DesktopEditor/fontengine/)
message(STATUS "Font engine source path: ${FONT_ENGINE_DIR}")
# Xml
set(XML_EDITOR_DIR ${CORE_DIR}/DesktopEditor/xml/)
message(STATUS "Xml editor source path: ${XML_EDITOR_DIR}")
# Doct render
set(DOCT_RENDER_DIR ${CORE_DIR}/DesktopEditor/doctrenderer/)
message(STATUS "Doct render source path: ${DOCT_RENDER_DIR}")
# CxImage engine
set(CXIMAGE_DIR ${CORE_DIR}/DesktopEditor/cximage/CxImage/)
message(STATUS "CxImage source path: ${CXIMAGE_DIR}")
# Jasper
set(JASPER_DIR ${CORE_DIR}/DesktopEditor/cximage/jasper/)
message(STATUS "Jasper source path: ${JASPER_DIR}")
# Jpeg
set(JPEG_DIR ${CORE_DIR}/DesktopEditor/cximage/jpeg/)
message(STATUS "Jpeg source path: ${JPEG_DIR}")
# Png
set(PNG_DIR ${CORE_DIR}/DesktopEditor/cximage/png/)
message(STATUS "Png source path: ${PNG_DIR}")
# JBig
set(JBIG_DIR ${CORE_DIR}/DesktopEditor/cximage/jbig/)
message(STATUS "JBig source path: ${JBIG_DIR}")
# Tiff
set(TIFF_DIR ${CORE_DIR}/DesktopEditor/cximage/tiff/)
message(STATUS "Tiff source path: ${TIFF_DIR}")
# Raw
set(RAW_DIR ${CORE_DIR}/DesktopEditor/cximage/raw/)
message(STATUS "Raw source path: ${RAW_DIR}")
# Mng
set(MNG_DIR ${CORE_DIR}/DesktopEditor/cximage/mng/)
message(STATUS "Mng source path: ${MNG_DIR}")
# Psd
set(PSD_DIR ${CORE_DIR}/DesktopEditor/cximage/libpsd/)
message(STATUS "Psd source path: ${PSD_DIR}")
# Zlib
set(ZLIB_DIR ${CORE_DIR}/DesktopEditor/cximage/zlib/)
message(STATUS "Zlib source path: ${ZLIB_DIR}")
# Formats
# DocxFormat src path
set(DOCXFORMAT_DIR ${CORE_DIR}/Common/DocxFormat/)
message(STATUS "Docx format source path: ${DOCXFORMAT_DIR}")
# Pdf writer
set(PDF_WRITER_DIR ${CORE_DIR}/PdfWriter/)
message(STATUS "Pdf writer source path: ${PDF_WRITER_DIR}")
# Pdf reader
set(PDF_READER_DIR ${CORE_DIR}/PdfReader/)
message(STATUS "Pdf reader source path: ${PDF_READER_DIR}")
# DjVu
set(DJVU_DIR ${CORE_DIR}/DjVuFile/)
message(STATUS "DjVu source path: ${DJVU_DIR}")
# Html file
set(HTML_FILE_DIR ${CORE_DIR}/HtmlFile/)
message(STATUS "Html file source path: ${HTML_FILE_DIR}")
# Html render
set(HTML_RENDER_DIR ${CORE_DIR}/HtmlRenderer/)
message(STATUS "Html render source path: ${HTML_RENDER_DIR}")
# Txt
set(TXT_DIR ${CORE_DIR}/ASCOfficeTxtFile/)
message(STATUS "Txt file source path: ${TXT_DIR}")
# Doc
set(DOC_FILE_DIR ${CORE_DIR}/ASCOfficeDocFile/)
message(STATUS "Doc file source path: ${DOC_FILE_DIR}")
# Docx
set(DOCX_FILE_DIR ${CORE_DIR}/ASCOfficeDocxFile2/)
message(STATUS "Docx file source path: ${DOCX_FILE_DIR}")
# Pptx
set(PPTX_FILE_DIR ${CORE_DIR}/ASCOfficePPTXFile/)
message(STATUS "Pptx file source path: ${PPTX_FILE_DIR}")
# Ppt
set(PPT_FILE_DIR ${CORE_DIR}/ASCOfficePPTFile/)
message(STATUS "Ppt file source path: ${PPT_FILE_DIR}")
# Rtf
set(RTF_FILE_DIR ${CORE_DIR}/ASCOfficeRtfFile/)
message(STATUS "Rtf file source path: ${RTF_FILE_DIR}")
# Odf reader
set(ODF_READER_FILE_DIR ${CORE_DIR}/ASCOfficeOdfFile/)
message(STATUS "Odf reader file source path: ${ODF_READER_FILE_DIR}")
# Odf writer
set(ODF_WRITER_FILE_DIR ${CORE_DIR}/ASCOfficeOdfFileW/)
message(STATUS "Odf writer file source path: ${ODF_WRITER_FILE_DIR}")
# Xls
set(XLS_FILE_DIR ${CORE_DIR}/ASCOfficeXlsFile2/)
message(STATUS "Xls file source path: ${XLS_FILE_DIR}")
# Xps
set(XPS_FILE_DIR ${CORE_DIR}/XpsFile/)
message(STATUS "Xps file source path: ${XPS_FILE_DIR}")
# 3d party libraries
# Headers
include_directories(
${SSL_INCLUDE_DIR}
${CURL_INCLUDE_DIR}
${ICONV_INCLUDE_DIR}
${BOOST_INCLUDE_DIR}
${ICU_INCLUDE_DIR}
)
# Libraries
link_directories(
${SSL_LIB_DIR}
${CURL_LIB_DIR}
${ICONV_LIB_DIR}
${BOOST_LIB_DIR}
${ICU_LIB_DIR}
)
# Target and dependencies
# Add dependencies sub projects
add_subdirectory(${SRC_DIR}/core/cpufeature ${BUILD_DIR}/core/cpufeature)
add_subdirectory(${SRC_DIR}/core/common/officeutils ${BUILD_DIR}/core/common/officeutils)
add_subdirectory(${SRC_DIR}/core/common/unicodeconverter ${BUILD_DIR}/core/common/unicodeconverter)
add_subdirectory(${SRC_DIR}/core/common/cryptopp ${BUILD_DIR}/core/common/cryptopp)
add_subdirectory(${SRC_DIR}/core/common/pole ${BUILD_DIR}/core/common/pole)
add_subdirectory(${SRC_DIR}/core/common/downloader ${BUILD_DIR}/core/common/downloader)
add_subdirectory(${SRC_DIR}/core/common/cryptoreader ${BUILD_DIR}/core/common/cryptoreader)
add_subdirectory(${SRC_DIR}/core/common/xlsxserialize ${BUILD_DIR}/core/common/xlsxserialize)
add_subdirectory(${SRC_DIR}/core/desktopeditor/freetypes ${BUILD_DIR}/core/desktopeditor/freetypes)
add_subdirectory(${SRC_DIR}/core/desktopeditor/agg ${BUILD_DIR}/core/desktopeditor/agg)
add_subdirectory(${SRC_DIR}/core/desktopeditor/common ${BUILD_DIR}/core/desktopeditor/common)
add_subdirectory(${SRC_DIR}/core/desktopeditor/cximage/cximage ${BUILD_DIR}/core/desktopeditor/cximage/cximage)
add_subdirectory(${SRC_DIR}/core/desktopeditor/fontengine ${BUILD_DIR}/core/desktopeditor/fontengine)
add_subdirectory(${SRC_DIR}/core/desktopeditor/xml ${BUILD_DIR}/core/desktopeditor/xml)
add_subdirectory(${SRC_DIR}/core/desktopeditor/doctrender ${BUILD_DIR}/core/desktopeditor/doctrender)
add_subdirectory(${SRC_DIR}/core/formats/pdfwriter ${BUILD_DIR}/core/formats/pdfwriter)
add_subdirectory(${SRC_DIR}/core/formats/pdfreader ${BUILD_DIR}/core/formats/pdfreader)
add_subdirectory(${SRC_DIR}/core/formats/djvu ${BUILD_DIR}/core/formats/djvu)
add_subdirectory(${SRC_DIR}/core/formats/docxformat ${BUILD_DIR}/core/formats/docxformat)
add_subdirectory(${SRC_DIR}/core/formats/htmlfile ${BUILD_DIR}/core/formats/htmlfile)
add_subdirectory(${SRC_DIR}/core/formats/htmlrender ${BUILD_DIR}/core/formats/htmlrender)
add_subdirectory(${SRC_DIR}/core/formats/xls ${BUILD_DIR}/core/formats/xls)
add_subdirectory(${SRC_DIR}/core/formats/ppt ${BUILD_DIR}/core/formats/ppt)
add_subdirectory(${SRC_DIR}/core/formats/pptx ${BUILD_DIR}/core/formats/pptx)
add_subdirectory(${SRC_DIR}/core/formats/doc ${BUILD_DIR}/core/formats/doc)
add_subdirectory(${SRC_DIR}/core/formats/docx ${BUILD_DIR}/core/formats/docx)
add_subdirectory(${SRC_DIR}/core/formats/rtf ${BUILD_DIR}/core/formats/rtf)
add_subdirectory(${SRC_DIR}/core/formats/odfreader ${BUILD_DIR}/core/formats/odfreader)
add_subdirectory(${SRC_DIR}/core/formats/odfwriter ${BUILD_DIR}/core/formats/odfwriter)
add_subdirectory(${SRC_DIR}/core/formats/txt ${BUILD_DIR}/core/formats/txt)
add_subdirectory(${SRC_DIR}/core/formats/xps ${BUILD_DIR}/core/formats/xps)
add_subdirectory(${SRC_DIR}/core/x2t ${BUILD_DIR}/core/x2t)
# Add target library
add_library(${LIB_NAME_CORE} SHARED wrappers/main.cpp)
# Add dependency library
target_link_libraries(${LIB_NAME_CORE}
PUBLIC
${LIB_NAME_X2T}
PRIVATE
# Common
${LIB_NAME_CPUFEATURE}
${LIB_NAME_OFFICE_UTILS}
${LIB_NAME_UNICODE_CONVERTER}
${LIB_NAME_CRYPTOPP}
${LIB_NAME_POLE}
${LIB_NAME_DOWNLOADER}
${LIB_NAME_CRYPTO_READER}
${LIB_NAME_XLSX_SERIALIZE}
# Editors
${LIB_NAME_FREETYPES}
${LIB_NAME_AGG}
${LIB_NAME_EDITOR_COMMON}
${LIB_NAME_CXIMAGE}
${LIB_NAME_FONT_ENGINE}
${LIB_NAME_EDITOR_XML}
${LIB_NAME_DOCT_RENDER}
# Formats
${LIB_NAME_PDF_WRITER}
${LIB_NAME_PDF_READER}
${LIB_NAME_DJVU}
${LIB_NAME_DOCXFORMAT}
${LIB_NAME_HTML_FILE}
${LIB_NAME_HTML_RENDER}
${LIB_NAME_XLS}
${LIB_NAME_DOC}
${LIB_NAME_DOCX}
${LIB_NAME_PPT}
${LIB_NAME_PPTX}
${LIB_NAME_RTF}
${LIB_NAME_ODF_READER}
${LIB_NAME_ODF_WRITER}
${LIB_NAME_TXT}
${LIB_NAME_XPS}
# Third party
${LIB_NAME_ICU_UC}
${LIB_NAME_ICU_DATA}
${LIB_NAME_ICU_i18n}
${LIB_NAME_BOOST_REGEX}
)
# Set target definition
target_compile_options(${LIB_NAME_CORE}
PRIVATE
-Wno-c++11-narrowing
-Wno-format-security
-Wno-register
)

View File

@ -0,0 +1,177 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED CRYPTOPP_DIR)
message(FATAL_ERROR "You must set path in \"CRYPTOPP_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_CRYPTOPP)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_CRYPTOPP\"!")
endif()
# Library source .h .cpp
file(GLOB SRC_CRYPTOPP_CPP
${CRYPTOPP_DIR}3way.cpp
${CRYPTOPP_DIR}adler32.cpp
${CRYPTOPP_DIR}algebra.cpp
${CRYPTOPP_DIR}algparam.cpp
${CRYPTOPP_DIR}arc4.cpp
${CRYPTOPP_DIR}asn.cpp
${CRYPTOPP_DIR}authenc.cpp
${CRYPTOPP_DIR}base32.cpp
${CRYPTOPP_DIR}base64.cpp
${CRYPTOPP_DIR}basecode.cpp
${CRYPTOPP_DIR}bench2.cpp
${CRYPTOPP_DIR}bfinit.cpp
${CRYPTOPP_DIR}blowfish.cpp
${CRYPTOPP_DIR}blumshub.cpp
${CRYPTOPP_DIR}camellia.cpp
${CRYPTOPP_DIR}cast.cpp
${CRYPTOPP_DIR}casts.cpp
${CRYPTOPP_DIR}cbcmac.cpp
${CRYPTOPP_DIR}ccm.cpp
${CRYPTOPP_DIR}channels.cpp
${CRYPTOPP_DIR}cmac.cpp
${CRYPTOPP_DIR}crc.cpp
${CRYPTOPP_DIR}cryptlib.cpp
${CRYPTOPP_DIR}datatest.cpp
${CRYPTOPP_DIR}default.cpp
${CRYPTOPP_DIR}des.cpp
${CRYPTOPP_DIR}dessp.cpp
${CRYPTOPP_DIR}dh.cpp
${CRYPTOPP_DIR}dh2.cpp
${CRYPTOPP_DIR}dsa.cpp
${CRYPTOPP_DIR}eax.cpp
${CRYPTOPP_DIR}ec2n.cpp
${CRYPTOPP_DIR}eccrypto.cpp
${CRYPTOPP_DIR}ecp.cpp
${CRYPTOPP_DIR}elgamal.cpp
${CRYPTOPP_DIR}emsa2.cpp
${CRYPTOPP_DIR}eprecomp.cpp
${CRYPTOPP_DIR}esign.cpp
${CRYPTOPP_DIR}files.cpp
${CRYPTOPP_DIR}filters.cpp
${CRYPTOPP_DIR}fips140.cpp
${CRYPTOPP_DIR}fipsalgt.cpp
${CRYPTOPP_DIR}fipstest.cpp
${CRYPTOPP_DIR}gcm.cpp
${CRYPTOPP_DIR}gf2_32.cpp
${CRYPTOPP_DIR}gf2n.cpp
${CRYPTOPP_DIR}gf256.cpp
${CRYPTOPP_DIR}gfpcrypt.cpp
${CRYPTOPP_DIR}gost.cpp
${CRYPTOPP_DIR}gzip.cpp
${CRYPTOPP_DIR}hex.cpp
${CRYPTOPP_DIR}hmac.cpp
${CRYPTOPP_DIR}hrtimer.cpp
${CRYPTOPP_DIR}ida.cpp
${CRYPTOPP_DIR}idea.cpp
${CRYPTOPP_DIR}integer.cpp
${CRYPTOPP_DIR}iterhash.cpp
${CRYPTOPP_DIR}luc.cpp
${CRYPTOPP_DIR}mars.cpp
${CRYPTOPP_DIR}marss.cpp
${CRYPTOPP_DIR}md2.cpp
${CRYPTOPP_DIR}md4.cpp
${CRYPTOPP_DIR}md5.cpp
${CRYPTOPP_DIR}misc.cpp
${CRYPTOPP_DIR}modes.cpp
${CRYPTOPP_DIR}mqueue.cpp
${CRYPTOPP_DIR}mqv.cpp
${CRYPTOPP_DIR}nbtheory.cpp
${CRYPTOPP_DIR}network.cpp
${CRYPTOPP_DIR}oaep.cpp
${CRYPTOPP_DIR}osrng.cpp
${CRYPTOPP_DIR}panama.cpp
${CRYPTOPP_DIR}pch.cpp
${CRYPTOPP_DIR}pkcspad.cpp
${CRYPTOPP_DIR}polynomi.cpp
${CRYPTOPP_DIR}pssr.cpp
${CRYPTOPP_DIR}pubkey.cpp
${CRYPTOPP_DIR}queue.cpp
${CRYPTOPP_DIR}rabin.cpp
${CRYPTOPP_DIR}randpool.cpp
${CRYPTOPP_DIR}rc2.cpp
${CRYPTOPP_DIR}rc5.cpp
${CRYPTOPP_DIR}rc6.cpp
${CRYPTOPP_DIR}rdrand.cpp
${CRYPTOPP_DIR}dll.cpp
${CRYPTOPP_DIR}dlltest.cpp
${CRYPTOPP_DIR}rdtables.cpp
${CRYPTOPP_DIR}rijndael.cpp
${CRYPTOPP_DIR}ripemd.cpp
${CRYPTOPP_DIR}rng.cpp
${CRYPTOPP_DIR}rsa.cpp
${CRYPTOPP_DIR}rw.cpp
${CRYPTOPP_DIR}safer.cpp
${CRYPTOPP_DIR}salsa.cpp
${CRYPTOPP_DIR}seal.cpp
${CRYPTOPP_DIR}seed.cpp
${CRYPTOPP_DIR}serpent.cpp
${CRYPTOPP_DIR}sse-simd.cpp
${CRYPTOPP_DIR}sha.cpp
${CRYPTOPP_DIR}sha3.cpp
${CRYPTOPP_DIR}shacal2.cpp
${CRYPTOPP_DIR}shark.cpp
${CRYPTOPP_DIR}sharkbox.cpp
${CRYPTOPP_DIR}simple.cpp
${CRYPTOPP_DIR}skipjack.cpp
${CRYPTOPP_DIR}socketft.cpp
${CRYPTOPP_DIR}sosemanuk.cpp
${CRYPTOPP_DIR}square.cpp
${CRYPTOPP_DIR}squaretb.cpp
${CRYPTOPP_DIR}strciphr.cpp
${CRYPTOPP_DIR}tea.cpp
${CRYPTOPP_DIR}test.cpp
${CRYPTOPP_DIR}tftables.cpp
${CRYPTOPP_DIR}tiger.cpp
${CRYPTOPP_DIR}tigertab.cpp
${CRYPTOPP_DIR}trdlocal.cpp
${CRYPTOPP_DIR}ttmac.cpp
${CRYPTOPP_DIR}twofish.cpp
${CRYPTOPP_DIR}validat1.cpp
${CRYPTOPP_DIR}validat2.cpp
${CRYPTOPP_DIR}validat3.cpp
${CRYPTOPP_DIR}vmac.cpp
${CRYPTOPP_DIR}wait.cpp
${CRYPTOPP_DIR}wake.cpp
${CRYPTOPP_DIR}whrlpool.cpp
${CRYPTOPP_DIR}winpipes.cpp
${CRYPTOPP_DIR}xtr.cpp
${CRYPTOPP_DIR}xtrcrypt.cpp
${CRYPTOPP_DIR}zdeflate.cpp
${CRYPTOPP_DIR}zinflate.cpp
${CRYPTOPP_DIR}zlib.cpp
${CRYPTOPP_DIR}cpu.cpp
)
# Set targer as static library
add_library(${LIB_NAME_CRYPTOPP} STATIC ${SRC_CRYPTOPP_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_CRYPTOPP}
PRIVATE
${LIB_NAME_CPUFEATURE}
)
# Add include files .h
target_include_directories(${LIB_NAME_CRYPTOPP} PUBLIC ${CRYPTOPP_DIR})
# Set target definition
target_compile_definitions(${LIB_NAME_CRYPTOPP}
PRIVATE
UNICODE
CRYPTOPPLIB_LIBRARY
CRYPTOPP_DISABLE_ASM
)
# Set target compiler options
target_compile_options(${LIB_NAME_CRYPTOPP}
PRIVATE
-maes
-mpclmul
)

View File

@ -0,0 +1,33 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED CRYPTO_READER_DIR)
message(FATAL_ERROR "You must set path in \"CRYPTO_READER_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_CRYPTO_READER)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_CRYPTO_READER\"!")
endif()
# Library source .h .cpp
file(GLOB CRYPTO_READER_CPP
${CRYPTO_READER_DIR}source/*.cpp
)
# Set targer as static library
add_library(${LIB_NAME_CRYPTO_READER} STATIC ${CRYPTO_READER_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_CRYPTO_READER}
PRIVATE
${LIB_NAME_CRYPTOPP}
)
# Add include files .h
target_include_directories(${LIB_NAME_CRYPTO_READER}
PUBLIC
${CRYPTO_READER_DIR}source/
)

View File

@ -0,0 +1,34 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED DOCX_RENDER_DIR)
message(FATAL_ERROR "You must set path in \"DOCX_RENDER_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_DOCX_RENDER)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_DOCX_RENDER\"!")
endif()
# Library source .h .cpp
file(GLOB DOCX_RENDER_CPP
${DOCX_RENDER_DIR}DocxRenderer.cpp
)
# Set targer as static library
add_library(${LIB_NAME_DOCX_RENDER} STATIC ${DOCX_RENDER_CPP})
# Add include files .h
target_include_directories(${LIB_NAME_DOCX_RENDER}
PUBLIC
${DOCX_RENDER_DIR}
${DOCX_RENDER_DIR}src/logic/
)
# Set target definition
target_compile_definitions(${LIB_NAME_DOCX_RENDER}
PRIVATE
DOCXRENDERER_USE_DYNAMIC_LIBRARY
)

View File

@ -0,0 +1,37 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED DOWNLOADER_DIR)
message(FATAL_ERROR "You must set path in \"DOWNLOADER_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_DOWNLOADER)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_DOWNLOADER\"!")
endif()
# Library source .h .cpp
file(GLOB DOWNLOADER_CPP
${DOWNLOADER_DIR}FileDownloader.cpp
${DOWNLOADER_DIR}FileDownloader_curl.cpp
)
# Set targer as static library
add_library(${LIB_NAME_DOWNLOADER} STATIC ${DOWNLOADER_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_DOWNLOADER}
PRIVATE
${LIB_NAME_FONT_ENGINE}
${LIB_NAME_CURL}
${LIB_NAME_SSL}
${LIB_NAME_CRYPTO}
)
# Add include files .h
target_include_directories(${LIB_NAME_DOWNLOADER}
PUBLIC
${DOWNLOADER_DIR}
)

View File

@ -0,0 +1,50 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED OFFICE_UTILS_DIR)
message(FATAL_ERROR "You must set path in \"OFFICE_UTILS_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_OFFICE_UTILS)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_OFFICE_UTILS\"!")
endif()
# Library source .h .cpp
file(GLOB OFFICE_UTILS_CPP
${OFFICE_UTILS_DIR}src/*.cpp
${OFFICE_UTILS_DIR}src/zlib-1.2.3/*.c
${OFFICE_UTILS_DIR}src/zlib-1.2.3/contrib/minizip/*.c
)
# Exclude sources
list(REMOVE_ITEM OFFICE_UTILS_CPP
${OFFICE_UTILS_DIR}src/zlib-1.2.3/contrib/minizip/iowin32.c
)
# Set targer as static library
add_library(${LIB_NAME_OFFICE_UTILS} STATIC ${OFFICE_UTILS_CPP})
# Add dependency library
#target_link_libraries(${LIB_NAME_OFFICE_UTILS}
# PRIVATE
# ${LIB_NAME_EDITOR_COMMON}
#)
# Add include files .h
target_include_directories(${LIB_NAME_OFFICE_UTILS}
PUBLIC
${OFFICE_UTILS_DIR}
${OFFICE_UTILS_DIR}zlib-1.2.3/
PRIVATE
${OFFICE_UTILS_DIR}zlib-1.2.3/contrib/minizip/
)
# Set target definition
target_compile_definitions(${LIB_NAME_OFFICE_UTILS}
PRIVATE
_LINUX
BUILD_ZLIB_AS_SOURCES
)

View File

@ -0,0 +1,25 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED POLE_DIR)
message(FATAL_ERROR "You must set path in \"POLE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_POLE)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_POLE\"!")
endif()
# Library source .h .cpp
file(GLOB POLE_CPP ${POLE_DIR}pole.cpp)
# Set targer as static library
add_library(${LIB_NAME_POLE} STATIC ${POLE_CPP})
# Add include files .h
target_include_directories(${LIB_NAME_POLE}
PUBLIC
${POLE_DIR}
)

View File

@ -0,0 +1,39 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED UNICODE_CONVERTER_DIR)
message(FATAL_ERROR "You must set path in \"UNICODE_CONVERTER_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_UNICODE_CONVERTER)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_UNICODE_CONVERTER\"!")
endif()
# Library source .h .cpp
file(GLOB UNICODE_CONVERTER_CPP ${UNICODE_CONVERTER_DIR}*.cpp)
# Set targer as static library
add_library(${LIB_NAME_UNICODE_CONVERTER} STATIC ${UNICODE_CONVERTER_CPP})
# Add include files .h
target_include_directories(${LIB_NAME_UNICODE_CONVERTER} PUBLIC ${UNICODE_CONVERTER_DIR})
# Add dependency library
target_link_libraries(${LIB_NAME_UNICODE_CONVERTER}
PUBLIC
${LIB_NAME_ICU_UC}
${LIB_NAME_ICU_DATA}
${LIB_NAME_ICU_i18n}
)
# Set target definition
target_compile_definitions(${LIB_NAME_UNICODE_CONVERTER}
PRIVATE
UNICODECONVERTER_USE_DYNAMIC_LIBRARY
U_COMMON_IMPLEMENTATION
U_I18N_IMPLEMENTATION
U_IO_IMPLEMENTATION
)

View File

@ -0,0 +1,48 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED UNICODE_CONVERTER_DIR)
message(FATAL_ERROR "You must set path in \"UNICODE_CONVERTER_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_UNICODE_CONVERTER)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_UNICODE_CONVERTER\"!")
endif()
# Library source .h .cpp
file(GLOB UNICODE_CONVERTER_CPP ${UNICODE_CONVERTER_DIR}*.cpp)
file(GLOB_RECURSE UNICODE_CONVERTER_ICU_CPP
${UNICODE_CONVERTER_DIR}icubuilds-mac/icu/icu/*.c
${UNICODE_CONVERTER_DIR}icubuilds-mac/icu/icu/*.cpp)
# Concatenate with freetype resource
set(UNICODE_CONVERTER_CPP ${UNICODE_CONVERTER_CPP} ${UNICODE_CONVERTER_ICU_CPP})
# Set targer as static library
add_library(${LIB_NAME_UNICODE_CONVERTER} STATIC ${UNICODE_CONVERTER_CPP})
# Add include files .h
target_include_directories(${LIB_NAME_UNICODE_CONVERTER}
PUBLIC
${UNICODE_CONVERTER_DIR}
PRIVATE
${UNICODE_CONVERTER_DIR}icubuilds-mac/icu/
${UNICODE_CONVERTER_DIR}icubuilds-mac/icu/unicode/
${UNICODE_CONVERTER_DIR}icubuilds-mac/icu/icu/common/
${UNICODE_CONVERTER_DIR}icubuilds-mac/icu/icu/i18n/
${UNICODE_CONVERTER_DIR}icubuilds-mac/icu/icu/io/
${UNICODE_CONVERTER_DIR}icubuilds-mac/icu/icu/layout/
${UNICODE_CONVERTER_DIR}icubuilds-mac/icu/icu/stubdata/
)
# Set target definition
target_compile_definitions(${LIB_NAME_UNICODE_CONVERTER}
PRIVATE
UNICODECONVERTER_USE_DYNAMIC_LIBRARY
U_COMMON_IMPLEMENTATION
U_I18N_IMPLEMENTATION
U_IO_IMPLEMENTATION
)

View File

@ -0,0 +1,46 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED XLSX_SERIALIZE_DIR)
message(FATAL_ERROR "You must set path in \"XLSX_SERIALIZE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_XLSX_SERIALIZE)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_XLSX_SERIALIZE\"!")
endif()
# Library source .h .cpp
file(GLOB XLSX_SERIALIZE_CPP
${XLSX_SERIALIZE_DIR}Common/*.cpp
${XLSX_SERIALIZE_DIR}Reader/*.cpp
${XLSX_SERIALIZE_DIR}Writer/*.cpp
)
# Set targer as static library
add_library(${LIB_NAME_XLSX_SERIALIZE} STATIC ${XLSX_SERIALIZE_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_XLSX_SERIALIZE}
PUBLIC
${LIB_NAME_FONT_ENGINE}
)
# Add include files .h
target_include_directories(${LIB_NAME_XLSX_SERIALIZE}
PUBLIC
${XLSX_SERIALIZE_DIR}Common/
${XLSX_SERIALIZE_DIR}Reader/
${XLSX_SERIALIZE_DIR}Writer/
${XLSX_SERIALIZE_DIR}Common/1/
)
# Set target definition
target_compile_definitions(${LIB_NAME_XLSX_SERIALIZE}
PRIVATE
_UNICODE
UNICODE
DONT_WRITE_EMBEDDED_FONTS
)

View File

@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED CPU_FEATURE_DIR)
message(FATAL_ERROR "You must set path in \"CPU_FEATURE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_CPUFEATURE)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_CPUFEATURE\"!")
endif()
# Library source .h .cpp
file(GLOB CPUFEATURE_CPP ${CPU_FEATURE_DIR}/*.c)
# Set targer as static library
add_library(${LIB_NAME_CPUFEATURE} STATIC ${CPUFEATURE_CPP})
# Add include files .h
target_include_directories(${LIB_NAME_CPUFEATURE} INTERFACE ${CPU_FEATURE_DIR})

View File

@ -0,0 +1,28 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED AGG_DIR)
message(FATAL_ERROR "You must set path in \"AGG_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_AGG)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_AGG\"!")
endif()
# Library source .h .cpp
file(GLOB AGG_CPP ${AGG_DIR}src/*.cpp)
# Set targer as static library
add_library(${LIB_NAME_AGG} STATIC ${AGG_CPP})
# Add include files .h
target_include_directories(${LIB_NAME_AGG} PUBLIC ${AGG_DIR}include/)
# Add compile options
target_compile_options(${LIB_NAME_AGG}
PUBLIC
-Wno-register
)

View File

@ -0,0 +1,30 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED COMMON_EDITOR_DIR)
message(FATAL_ERROR "You must set path in \"COMMON_EDITOR_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_EDITOR_COMMON)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_EDITOR_COMMON\"!")
endif()
# Library source .h .cpp
file(GLOB COMMON_EDITOR_CPP ${COMMON_EDITOR_DIR}*.cpp)
# Set targer as static library
add_library(${LIB_NAME_EDITOR_COMMON} STATIC ${COMMON_EDITOR_CPP})
# Add include files .h
target_include_directories(${LIB_NAME_EDITOR_COMMON}
INTERFACE
${COMMON_EDITOR_DIR}../
)
# Set target definition
target_compile_definitions(${LIB_NAME_EDITOR_COMMON}
PRIVATE _LINUX
)

View File

@ -0,0 +1,66 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED CXIMAGE_DIR)
message(FATAL_ERROR "You must set path in \"CXIMAGE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_CXIMAGE)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_CXIMAGE\"!")
endif()
# Delete source file .h .cpp
file(REMOVE ${CXIMAGE_DIR}stdint.h)
file(GLOB CXIMAGE_CPP
${CXIMAGE_DIR}*.cpp
${WORKAROUND_DIR}/swab/*.c
)
# Add dependency project
add_subdirectory(${SRC_DIR}/core/desktopeditor/cximage/jpeg ${BUILD_DIR}/core/desktopeditor/cximage/jpeg)
add_subdirectory(${SRC_DIR}/core/desktopeditor/cximage/png ${BUILD_DIR}/core/desktopeditor/cximage/png)
add_subdirectory(${SRC_DIR}/core/desktopeditor/cximage/tiff ${BUILD_DIR}/core/desktopeditor/cximage/tiff)
add_subdirectory(${SRC_DIR}/core/desktopeditor/cximage/mng ${BUILD_DIR}/core/desktopeditor/cximage/mng)
add_subdirectory(${SRC_DIR}/core/desktopeditor/cximage/raw ${BUILD_DIR}/core/desktopeditor/cximage/raw)
add_subdirectory(${SRC_DIR}/core/desktopeditor/cximage/libpsd ${BUILD_DIR}/core/desktopeditor/cximage/libpsd)
add_subdirectory(${SRC_DIR}/core/desktopeditor/cximage/zlib ${BUILD_DIR}/core/desktopeditor/cximage/zlib)
add_subdirectory(${SRC_DIR}/core/desktopeditor/cximage/jasper ${BUILD_DIR}/core/desktopeditor/cximage/jasper)
# Set targer as static library
add_library(${LIB_NAME_CXIMAGE} STATIC ${CXIMAGE_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_CXIMAGE}
PUBLIC
${LIB_NAME_JPEG}
${LIB_NAME_PNG}
${LIB_NAME_JASPER}
${LIB_NAME_TIFF}
${LIB_NAME_MNG}
${LIB_NAME_RAW}
${LIB_NAME_PSD}
${LIB_NAME_ZLIB}
)
# Add include files .h
target_include_directories(${LIB_NAME_CXIMAGE}
PUBLIC
${CXIMAGE_DIR}
${WORKAROUND_DIR}/swab/
)
# Add compile options
target_compile_options(${LIB_NAME_CXIMAGE}
PUBLIC
-Wno-register
)
# Set target definition
target_compile_definitions(${LIB_NAME_CXIMAGE}
PRIVATE
_LINUX
)

View File

@ -0,0 +1,66 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED JASPER_DIR)
message(FATAL_ERROR "You must set path in \"JASPER_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_JASPER)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_JASPER\"!")
endif()
# Library source .h .cpp
file(GLOB JASPER_C
${JASPER_DIR}base/*.c
${JASPER_DIR}bmp/*.c
${JASPER_DIR}jp2/*.c
${JASPER_DIR}jpc/*.c
${JASPER_DIR}jpg/*.c
${JASPER_DIR}jpg/*.c
${JASPER_DIR}mif/*.c
${JASPER_DIR}pgx/*.c
${JASPER_DIR}pnm/*.c
${JASPER_DIR}ras/*.c
)
# Exclude sources
list(REMOVE_ITEM JASPER_C
${JASPER_DIR}jpg/jpg_dummy.c
)
# Set targer as static library
add_library(${LIB_NAME_JASPER} STATIC ${JASPER_C})
# Add dependency library
target_link_libraries(${LIB_NAME_JASPER}
PRIVATE
${LIB_NAME_JPEG}
)
# Add include files .h
target_include_directories(${LIB_NAME_JASPER}
PUBLIC
${JASPER_DIR}include/
${JASPER_DIR}include/jasper/
PRIVATE
${JASPER_DIR}bmp/
${JASPER_DIR}jp2/
${JASPER_DIR}jpc/
${JASPER_DIR}jpg/
${JASPER_DIR}jpg/
${JASPER_DIR}mif/
${JASPER_DIR}pgx/
${JASPER_DIR}pnm/
${JASPER_DIR}ras/
)
# Set target definition
target_compile_definitions(${LIB_NAME_JASPER}
PRIVATE
EXCLUDE_JPG_SUPPORT
HAVE_UNISTD_H _IOS
)

View File

@ -0,0 +1,28 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED JBIG_DIR)
message(FATAL_ERROR "You must set path in \"JBIG_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_JBIG)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_JBIG\"!")
endif()
# Library source .h .cpp
file(GLOB JBIG_C ${JBIG_DIR}*.c)
# Exclude sources
list(REMOVE_ITEM JBIG_C ${JBIG_DIR}tstcodec.c)
# Set targer as static library
add_library(${LIB_NAME_JBIG} STATIC ${JBIG_C})
# Add include files .h
target_include_directories(${LIB_NAME_JBIG}
PUBLIC
${JBIG_DIR}
)

View File

@ -0,0 +1,40 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED JPEG_DIR)
message(FATAL_ERROR "You must set path in \"JPEG_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_JPEG)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_JPEG\"!")
endif()
# Library source .h .cpp
file(GLOB JPEG_C ${JPEG_DIR}*.c)
# Exclude sources
list(REMOVE_ITEM JPEG_C
${JPEG_DIR}jmemdos.c
${JPEG_DIR}jmemmac.c
${JPEG_DIR}jmemnobs.c
${JPEG_DIR}jmemname.c
${JPEG_DIR}example.c
)
# Set targer as static library
add_library(${LIB_NAME_JPEG} STATIC ${JPEG_C})
# Add include files .h
target_include_directories(${LIB_NAME_JPEG}
PUBLIC
${JPEG_DIR}
)
# Add compile options
target_compile_options(${LIB_NAME_JPEG}
PUBLIC
-Wno-format-security
)

View File

@ -0,0 +1,25 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED PSD_DIR)
message(FATAL_ERROR "You must set path in \"PSD_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_PSD)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_PSD\"!")
endif()
# Library source .h .cpp
file(GLOB PSD_C ${PSD_DIR}*.c)
# Set targer as static library
add_library(${LIB_NAME_PSD} STATIC ${PSD_C})
# Add include files .h
target_include_directories(${LIB_NAME_PSD}
PUBLIC
${PSD_DIR}
)

View File

@ -0,0 +1,25 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED MNG_DIR)
message(FATAL_ERROR "You must set path in \"MNG_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_MNG)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_MGN\"!")
endif()
# Library source .h .cpp
file(GLOB MNG_C ${MNG_DIR}*.c)
# Set targer as static library
add_library(${LIB_NAME_MNG} STATIC ${MNG_C})
# Add include files .h
target_include_directories(${LIB_NAME_MNG}
PUBLIC
${MNG_DIR}
)

View File

@ -0,0 +1,31 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED PNG_DIR)
message(FATAL_ERROR "You must set path in \"PNG_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_PNG)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_PNG\"!")
endif()
# Library source .h .cpp
file(GLOB PNG_C ${PNG_DIR}*.c)
# Exclude sources
list(REMOVE_ITEM PNG_C
${PNG_DIR}pngvalid.c
${PNG_DIR}example.c
)
# Set targer as static library
add_library(${LIB_NAME_PNG} STATIC ${PNG_C})
# Add include files .h
target_include_directories(${LIB_NAME_PNG}
PUBLIC
${PNG_DIR}
)

View File

@ -0,0 +1,40 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED WORKAROUND_DIR)
message(FATAL_ERROR "You must set argument \"WORKAROUND_DIR\"")
endif()
# Lib src path
if (NOT DEFINED RAW_DIR)
message(FATAL_ERROR "You must set path in \"RAW_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_RAW)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_RAW\"!")
endif()
# Library source .h .cpp
file(GLOB RAW_C ${RAW_DIR}*.c)
# Exclude sources
list(REMOVE_ITEM RAW_C
${RAW_DIR}dcraw.c
)
# Set targer as static library
add_library(${LIB_NAME_RAW} STATIC ${RAW_C})
# Add include files .h
target_include_directories(${LIB_NAME_RAW}
PUBLIC
${RAW_DIR}
)
# Set target definition
target_compile_definitions(${LIB_NAME_RAW}
PRIVATE _LINUX
)

View File

@ -0,0 +1,41 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED TIFF_DIR)
message(FATAL_ERROR "You must set path in \"TIFF_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_TIFF)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_TIFF\"!")
endif()
# Library source .h .cpp
file(GLOB TIFF_C ${TIFF_DIR}*.c)
# Exclude sources
list(REMOVE_ITEM TIFF_C
${TIFF_DIR}tif_apple.c
${TIFF_DIR}tif_acorn.c
${TIFF_DIR}tif_atari.c
${TIFF_DIR}tif_msdos.c
${TIFF_DIR}tif_win3.c
${TIFF_DIR}tif_win32.c
)
# Set targer as static library
add_library(${LIB_NAME_TIFF} STATIC ${TIFF_C})
# Add include files .h
target_include_directories(${LIB_NAME_TIFF}
PUBLIC
${TIFF_DIR}
)
# Set target definition
target_compile_definitions(${LIB_NAME_TIFF}
PRIVATE
_LINUX
)

View File

@ -0,0 +1,30 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED ZLIB_DIR)
message(FATAL_ERROR "You must set path in \"ZLIB_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_ZLIB)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_ZLIB\"!")
endif()
# Library source .h .cpp
file(GLOB ZLIB_C ${ZLIB_DIR}*.c)
# Exclude sources
list(REMOVE_ITEM ZLIB_C
${ZLIB_DIR}example.c
)
# Set targer as static library
add_library(${LIB_NAME_ZLIB} STATIC ${ZLIB_C})
# Add include files .h
target_include_directories(${LIB_NAME_ZLIB}
PUBLIC
${ZLIB_DIR}
)

View File

@ -0,0 +1,50 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED DOCT_RENDER_DIR)
message(FATAL_ERROR "You must set path in \"DOCT_RENDER_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_DOCT_RENDER)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_DOCT_RENDER\"!")
endif()
# Library source .h .cpp
file(GLOB DOCT_RENDER_CPP
#${DOCT_RENDER_DIR}memorystream.cpp
#${DOCT_RENDER_DIR}nativecontrol.cpp
#${DOCT_RENDER_DIR}doctrenderer.cpp
#${DOCT_RENDER_DIR}docbuilder.cpp
${DOCT_RENDER_DIR}doctrenderer_android.cpp
)
# Set targer as static library
add_library(${LIB_NAME_DOCT_RENDER} STATIC ${DOCT_RENDER_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_DOCT_RENDER}
PUBLIC
${LIB_NAME_FONT_ENGINE}
)
# Add include files .h
target_include_directories(${LIB_NAME_DOCT_RENDER}
PUBLIC
${DOCT_RENDER_DIR}
)
# Set target definition
target_compile_definitions(${LIB_NAME_DOCT_RENDER}
PRIVATE
BUIDLER_OPEN_DOWNLOAD_ENABLED
BUIDLER_OPEN_BASE64_ENABLED
)
# Set target definition
target_compile_options(${LIB_NAME_DOCT_RENDER}
PRIVATE
-Wno-format-security
)

View File

@ -0,0 +1,105 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED FONT_ENGINE_DIR)
message(FATAL_ERROR "You must set path in \"FONT_ENGINE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_FONT_ENGINE)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_FONT_ENGINE\"!")
endif()
# Lib src path
if (NOT DEFINED GRAPHICS_EDITOR_DIR)
message(FATAL_ERROR "You must set path in \"GRAPHICS_EDITOR_DIR\"!")
endif()
# Lib src path
if (NOT DEFINED RASTER_EDITOR_DIR)
message(FATAL_ERROR "You must set path in \"RASTER_EDITOR_DIR\"!")
endif()
# Engine library source .h .cpp
file(GLOB FONT_ENGINE_CPP
${FONT_ENGINE_DIR}*.cpp
${FONT_ENGINE_DIR}fontconverter/*.cpp
)
# Graphics library source .h .cpp
file(GLOB GRAPHICS_CPP
${GRAPHICS_EDITOR_DIR}*.cpp
${GRAPHICS_EDITOR_DIR}pro/*.cpp
)
# Exclude sources
list(REMOVE_ITEM GRAPHICS_CPP
${GRAPHICS_EDITOR_DIR}pro/lepton_lib_all.cpp
${GRAPHICS_EDITOR_DIR}pro/graphics_pri.cpp
)
# Raster library source .h .cpp
file(GLOB RASTER_CPP
${RASTER_EDITOR_DIR}BgraFrame.cpp
${RASTER_EDITOR_DIR}ImageFileFormatChecker.cpp
)
file(GLOB RASTER_JBIG2_CPP ${RASTER_EDITOR_DIR}JBig2/source/*.cpp)
file(GLOB RASTER_JBIG2_ENCODER_CPP ${RASTER_EDITOR_DIR}JBig2/source/Encoder/*.cpp)
file(GLOB RASTER_JBIG2_LEPTON_CPP ${RASTER_EDITOR_DIR}JBig2/source/LeptonLib/*.cpp)
file(GLOB RASTER_JP2_CPP ${RASTER_EDITOR_DIR}Jp2/*.cpp)
file(GLOB RASTER_METAFILE_CPP ${RASTER_EDITOR_DIR}Metafile/MetaFile.cpp)
file(GLOB RASTER_METAFILE_COMMON_CPP ${RASTER_EDITOR_DIR}Metafile/Common/*.cpp)
file(GLOB RASTER_METAFILE_EMF_CPP ${RASTER_EDITOR_DIR}Metafile/Emf/*.cpp)
file(GLOB RASTER_METAFILE_STARVIEW_CPP ${RASTER_EDITOR_DIR}Metafile/StarView/*.cpp)
file(GLOB RASTER_METAFILE_WMF_CPP ${RASTER_EDITOR_DIR}Metafile/Wmf/*.cpp)
## Concatenate with raster resources
set(FONT_ENGINE_CPP ${FONT_ENGINE_CPP}
${GRAPHICS_CPP}
${RASTER_CPP}
${RASTER_JBIG2_CPP}
${RASTER_JBIG2_ENCODER_CPP}
${RASTER_JBIG2_LEPTON_CPP}
${RASTER_JP2_CPP}
${RASTER_METAFILE_CPP}
${RASTER_METAFILE_COMMON_CPP}
${RASTER_METAFILE_EMF_CPP}
${RASTER_METAFILE_STARVIEW_CPP}
${RASTER_METAFILE_WMF_CPP}
)
# Set targer as static library
add_library(${LIB_NAME_FONT_ENGINE}
STATIC
${FONT_ENGINE_CPP}
${WORKAROUND_DIR}/pthread_setcanceltype/pthread_setcanceltype.c
)
# Add dependency library
target_link_libraries(${LIB_NAME_FONT_ENGINE}
PUBLIC
${LIB_NAME_FREETYPES}
${LIB_NAME_AGG}
${LIB_NAME_CXIMAGE}
${LIB_NAME_EDITOR_COMMON}
)
# Add include files .h
target_include_directories(${LIB_NAME_FONT_ENGINE}
PUBLIC
${FONT_ENGINE_DIR}
${FONT_ENGINE_DIR}fontconverter
${GRAPHICS_EDITOR_DIR}
${GRAPHICS_EDITOR_DIR}pro
${WORKAROUND_DIR}/pthread_setcanceltype
)
# Add compile options
target_compile_options(${LIB_NAME_FONT_ENGINE}
PUBLIC
-Wno-register
-Wno-c++11-narrowing
)

View File

@ -0,0 +1,98 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED FREETYPES_DIR)
message(FATAL_ERROR "You must set path in \"FREETYPES_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_FREETYPES)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_FREETYPE\"!")
endif()
# Library source .c
set(FREETYPES_CPP
${FREETYPES_DIR}src/autofit/autofit.c
${FREETYPES_DIR}src/base/ftadvanc.c
${FREETYPES_DIR}src/base/ftbbox.c
${FREETYPES_DIR}src/base/ftbitmap.c
${FREETYPES_DIR}src/base/ftcalc.c
${FREETYPES_DIR}src/base/ftcid.c
${FREETYPES_DIR}src/base/ftdbgmem.c
${FREETYPES_DIR}src/base/ftdebug.c
${FREETYPES_DIR}src/base/ftfstype.c
${FREETYPES_DIR}src/base/ftgasp.c
${FREETYPES_DIR}src/base/ftgloadr.c
${FREETYPES_DIR}src/base/ftglyph.c
${FREETYPES_DIR}src/base/ftgxval.c
${FREETYPES_DIR}src/base/ftinit.c
${FREETYPES_DIR}src/base/ftlcdfil.c
${FREETYPES_DIR}src/base/ftmm.c
${FREETYPES_DIR}src/base/ftobjs.c
${FREETYPES_DIR}src/base/ftotval.c
${FREETYPES_DIR}src/base/ftoutln.c
${FREETYPES_DIR}src/base/ftpatent.c
${FREETYPES_DIR}src/base/ftpfr.c
${FREETYPES_DIR}src/base/ftrfork.c
${FREETYPES_DIR}src/base/ftsnames.c
${FREETYPES_DIR}src/base/ftstream.c
${FREETYPES_DIR}src/base/ftstroke.c
${FREETYPES_DIR}src/base/ftsynth.c
${FREETYPES_DIR}src/base/ftsystem.c
${FREETYPES_DIR}src/base/fttrigon.c
${FREETYPES_DIR}src/base/fttype1.c
${FREETYPES_DIR}src/base/ftutil.c
${FREETYPES_DIR}src/base/ftwinfnt.c
${FREETYPES_DIR}src/base/ftxf86.c
${FREETYPES_DIR}src/bdf/bdf.c
${FREETYPES_DIR}src/bzip2/ftbzip2.c
${FREETYPES_DIR}src/cache/ftcache.c
${FREETYPES_DIR}src/cff/cff.c
${FREETYPES_DIR}src/cid/type1cid.c
${FREETYPES_DIR}src/gzip/ftgzip.c
${FREETYPES_DIR}src/lzw/ftlzw.c
${FREETYPES_DIR}src/pcf/pcf.c
${FREETYPES_DIR}src/pfr/pfr.c
${FREETYPES_DIR}src/psaux/psaux.c
${FREETYPES_DIR}src/pshinter/pshinter.c
${FREETYPES_DIR}src/psnames/psmodule.c
${FREETYPES_DIR}src/raster/raster.c
${FREETYPES_DIR}src/sfnt/sfnt.c
${FREETYPES_DIR}src/smooth/smooth.c
${FREETYPES_DIR}src/truetype/truetype.c
${FREETYPES_DIR}src/type1/type1.c
${FREETYPES_DIR}src/type42/type42.c
${FREETYPES_DIR}src/winfonts/winfnt.c
)
# Set targer as static library
add_library(${LIB_NAME_FREETYPES} STATIC ${FREETYPES_CPP})
# Add include files .h
target_include_directories(${LIB_NAME_FREETYPES}
PUBLIC
${FREETYPES_DIR}include/
PRIVATE
${FREETYPES_DIR}src/truetype/
${FREETYPES_DIR}src/sfnt/
${FREETYPES_DIR}src/autofit/
${FREETYPES_DIR}src/smooth/
${FREETYPES_DIR}src/raster/
${FREETYPES_DIR}src/psaux/
${FREETYPES_DIR}src/psnames/
)
# Set target definition
target_compile_definitions(${LIB_NAME_FREETYPES}
PRIVATE
FT2_BUILD_LIBRARY
)
# Set target definition
target_compile_options(${LIB_NAME_FREETYPES}
PRIVATE
-Wno-register
)

View File

@ -0,0 +1,50 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED XML_EDITOR_DIR)
message(FATAL_ERROR "You must set path in \"XML_EDITOR_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_EDITOR_XML)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_XML\"!")
endif()
# Library source .h .cpp
file(GLOB XML_EDITOR_CPP
${XML_EDITOR_DIR}build/qt/libxml2_all.c
${XML_EDITOR_DIR}build/qt/libxml2_all2.c
${XML_EDITOR_DIR}src/*.cpp
)
# Set targer as static library
add_library(${LIB_NAME_EDITOR_XML} STATIC ${XML_EDITOR_CPP})
# Add include files .h
target_include_directories(${LIB_NAME_EDITOR_XML}
PUBLIC
${XML_EDITOR_DIR}include/
${XML_EDITOR_DIR}build/qt/
${XML_EDITOR_DIR}libxml2/
${XML_EDITOR_DIR}libxml2/include/
${XML_EDITOR_DIR}src/
)
# Set target definition
target_compile_definitions(${LIB_NAME_EDITOR_XML}
PRIVATE
LIBXML_READER_ENABLED
LIBXML_READER_ENABLED
LIBXML_PUSH_ENABLED
LIBXML_HTML_ENABLED
LIBXML_XPATH_ENABLED
LIBXML_OUTPUT_ENABLED
LIBXML_C14N_ENABLED
LIBXML_SAX1_ENABLED
LIBXML_TREE_ENABLED
LIBXML_XPTR_ENABLED
IN_LIBXML
LIBXML_STATIC
)

View File

@ -0,0 +1,62 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED DJVU_DIR)
message(FATAL_ERROR "You must set path in \"DJVU_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_DJVU)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_DJVU\"!")
endif()
# Library source .h .cpp
file(GLOB DJVU_CPP
${WORKAROUND_DIR}/mblen/mblen.c
${DJVU_DIR}DjVu.cpp
${DJVU_DIR}DjVuFileImplementation.cpp
${DJVU_DIR}libdjvu/*.cpp
)
# Set targer as static library
add_library(${LIB_NAME_DJVU} STATIC ${DJVU_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_DJVU}
PUBLIC
${LIB_NAME_FONT_ENGINE}
)
# Add include files .h
target_include_directories(${LIB_NAME_DJVU}
PUBLIC
${DJVU_DIR}
PRIVATE
${DJVU_DIR}libdjvu/
${WORKAROUND_DIR}/mblen/
)
# Set target definition
target_compile_definitions(${LIB_NAME_DJVU}
PRIVATE
_UNICODE
UNICODE
HAVE_UNISTD_H
HAVE_MBSTATE_T
GCONTAINER_NO_MEMBER_TEMPLATES=1
HAS_WCHAR
HAVE_WCHAR_H
UNIX
HAVE_STDINCLUDES
DJVU_USE_DYNAMIC_LIBRARY
)
# Set target definition
target_compile_options(${LIB_NAME_DJVU}
PRIVATE
-Wno-c++11-narrowing
-Wno-format-security
-Wno-register
)

View File

@ -0,0 +1,52 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED DOC_FILE_DIR)
message(FATAL_ERROR "You must set path in \"DOC_FILE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_DOC)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_DOC\"!")
endif()
# Library source .h .cpp
file(GLOB DOC_CPP
${DOC_FILE_DIR}DocFormatLib/DocFormatLib.cpp
${DOC_FILE_DIR}DocFormatLib/Linux/docformatlib_converter.cpp
${DOC_FILE_DIR}DocDocxConverter/EncryptionHeader.cpp
${DOC_FILE_DIR}DocDocxConverter/DrawingPrimitives.cpp
${DOC_FILE_DIR}DocDocxConverter/Spa.cpp
${DOC_FILE_DIR}DocDocxConverter/OleObject.cpp
)
# Set targer as static library
add_library(${LIB_NAME_DOC} STATIC ${DOC_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_DOC}
PUBLIC
${LIB_NAME_FONT_ENGINE}
)
# Add include files .h
target_include_directories(${LIB_NAME_DOC}
PUBLIC
${DOC_FILE_DIR}DocFormatLib/
PRIVATE
${DOC_FILE_DIR}DocFormatLib/Linux/
${DOC_FILE_DIR}Common/
${DOC_FILE_DIR}DocDocxConverter/
${DOC_FILE_DIR}DocDocxConverter/OfficeDrawing/
${DOC_FILE_DIR}DocDocxConverter/OfficeDrawing/Shapetypes/
)
# Set target definition
target_compile_definitions(${LIB_NAME_DOC}
PRIVATE
_UNICODE
UNICODE
DONT_WRITE_EMBEDDED_FONTS
)

View File

@ -0,0 +1,50 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED DOCX_FILE_DIR)
message(FATAL_ERROR "You must set path in \"DOCX_FILE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_DOCX)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_DOCX\"!")
endif()
# Library source .h .cpp
file(GLOB DOCX_CPP
${DOCX_FILE_DIR}DocWrapper/DocxSerializer.cpp
${DOCX_FILE_DIR}DocWrapper/FontProcessor.cpp
${DOCX_FILE_DIR}DocWrapper/XlsxSerializer.cpp
${DOCX_FILE_DIR}DocWrapper/ChartWriter.cpp
${DOCX_FILE_DIR}BinWriter/BinWriters.cpp
${DOCX_FILE_DIR}BinReader/Readers.cpp
${DOCX_FILE_DIR}BinReader/CustormXmlWriter.cpp
)
# Set targer as static library
add_library(${LIB_NAME_DOCX} STATIC ${DOCX_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_DOCX}
PUBLIC
${LIB_NAME_FONT_ENGINE}
)
# Add include files .h
target_include_directories(${LIB_NAME_DOCX}
PUBLIC
${DOCX_FILE_DIR}DocWrapper/
${DOCX_FILE_DIR}BinReader/
${DOCX_FILE_DIR}BinWriter/
)
# Set target definition
target_compile_definitions(${LIB_NAME_DOCX}
PRIVATE
_UNICODE
UNICODE
DONT_WRITE_EMBEDDED_FONTS
SOLUTION_ASCOFFICEDOCXFILE2
)

View File

@ -0,0 +1,74 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED DOCXFORMAT_DIR)
message(FATAL_ERROR "You must set path in \"DOCXFORMAT_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_DOCXFORMAT)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_DOCXFORMAT\"!")
endif()
# Library source .h .cpp
file(GLOB DOCXFORMAT_CPP
${WORKAROUND_DIR}/gcvt/*.c
${DOCXFORMAT_DIR}DocxFormatLib/docxformatlib.cpp
${DOCXFORMAT_DIR}DocxFormatLib/docxformatlib_logic.cpp
${DOCXFORMAT_DIR}Source/Utility/codecvt.cpp
${DOCXFORMAT_DIR}Source/Utility/DateTime.cpp
${DOCXFORMAT_DIR}Source/Utility/TxtFile.cpp
${DOCXFORMAT_DIR}Source/Base/unicode_util.cpp
)
# Set targer as static library
add_library(${LIB_NAME_DOCXFORMAT} STATIC ${DOCXFORMAT_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_DOCXFORMAT}
PUBLIC
${LIB_NAME_FONT_ENGINE}
)
# Add include files .h
target_include_directories(${LIB_NAME_DOCXFORMAT}
PUBLIC
${DOCXFORMAT_DIR}DocxFormatLib/
PRIVATE
${WORKAROUND_DIR}/gcvt/
${DOCXFORMAT_DIR}Source/
${DOCXFORMAT_DIR}Source/Base/
${DOCXFORMAT_DIR}Source/Utility/
${DOCXFORMAT_DIR}Source/DocxFormat/
${DOCXFORMAT_DIR}Source/DocxFormat/Diagram/
${DOCXFORMAT_DIR}Source/DocxFormat/Drawing/
${DOCXFORMAT_DIR}Source/DocxFormat/External/
${DOCXFORMAT_DIR}Source/DocxFormat/Logic/
${DOCXFORMAT_DIR}Source/DocxFormat/Math/
${DOCXFORMAT_DIR}Source/DocxFormat/Media/
${DOCXFORMAT_DIR}Source/DocxFormat/Settings/
${DOCXFORMAT_DIR}Source/XlsxFormat/
${DOCXFORMAT_DIR}Source/XlsxFormat/CalcChain/
${DOCXFORMAT_DIR}Source/XlsxFormat/Chart/
${DOCXFORMAT_DIR}Source/XlsxFormat/Comments/
${DOCXFORMAT_DIR}Source/XlsxFormat/Controls/
${DOCXFORMAT_DIR}Source/XlsxFormat/Drawing/
${DOCXFORMAT_DIR}Source/XlsxFormat/ExternalLinks/
${DOCXFORMAT_DIR}Source/XlsxFormat/Ole/
${DOCXFORMAT_DIR}Source/XlsxFormat/Pivot/
${DOCXFORMAT_DIR}Source/XlsxFormat/SharedStrings/
${DOCXFORMAT_DIR}Source/XlsxFormat/Styles/
${DOCXFORMAT_DIR}Source/XlsxFormat/Table/
${DOCXFORMAT_DIR}Source/XlsxFormat/Workbook/
${DOCXFORMAT_DIR}Source/XlsxFormat/Worksheets/
)
# Set target definition
target_compile_definitions(${LIB_NAME_DOCXFORMAT}
PRIVATE
_UNICODE
UNICODE
DONT_WRITE_EMBEDDED_FONTS
)

View File

@ -0,0 +1,42 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED HTML_FILE_DIR)
message(FATAL_ERROR "You must set path in \"HTML_FILE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_HTML_FILE)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_HTML_FILE\"!")
endif()
# Library source .h .cpp
file(GLOB HTML_FILE_CPP
${HTML_FILE_DIR}*.cpp
)
# Set targer as static library
add_library(${LIB_NAME_HTML_FILE} STATIC ${HTML_FILE_CPP})
# Add include files .h
target_include_directories(${LIB_NAME_HTML_FILE}
PUBLIC
${HTML_FILE_DIR}
)
# Set target definition
target_compile_definitions(${LIB_NAME_HTML_FILE}
PRIVATE
LINUX
HTMLFILE_USE_DYNAMIC_LIBRARY
UNICODECONVERTER_USE_DYNAMIC_LIBRARY
asc_static_link_libstd
)
# Set target definition
target_compile_options(${LIB_NAME_HTML_FILE}
PRIVATE
-Wno-format-security
)

View File

@ -0,0 +1,47 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED HTML_RENDER_DIR)
message(FATAL_ERROR "You must set path in \"HTML_RENDER_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_HTML_RENDER)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_HTML_RENDER\"!")
endif()
# Library source .h .cpp
file(GLOB HTML_RENDER_CPP
${HTML_RENDER_DIR}src/HTMLRenderer3.cpp
${HTML_RENDER_DIR}src/ASCSVGWriter.cpp
)
# Set targer as static library
add_library(${LIB_NAME_HTML_RENDER} STATIC ${HTML_RENDER_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_HTML_RENDER}
PUBLIC
${LIB_NAME_FONT_ENGINE}
)
# Add include files .h
target_include_directories(${LIB_NAME_HTML_RENDER}
PUBLIC
${HTML_RENDER_DIR}src/
${HTML_RENDER_DIR}include/
)
# Set target definition
target_compile_definitions(${LIB_NAME_HTML_RENDER}
PRIVATE
HTMLRENDERER_USE_DYNAMIC_LIBRARY
)
# Set target definition
target_compile_options(${LIB_NAME_HTML_RENDER}
PRIVATE
-Wno-register
)

View File

@ -0,0 +1,61 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED ODF_READER_FILE_DIR)
message(FATAL_ERROR "You must set path in \"ODF_READER_FILE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_ODF_READER)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_ODF_READER\"!")
endif()
# Library source .h .cpp
file(GLOB ODF_CPP
${ODF_READER_FILE_DIR}linux/odffilereaderlib_odf.cpp
${ODF_READER_FILE_DIR}linux/odffilereaderlib_odf_datatypes.cpp
${ODF_READER_FILE_DIR}linux/odffilereaderlib_oox.cpp
${ODF_READER_FILE_DIR}formulasconvert/formulasconvert_oox.cpp
${ODF_READER_FILE_DIR}formulasconvert/formulasconvert_odf.cpp
${ODF_READER_FILE_DIR}src/conversionelement.cpp
${ODF_READER_FILE_DIR}src/xml/attributes.cpp
${ODF_READER_FILE_DIR}src/xml/sax.cpp
${ODF_READER_FILE_DIR}src/xml/sax_xmllite.cpp
${ODF_READER_FILE_DIR}src/xml/utils.cpp
${ODF_READER_FILE_DIR}src/xml/xmlchar.cpp
${ODF_READER_FILE_DIR}src/common/CPColorUtils.cpp
${ODF_READER_FILE_DIR}src/common/CPString.cpp
${ODF_READER_FILE_DIR}src/common/readdocelement.cpp
${ODF_READER_FILE_DIR}src/ConvertOO2OOX.cpp
)
# Set targer as static library
add_library(${LIB_NAME_ODF_READER} STATIC ${ODF_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_ODF_READER}
PRIVATE
${LIB_NAME_DOCXFORMAT}
${LIB_NAME_EDITOR_XML}
)
# Add include files .h
target_include_directories(${LIB_NAME_ODF_READER}
PUBLIC
${ODF_READER_FILE_DIR}include/
${ODF_READER_FILE_DIR}linux/
${ODF_READER_FILE_DIR}formulasconvert/
${ODF_READER_FILE_DIR}src/
${ODF_READER_FILE_DIR}src/xml/
${ODF_READER_FILE_DIR}src/common/
)
# Set target definition
target_compile_definitions(${LIB_NAME_ODF_READER}
PRIVATE
_UNICODE
UNICODE
DONT_WRITE_EMBEDDED_FONTS
)

View File

@ -0,0 +1,66 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED ODF_WRITER_FILE_DIR)
message(FATAL_ERROR "You must set path in \"ODF_WRITER_FILE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_ODF_WRITER)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_ODF_WRITER\"!")
endif()
# Library source .h .cpp
file(GLOB ODF_CPP
${ODF_WRITER_FILE_DIR}linux/odffilewriterlib_odf.cpp
${ODF_WRITER_FILE_DIR}source/Oox2OdfConverter/Converter.cpp
${ODF_WRITER_FILE_DIR}source/Oox2OdfConverter/ConverterChart.cpp
${ODF_WRITER_FILE_DIR}source/Oox2OdfConverter/ConvertVml.cpp
${ODF_WRITER_FILE_DIR}source/Oox2OdfConverter/DocxConverter.cpp
${ODF_WRITER_FILE_DIR}source/Oox2OdfConverter/XlsxConverter.cpp
${ODF_WRITER_FILE_DIR}source/Oox2OdfConverter/ConvertDrawing.cpp
${ODF_WRITER_FILE_DIR}source/Oox2OdfConverter/PptxConverter.cpp
)
# Set targer as static library
add_library(${LIB_NAME_ODF_WRITER} STATIC ${ODF_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_ODF_WRITER}
PUBLIC
${LIB_NAME_FONT_ENGINE}
)
# Add dependency library
target_link_libraries(${LIB_NAME_ODF_WRITER}
PRIVATE
${LIB_NAME_ODF_READER}
)
# Add include files .h
target_include_directories(${LIB_NAME_ODF_WRITER}
PUBLIC
${ODF_WRITER_FILE_DIR}linux/
${ODF_WRITER_FILE_DIR}source/
${ODF_WRITER_FILE_DIR}source/OdfFormat/
${ODF_WRITER_FILE_DIR}source/OdfFormat/Shapes/
${ODF_WRITER_FILE_DIR}source/Oox2OdfConverter/
PRIVATE
${ODF_READER_FILE_DIR}include/
${ODF_READER_FILE_DIR}linux/
${ODF_READER_FILE_DIR}formulasconvert/
${ODF_READER_FILE_DIR}src/
${ODF_READER_FILE_DIR}src/xml/
${ODF_READER_FILE_DIR}src/common/
${ODF_READER_FILE_DIR}src/odf/datatypes
)
# Set target definition
target_compile_definitions(${LIB_NAME_ODF_WRITER}
PRIVATE
_UNICODE
UNICODE
DONT_WRITE_EMBEDDED_FONTS
)

View File

@ -0,0 +1,45 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED PDF_READER_DIR)
message(FATAL_ERROR "You must set path in \"PDF_READER_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_PDF_READER)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_PDF_READER\"!")
endif()
# Library source .h .cpp
file(GLOB PDF_READER_CPP
${PDF_READER_DIR}PdfReader.cpp
${PDF_READER_DIR}Src/*.cpp
)
# Set targer as static library
add_library(${LIB_NAME_PDF_READER} STATIC ${PDF_READER_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_PDF_READER}
PUBLIC
${LIB_NAME_FONT_ENGINE}
)
# Add include files .h
target_include_directories(${LIB_NAME_PDF_READER}
PUBLIC
${PDF_READER_DIR}
PRIVATE
${PDF_READER_DIR}Src/
${PDF_READER_DIR}Resources/
)
# Set target definition
target_compile_options(${LIB_NAME_PDF_READER}
PRIVATE
-Wno-c++11-narrowing
-Wno-format-security
-Wno-register
)

View File

@ -0,0 +1,52 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED PDF_WRITER_DIR)
message(FATAL_ERROR "You must set path in \"PDF_WRITER_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_PDF_WRITER)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_PDF_WRITER\"!")
endif()
# Library source .h .cpp
file(GLOB PDF_WRITER_CPP
${PDF_WRITER_DIR}*.cpp
${PDF_WRITER_DIR}Src/*.cpp
)
# Set targer as static library
add_library(${LIB_NAME_PDF_WRITER} STATIC ${PDF_WRITER_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_PDF_WRITER}
PRIVATE
${LIB_NAME_FREETYPES}
${LIB_NAME_FONT_ENGINE}
${LIB_NAME_UNICODE_CONVERTER}
)
# Add include files .h
target_include_directories(${LIB_NAME_PDF_WRITER}
PUBLIC
${PDF_WRITER_DIR}
PRIVATE
${PDF_WRITER_DIR}Src/
)
# Set target definition
target_compile_definitions(${LIB_NAME_PDF_WRITER}
PRIVATE
PDFWRITER_USE_DYNAMIC_LIBRARY
)
# Set target definition
target_compile_options(${LIB_NAME_PDF_WRITER}
PRIVATE
-Wno-c++11-narrowing
-Wno-format-security
-Wno-register
)

View File

@ -0,0 +1,49 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED PPT_FILE_DIR)
message(FATAL_ERROR "You must set path in \"PPT_FILE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_PPT)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_PPT\"!")
endif()
# Library source .h .cpp
file(GLOB PTT_CPP
${PPT_FILE_DIR}PPTFormatLib/Linux/pptformatlib_logic.cpp
${PPT_FILE_DIR}PPTFormatLib/PPTFormatLib.cpp
)
# Set targer as static library
add_library(${LIB_NAME_PPT} STATIC ${PTT_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_PPT}
PRIVATE
${LIB_NAME_XLS}
${LIB_NAME_DOWNLOADER}
)
# Add include files .h
target_include_directories(${LIB_NAME_PPT}
PUBLIC
${PPT_FILE_DIR}PPTFormatLib/
${PPT_FILE_DIR}PPTFormatLib/Linux/
${PPT_FILE_DIR}PPTFormatLib/Reader/
${PPT_FILE_DIR}PPTFormatLib/Records/
${PPT_FILE_DIR}PPTFormatLib/PPTXWriter/
)
# Set target definition
target_compile_definitions(${LIB_NAME_PPT}
PRIVATE
_UNICODE
_PRESENTATION_WRITER_
_SVG_CONVERT_TO_IMAGE_
UNICODE
DONT_WRITE_EMBEDDED_FONTS
)

View File

@ -0,0 +1,89 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED PPTX_FILE_DIR)
message(FATAL_ERROR "You must set path in \"PPTX_FILE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_PPTX)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_PPTX\"!")
endif()
# Library source .h .cpp
file(GLOB PTTX_CPP
${PPTX_FILE_DIR}ASCOfficeDrawingConverter.cpp
${PPTX_FILE_DIR}ASCOfficePPTXFileRealization.cpp
${PPTX_FILE_DIR}PPTXLib/Linux/PPTXFormatLib/pptxformatlib.cpp
${PPTX_FILE_DIR}PPTXLib/Linux/PPTXFormatLib/pptxformatlib_logic.cpp
${PPTX_FILE_DIR}Editor/Drawing/Shapes/BaseShape/BaseShape.cpp
${PPTX_FILE_DIR}Editor/Drawing/Shapes/BaseShape/PPTShape/PptFormula.cpp
${PPTX_FILE_DIR}Editor/Drawing/Shapes/BaseShape/PPTShape/PptShape.cpp
${PPTX_FILE_DIR}Editor/Drawing/Shapes/BaseShape/PPTXShape/PptxShape.cpp
${PPTX_FILE_DIR}Editor/Drawing/Shapes/BaseShape/PPTXShape/PptxFormula.cpp
${PPTX_FILE_DIR}Editor/BinaryFileReaderWriter.cpp
${PPTX_FILE_DIR}Editor/FontPicker.cpp
${PPTX_FILE_DIR}Editor/Drawing/TextAttributesEx.cpp
${PPTX_FILE_DIR}Editor/Drawing/Elements.cpp
)
# Set targer as static library
add_library(${LIB_NAME_PPTX} STATIC ${PTTX_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_PPTX}
PRIVATE
${LIB_NAME_DOCXFORMAT}
${LIB_NAME_XLS}
${LIB_NAME_HTML_RENDER}
${LIB_NAME_XLSX_SERIALIZE}
)
# Add include files .h
target_include_directories(${LIB_NAME_PPTX}
PUBLIC
${PPTX_FILE_DIR}
${PPTX_FILE_DIR}PPTXLib/Linux/PPTXFormatLib/
${PPTX_FILE_DIR}Editor/
${PPTX_FILE_DIR}Editor/Drawing/
${PPTX_FILE_DIR}Editor/Drawing/Shapes/
${PPTX_FILE_DIR}Editor/Drawing/Shapes/BaseShape/
${PPTX_FILE_DIR}Editor/Drawing/Shapes/BaseShape/PPTShape/
${PPTX_FILE_DIR}Editor/Drawing/Shapes/BaseShape/PPTShape/PPTAutoShapes/
${PPTX_FILE_DIR}Editor/Drawing/Shapes/BaseShape/PPTXShape/
${PPTX_FILE_DIR}Editor/Drawing/Shapes/BaseShape/PPTXShape/OOXMLShapes/
${PPTX_FILE_DIR}PPTXFormat/
${PPTX_FILE_DIR}PPTXFormat/Limit/
${PPTX_FILE_DIR}PPTXFormat/Presentation/
${PPTX_FILE_DIR}PPTXFormat/Theme/
${PPTX_FILE_DIR}PPTXFormat/ViewProps/
${PPTX_FILE_DIR}PPTXFormat/Logic/
${PPTX_FILE_DIR}PPTXFormat/Logic/Bullets/
${PPTX_FILE_DIR}PPTXFormat/Logic/Colors/
${PPTX_FILE_DIR}PPTXFormat/Logic/Effects/
${PPTX_FILE_DIR}PPTXFormat/Logic/Fills/
${PPTX_FILE_DIR}PPTXFormat/Logic/Media/
${PPTX_FILE_DIR}PPTXFormat/Logic/Path2D/
${PPTX_FILE_DIR}PPTXFormat/Logic/Runs/
${PPTX_FILE_DIR}PPTXFormat/Logic/Table/
${PPTX_FILE_DIR}PPTXFormat/Logic/Media/
${PPTX_FILE_DIR}PPTXFormat/Logic/Timing/
${PPTX_FILE_DIR}PPTXFormat/Logic/Transitions/
)
# Add compile options
target_compile_options(${LIB_NAME_PPTX}
PUBLIC
-Wno-format-security
)
# Set target definition
target_compile_definitions(${LIB_NAME_PPTX}
PRIVATE
_UNICODE
UNICODE
DONT_WRITE_EMBEDDED_FONTS
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML
)

View File

@ -0,0 +1,48 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED RTF_FILE_DIR)
message(FATAL_ERROR "You must set path in \"RTF_FILE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_RTF)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_RTF\"!")
endif()
# Library source .h .cpp
file(GLOB RTF_CPP
${RTF_FILE_DIR}RtfFormatLib/Linux/RtfFormatLib.cpp
${RTF_FILE_DIR}RtfFormatLib/Linux/rtfformatlib_source.cpp
${RTF_FILE_DIR}RtfFormatLib/source/DestinationCommand.cpp
${RTF_FILE_DIR}RtfFormatLib/source/ConvertationManager.cpp
)
# Set targer as static library
add_library(${LIB_NAME_RTF} STATIC ${RTF_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_RTF}
PUBLIC
${LIB_NAME_FONT_ENGINE}
)
# Add include files .h
target_include_directories(${LIB_NAME_RTF}
PUBLIC
${RTF_FILE_DIR}RtfFormatLib/Linux/
${RTF_FILE_DIR}source/
${RTF_FILE_DIR}source/Reader/
${RTF_FILE_DIR}source/Writer/
)
# Set target definition
target_compile_definitions(${LIB_NAME_RTF}
PRIVATE
_UNICODE
UNICODE
DONT_WRITE_EMBEDDED_FONTS
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML
)

View File

@ -0,0 +1,49 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED TXT_DIR)
message(FATAL_ERROR "You must set path in \"TXT_FILE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_TXT)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_TXT_FILE\"!")
endif()
# Library source .h .cpp
file(GLOB TXT_CPP
${TXT_DIR}TxtXmlFormatLib/Source/Common/Encoding.cpp
${TXT_DIR}TxtXmlFormatLib/Source/Common/ToString.cpp
${TXT_DIR}TxtXmlFormatLib/Source/TxtFormat/File.cpp
${TXT_DIR}TxtXmlFormatLib/Source/TxtFormat/TxtFile.cpp
${TXT_DIR}TxtXmlFormatLib/Source/TxtXmlFile.cpp
${TXT_DIR}TxtXmlFormatLib/Source/ConvertDocx2Txt.cpp
${TXT_DIR}TxtXmlFormatLib/Source/ConvertTxt2Docx.cpp
)
# Set targer as static library
add_library(${LIB_NAME_TXT} STATIC ${TXT_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_TXT}
PUBLIC
${LIB_NAME_FONT_ENGINE}
)
# Add include files .h
target_include_directories(${LIB_NAME_TXT}
PUBLIC
${TXT_DIR}TxtXmlFormatLib/Source/
${TXT_DIR}TxtXmlFormatLib/Source/Common/
${TXT_DIR}TxtXmlFormatLib/Source/TxtFormat/
)
# Set target definition
target_compile_definitions(${LIB_NAME_TXT}
PRIVATE
_UNICODE
UNICODE
DONT_WRITE_EMBEDDED_FONTS
)

View File

@ -0,0 +1,111 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED XLS_FILE_DIR)
message(FATAL_ERROR "You must set path in \"XLS_FILE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_XLS)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_XLS\"!")
endif()
# Library source .h .cpp
file(GLOB XLS_CPP
${XLS_FILE_DIR}source/linux/xlsformatlib_converter.cpp
${XLS_FILE_DIR}source/linux/xlsformatlib_logic.cpp
${XLS_FILE_DIR}source/XlsFormat/Auxiliary/HelpFunc.cpp
${XLS_FILE_DIR}source/XlsFormat/Binary/CFRecord.cpp
${XLS_FILE_DIR}source/XlsFormat/Binary/CFRecordType.cpp
${XLS_FILE_DIR}source/XlsFormat/Binary/CFStream.cpp
${XLS_FILE_DIR}source/XlsFormat/Binary/CFStreamCacheReader.cpp
${XLS_FILE_DIR}source/XlsFormat/Binary/CFStreamCacheWriter.cpp
${XLS_FILE_DIR}source/XlsFormat/Binary/CompoundFile.cpp
${XLS_FILE_DIR}source/XlsFormat/Crypt/rtl/cipher.cpp
${XLS_FILE_DIR}source/XlsFormat/Crypt/rtl/digest.cpp
${XLS_FILE_DIR}source/XlsFormat/Crypt/BiffDecoder_RCF.cpp
${XLS_FILE_DIR}source/XlsFormat/Crypt/BinaryCodec_RCF.cpp
${XLS_FILE_DIR}source/XlsFormat/Crypt/Decryptor.cpp
${XLS_FILE_DIR}source/XlsFormat/Crypt/RC4Crypt.cpp
${XLS_FILE_DIR}source/XlsFormat/Crypt/XORCrypt.cpp
${XLS_FILE_DIR}source/XlsFormat/Logging/Log.cpp
${XLS_FILE_DIR}source/XlsFormat/Logging/Logger.cpp
${XLS_FILE_DIR}source/Common/utils.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/ConvertShapes/FormulaShape.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/ConvertShapes/CustomShape.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/ConvertShapes/BaseShape_1.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/ConvertXls2Xlsx.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/external_items.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/mediaitems_utils.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/namespaces.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/oox_content_type.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/oox_package.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/oox_rels.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/XlsConverter.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_conversion_context.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_drawing_context.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_drawings.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_hyperlinks.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_output_xml.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_package.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_protection.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_tablecontext.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_textcontext.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_chart_context.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_pivots_context.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_sheet_context.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_external_context.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_activeX_context.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_comments.cpp
${XLS_FILE_DIR}source/XlsXlsxConverter/xlsx_comments_context.cpp
)
# Set targer as static library
add_library(${LIB_NAME_XLS} STATIC ${XLS_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_XLS}
PUBLIC
${LIB_NAME_UNICODE_CONVERTER}
${LIB_NAME_ICONV}
${LIB_NAME_FONT_ENGINE}
)
# Add include files .h
target_include_directories(${LIB_NAME_XLS}
PUBLIC
${XLS_FILE_DIR}source/Common/
${XLS_FILE_DIR}source/XlsFormat/
${XLS_FILE_DIR}source/XlsFormat/Auxiliary/
${XLS_FILE_DIR}source/XlsFormat/Binary/
${XLS_FILE_DIR}source/XlsFormat/Logging/
${XLS_FILE_DIR}source/XlsFormat/Crypt/
${XLS_FILE_DIR}source/XlsFormat/Crypt/rtl/
${XLS_FILE_DIR}source/XlsFormat/Logic/
${XLS_FILE_DIR}source/XlsFormat/Logic/Biff_records/
${XLS_FILE_DIR}source/XlsFormat/Logic/Biff_structures/
${XLS_FILE_DIR}source/XlsFormat/Logic/Biff_structures/ODRAW/
${XLS_FILE_DIR}source/XlsFormat/Logic/Biff_unions/
${XLS_FILE_DIR}source/XlsFormat/Logic/SummaryInformationStream/
${XLS_FILE_DIR}source/XlsFormat/Logic/SummaryInformationStream/Structures/
${XLS_FILE_DIR}source/XlsXlsxConverter/
${XLS_FILE_DIR}source/XlsXlsxConverter/ConvertShapes/
${XLS_FILE_DIR}source/XlsXlsxConverter/ConvertShapes/oldAutoShapes/
)
# Set target definition
target_compile_definitions(${LIB_NAME_XLS}
PRIVATE
#__linux__
_UNICODE
UNICODE
DONT_WRITE_EMBEDDED_FONTS
)
# Set target definition
target_compile_options(${LIB_NAME_XLS}
PRIVATE
-Wno-register
)

View File

@ -0,0 +1,52 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED XPS_FILE_DIR)
message(FATAL_ERROR "You must set path in \"XPS_FILE_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_XPS)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_XPS\"!")
endif()
# Library source .h .cpp
file(GLOB XPS_CPP
${XPS_FILE_DIR}XpsFile.cpp
${XPS_FILE_DIR}XpsLib/ContextState.cpp
${XPS_FILE_DIR}XpsLib/Document.cpp
${XPS_FILE_DIR}XpsLib/Page.cpp
${XPS_FILE_DIR}XpsLib/StaticResources.cpp
${XPS_FILE_DIR}XpsLib/Utils.cpp
${XPS_FILE_DIR}XpsLib/WString.cpp
)
# Set targer as static library
add_library(${LIB_NAME_XPS} STATIC ${XPS_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_XPS}
PUBLIC
${LIB_NAME_FONT_ENGINE}
)
# Add include files .h
target_include_directories(${LIB_NAME_XPS}
PUBLIC
${XPS_FILE_DIR}
${XPS_FILE_DIR}XpsLib/
)
# Set target definition
target_compile_definitions(${LIB_NAME_XPS}
PRIVATE
XPS_USE_DYNAMIC_LIBRARY
)
# Set target definition
target_compile_options(${LIB_NAME_XPS}
PRIVATE
-Wno-register
)

View File

@ -0,0 +1,52 @@
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
# Lib src path
if (NOT DEFINED X2T_DIR)
message(FATAL_ERROR "You must set path in \"X2T_DIR\"!")
endif()
# Lib name
if (NOT DEFINED LIB_NAME_X2T)
message(FATAL_ERROR "You must set library name in \"LIB_NAME_X2T\"!")
endif()
# Library source .h .cpp
file(GLOB X2T_CPP
${X2T_DIR}src/cextracttools.cpp
${X2T_DIR}src/ASCConverters.cpp
${X2T_DIR}../Common/OfficeFileFormatChecker2.cpp
)
# Set targer as static library
add_library(${LIB_NAME_X2T} STATIC ${X2T_CPP})
# Add dependency library
target_link_libraries(${LIB_NAME_X2T}
PUBLIC
${LIB_NAME_FONT_ENGINE}
)
# Add include files .h
target_include_directories(${LIB_NAME_X2T}
PUBLIC
${X2T_DIR}src/
${X2T_DIR}../Common/
)
# Set target definition
target_compile_definitions(${LIB_NAME_X2T}
PUBLIC
_UNICODE
UNICODE
FILTER_FLATE_DECODE_ENABLED
DONT_WRITE_EMBEDDED_FONTS
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML
)
# Set target definition
target_compile_options(${LIB_NAME_X2T}
PRIVATE
-Wno-register
)

View File

@ -0,0 +1,8 @@
#include <stdlib.h>
#include <stdio.h>
#include "gcvt.h"
char* gcvt(double x, int n, char* b) {
sprintf(b, "%.*g", n, x);
return b;
}

View File

@ -0,0 +1,14 @@
#ifndef DOCUMENTS_GCVT_H
#define DOCUMENTS_GCVT_H
#ifdef __cplusplus
extern "C" {
#endif
char* gcvt(double x, int n, char* b);
#ifdef __cplusplus
}
#endif //__cplusplus
#endif //DOCUMENTS_GCVT_H

View File

@ -0,0 +1,8 @@
#include <stdlib.h>
#include <wchar.h>
#include "mblen.h"
int mblen(const char* s, size_t n) {
mbstate_t state = {};
return mbrlen(s, n, &state);
}

View File

@ -0,0 +1,14 @@
#ifndef DOCUMENTSNEW_MBLEN_H
#define DOCUMENTSNEW_MBLEN_H
#ifdef __cplusplus
extern "C" {
#endif
int mblen(const char* s, size_t n);
#ifdef __cplusplus
}
#endif
#endif //DOCUMENTSNEW_MBLEN_H

View File

@ -0,0 +1,6 @@
#include "pthread_setcanceltype.h"
int pthread_setcanceltype(int type, int *oldtype)
{
return 0;
}

View File

@ -0,0 +1,16 @@
#ifndef DOCUMENTS_ANDROID_PTHREAD_SETCANCELTYPE_H
#define DOCUMENTS_ANDROID_PTHREAD_SETCANCELTYPE_H
#ifdef __cplusplus
extern "C" {
#endif
#define PTHREAD_CANCEL_ASYNCHRONOUS 0
int pthread_setcanceltype(int type, int *oldtype);
#ifdef __cplusplus
}
#endif
#endif //DOCUMENTS_ANDROID_PTHREAD_SETCANCELTYPE_H

View File

@ -0,0 +1,12 @@
#include <unistd.h>
#include <byteswap.h>
#include "swab.h"
void swab(void *from, void *to, int n) {
if (n < 0)
return;
for (int i = 0; i < (n/2)*2; i += 2) {
*((uint16_t*)to+i) = bswap_16(*((uint16_t*)from+i));
}
}

View File

@ -0,0 +1,22 @@
/*
* Included only for API >= 28
* <SDK>/ndk-bundle/sysroot/usr/include/unistd.h:296
* #if __ANDROID_API__ >= 28
* void swab(const void* __src, void* __dst, ssize_t __byte_count) __INTRODUCED_IN(28);
* #endif
* */
#ifndef DOCUMENTS_SWAB_H
#define DOCUMENTS_SWAB_H
#ifdef __cplusplus
extern "C" {
#endif
void swab(void *from, void *to, int n);
#ifdef __cplusplus
}
#endif
#endif //DOCUMENTS_SWAB_H

View File

@ -0,0 +1,105 @@
#include <jni.h>
#include <string>
#include <cextracttools.h>
#ifndef DOCUMENTSNEW_JNIUTILS_H
#define DOCUMENTSNEW_JNIUTILS_H
using namespace std;
using namespace NExtractTools;
namespace JniUtils {
unsigned int getLength(const char* str) {
unsigned int lenght = 0;
while (str[lenght++] != '\0');
return lenght - 1;
}
wstring jstringToWString(JNIEnv* env, jstring jstr) {
const char * charPath = env->GetStringUTFChars(jstr, JNI_FALSE);
const int size = env->GetStringLength(jstr);
const wstring wstr(charPath, charPath + size);
return wstr;
}
string jstringToString(JNIEnv* env, jstring jstr) {
const char * charPath = env->GetStringUTFChars(jstr, JNI_FALSE);
const int size = env->GetStringLength(jstr);
const string str(charPath, charPath + size);
return str;
}
wstring charToWString(const char* str) {
if (str != NULL) {
wstring temp(str[0], str[getLength(str)]);
return temp;
}
return NULL;
}
void initInputParams(JNIEnv *env, jobject jInputParams, InputParams &params) {
if (env->IsSameObject(jInputParams, NULL) == JNI_FALSE) {
jclass inputParams = env->GetObjectClass(jInputParams);
jfieldID passwordField = env->GetFieldID(inputParams, "password", "Ljava/lang/String;");
jfieldID delimiterCharField = env->GetFieldID(inputParams, "delimiterChar", "Ljava/lang/String;");
jfieldID delimiterCodeField = env->GetFieldID(inputParams, "delimiterCode", "I");
jfieldID encodingField = env->GetFieldID(inputParams, "encoding", "I");
jfieldID formatFromField = env->GetFieldID(inputParams, "formatFrom", "I");
jfieldID formatToField = env->GetFieldID(inputParams, "formatTo", "I");
jfieldID isNoBase64Field = env->GetFieldID(inputParams, "isNoBase64", "I");
if (passwordField != NULL) {
jstring jPassword = (jstring) env->GetObjectField(jInputParams, passwordField);
if (jPassword != NULL) {
params.m_sPassword = new wstring(jstringToWString(env, jPassword));
}
}
if (delimiterCharField != NULL) {
jstring jDelimiter = (jstring) env->GetObjectField(jInputParams, delimiterCharField);
if (jDelimiter != NULL) {
params.m_sCsvDelimiterChar = new wstring(jstringToWString(env, jDelimiter));
}
}
if (delimiterCodeField != NULL) {
jint jDelimiter = env->GetIntField(jInputParams, delimiterCodeField);
if (jDelimiter != NULL) {
params.m_nCsvDelimiter = new int((int) jDelimiter);
}
}
if (encodingField != NULL) {
jint jEncoding = env->GetIntField(jInputParams, encodingField);
if (jEncoding != NULL) {
params.m_nCsvTxtEncoding = new int((int) jEncoding);
}
}
if (formatFromField != NULL) {
jint jFormat = env->GetIntField(jInputParams, formatFromField);
if (jFormat != NULL) {
params.m_nFormatFrom = new int((int) jFormat);
}
}
if (formatToField != NULL) {
jint jFormat = env->GetIntField(jInputParams, formatToField);
if (jFormat != NULL) {
params.m_nFormatTo = new int((int) jFormat);
}
}
if (isNoBase64Field != NULL) {
jint jIsNoBase64 = env->GetIntField(jInputParams, isNoBase64Field);
if (jIsNoBase64 != NULL) {
params.m_bIsNoBase64 = new bool(jIsNoBase64 != 0);
}
}
}
}
}
#endif //DOCUMENTSNEW_JNIUTILS_H

View File

@ -0,0 +1,259 @@
#include <jni.h>
#include <ASCConverters.h>
#include <cextracttools.h>
#include "JniUtils.h"
using namespace std;
using namespace NExtractTools;
using namespace JniUtils;
extern "C" {
/*
* Test
* */
JNIEXPORT jstring JNICALL Java_com_onlyoffice_core_Core_test(JNIEnv* env, jobject thiz, jstring jstr) {
string newStr = jstringToString(env, jstr);
newStr.append("\nJNI changes!");
return env->NewStringUTF(newStr.c_str());
}
/*
* Docs
* */
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_docx2doctbin(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo,
jstring temp, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
return docx2doct_bin(wFrom, wTo, wTemp, params);
}
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_docx2doct(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo,
jstring temp, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
return docx2doct(wFrom, wTo, wTemp, params);
}
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_doctbin2docx(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo, jstring temp,
jboolean isFromChanges, jstring theme, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
wstring wTheme = jstringToWString(env, theme);
return doct_bin2docx(wFrom, wTo, wTemp, isFromChanges, wTheme, params);
}
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_doct2docx(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo, jstring temp,
jboolean isFromChanges, jstring theme, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
wstring wTheme = jstringToWString(env, theme);
return doct2docx(wFrom, wTo, wTemp, isFromChanges, wTheme, params);
}
/*
* Xls
* */
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_xlsx2xlstbin(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo,
jstring temp, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
return xlsx2xlst_bin(wFrom, wTo, wTemp, params);
}
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_xlsx2xlst(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo,
jstring temp, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
return xlsx2xlst(wFrom, wTo, wTemp, params);
}
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_xlstbin2xlsx(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo, jstring temp,
jboolean isFromChanges, jstring theme, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
wstring wTheme = jstringToWString(env, theme);
return xlst_bin2xlsx(wFrom, wTo, wTemp, isFromChanges, wTheme, params);
}
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_xlst2xlsx(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo, jstring temp,
jboolean isFromChanges, jstring theme, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
wstring wTheme = jstringToWString(env, theme);
return xlst2xlsx(wFrom, wTo, wTemp, isFromChanges, wTheme, params);
}
/*
* Ppt
* */
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_pptx2ppttbin(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo,
jstring temp, jobject jInputParams) {
InputParams params;
initInputParams(env, jInputParams, params);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
return pptx2pptt_bin(wFrom, wTo, wTemp, params);
}
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_pptx2pptt(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo,
jstring temp, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
return pptx2pptt(wFrom, wTo, wTemp, params);
}
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_ppttbin2pptx(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo, jstring temp,
jboolean isFromChanges, jstring theme, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
wstring wTheme = jstringToWString(env, theme);
return pptt_bin2pptx(wFrom, wTo, wTemp, isFromChanges, wTheme, params);
}
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_pptt2pptx(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo, jstring temp,
jboolean isFromChanges, jstring theme, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
wstring wTheme = jstringToWString(env, theme);
return pptt2pptx(wFrom, wTo, wTemp, isFromChanges, wTheme, params);
}
/*
* Csv
* */
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_csv2xlst(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo,
jstring temp, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
params.m_nFormatFrom = new int(AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
return csv2xlst(wFrom, wTo, wTemp, params);
}
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_csv2xlsx(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo,
jstring temp, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
params.m_nFormatFrom = new int(AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
return csv2xlsx(wFrom, wTo, wTemp, params);
}
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_csv2xlstbin(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo, jobject jInputParams) {
InputParams params;
initInputParams(env, jInputParams, params);
params.m_nFormatFrom = new int(AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
return csv2xlst_bin(wFrom, wTo, params);
}
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_xlst2csv(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo,
jstring temp, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
return xlst2csv(wFrom, wTo, wTemp, params);
}
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_xlsx2csv(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo,
jstring temp, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
return xlsx2csv(wFrom, wTo, wTemp, params);
}
/*
* Txt
* */
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_txt2doctbin(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo,
jstring temp, jobject jInputParams)
{
InputParams params;
initInputParams(env, jInputParams, params);
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
wstring wTemp = jstringToWString(env, temp);
return txt2doct_bin(wFrom, wTo, wTemp, params);
}
/*
* Zip
* */
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_dir2zip(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo) {
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
return dir2zip(jstringToWString(env, jFrom), jstringToWString(env, jTo));
}
JNIEXPORT jint JNICALL Java_com_onlyoffice_core_Core_zip2dir(JNIEnv* env, jobject thiz, jstring jFrom, jstring jTo) {
wstring wFrom = jstringToWString(env, jFrom);
wstring wTo = jstringToWString(env, jTo);
return zip2dir(jstringToWString(env, jFrom), jstringToWString(env, jTo));
}
}

View File

@ -0,0 +1,420 @@
package com.onlyoffice.core;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresPermission;
import java.io.File;
import static android.Manifest.permission.READ_EXTERNAL_STORAGE;
import static android.Manifest.permission.WRITE_EXTERNAL_STORAGE;
public class Core {
static {
System.loadLibrary(BuildConfig.LIB_CORE);
}
private static class Paths {
public String from;
public String to;
public String cache;
}
public static class InputParams {
public static final int TCSVD_NONE = 0;
public static final int TCSVD_TAB = 1;
public static final int TCSVD_SEMICOLON = 2;
public static final int TCSVD_COLON = 3;
public static final int TCSVD_COMMA = 4;
public static final int TCSVD_SPACE = 5;
private String password;
private String delimiterChar;
private int delimiterCode = TCSVD_NONE;
private int encoding;
private int formatFrom;
private int formatTo;
private int isNoBase64 = 1;
}
public static native String test(String str);
/*
* Native DOCX
* */
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int docx2doctbin(@NonNull String from, @NonNull String to, @NonNull String buf, @Nullable InputParams inputParams);
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int docx2doct(@NonNull String from, @NonNull String to, @NonNull String buf, @Nullable InputParams inputParams);
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int doctbin2docx(@NonNull String from, @NonNull String to, @NonNull String buf, boolean isFromChanges,
@Nullable String theme, @Nullable InputParams inputParams);
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int doct2docx(@NonNull String from, @NonNull String to, @NonNull String buf, boolean isFromChanges,
@Nullable String theme, @Nullable InputParams inputParams);
/*
* Native XLSX
* */
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int xlsx2xlstbin(@NonNull String from, @NonNull String to, @NonNull String buf, @Nullable InputParams inputParams);
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int xlsx2xlst(@NonNull String from, @NonNull String to, @NonNull String buf, @Nullable InputParams inputParams);
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int xlstbin2xlsx(@NonNull String from, @NonNull String to, @NonNull String buf, boolean isFromChanges,
@Nullable String theme, @Nullable InputParams inputParams);
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int xlst2xlsx(@NonNull String from, @NonNull String to, @NonNull String buf, boolean isFromChanges,
@Nullable String theme, @Nullable InputParams inputParams);
/*
* Native PPTX
* */
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int pptx2ppttbin(@NonNull String from, @NonNull String to, @NonNull String buf, @Nullable InputParams inputParams);
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int pptx2pptt(@NonNull String from, @NonNull String to, @NonNull String buf, @Nullable InputParams inputParams);
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int ppttbin2pptx(@NonNull String from, @NonNull String to, @NonNull String buf, boolean isFromChanges,
@Nullable String theme, @Nullable InputParams inputParams);
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int pptt2pptx(@NonNull String from, @NonNull String to, @NonNull String buf, boolean isFromChanges,
@Nullable String theme, @Nullable InputParams inputParams);
/*
* Native CSV
* */
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int csv2xlst(@NonNull String from, @NonNull String to, @NonNull String buf, @Nullable InputParams inputParams);
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int csv2xlsx(@NonNull String from, @NonNull String to, @NonNull String buf, @Nullable InputParams inputParams);
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int csv2xlstbin(@NonNull String from, @NonNull String to, @Nullable InputParams inputParams);
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int xlst2csv(@NonNull String from, @NonNull String to, @NonNull String buf, @Nullable InputParams inputParams);
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int xlsx2csv(@NonNull String from, @NonNull String to, @NonNull String buf, @Nullable InputParams inputParams);
/*
* Native TXT
* */
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int txt2doctbin(@NonNull String from, @NonNull String to, @NonNull String buf, @Nullable InputParams inputParams);
/*
* Native ZIP
* */
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int dir2zip(String from, String to);
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static native int zip2dir(String from, String to);
private static String deleteExtensionFromPath(final String path) {
try {
return path.substring(0, path.lastIndexOf("."));
} catch (RuntimeException e) {
return "";
}
}
private static boolean createPathIfNotExist(@NonNull String path) {
final File file = new File(path);
return (file.isDirectory() && file.exists()) || file.mkdirs();
}
@Nullable
private static Paths getPaths(@NonNull Context context, @NonNull String from, @Nullable String to,
@NonNull String cacheDir, @NonNull String extension) {
Paths paths = null;
final String cache = context.getExternalCacheDir().getAbsolutePath() + "/" + cacheDir;
if (createPathIfNotExist(cache)) {
final String newTo = (to == null)? deleteExtensionFromPath(from) + extension : to;
paths = new Paths();
paths.from = from;
paths.to = newTo;
paths.cache = cache;
}
return paths;
}
@RequiresPermission(WRITE_EXTERNAL_STORAGE)
public static void deleteFolder(File fileOrDirectory) {
if (fileOrDirectory.isDirectory()) {
for (File child : fileOrDirectory.listFiles()) {
deleteFolder(child);
}
}
fileOrDirectory.delete();
}
/*
* DOCSs
* */
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean docx2doctbin(@NonNull Context context, @NonNull String from, @Nullable String to) {
final Paths paths = getPaths(context, from, to, "docx2docbin", "doc.bin");
boolean isSuccess = false;
if (paths != null) {
isSuccess = docx2doctbin(paths.from, paths.to, paths.cache, null) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean docx2doct(@NonNull Context context, @NonNull String from, @Nullable String to) {
final Paths paths = getPaths(context, from, to, "docx2doct", "doct");
boolean isSuccess = false;
if (paths != null) {
isSuccess = docx2doct(paths.from, paths.to, paths.cache, null) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean doctbin2docx(@NonNull Context context, @NonNull String from, @Nullable String to) {
final Paths paths = getPaths(context, from, to, "doctbin2docx", "docx");
boolean isSuccess = false;
if (paths != null) {
isSuccess = doctbin2docx(paths.from, paths.to, paths.cache, false, "", null) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean doct2docx(@NonNull Context context, @NonNull String from, @Nullable String to) {
final Paths paths = getPaths(context, from, to, "doct2docx", "dox");
boolean isSuccess = false;
if (paths != null) {
isSuccess = doct2docx(paths.from, paths.to, paths.cache, false, "", null) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
/*
* XLSX
* */
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean xlsx2xlstbin(@NonNull Context context, @NonNull String from, @Nullable String to) {
final Paths paths = getPaths(context, from, to, "xlsx2xlstbin", "xlsx.bin");
boolean isSuccess = false;
if (paths != null) {
isSuccess = xlsx2xlstbin(paths.from, paths.to, paths.cache, null) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean xlsx2xlst(@NonNull Context context, @NonNull String from, @Nullable String to) {
final Paths paths = getPaths(context, from, to, "xlsx2xlst", "xlst");
boolean isSuccess = false;
if (paths != null) {
isSuccess = xlsx2xlst(paths.from, paths.to, paths.cache, null) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean xlstbin2xlsx(@NonNull Context context, @NonNull String from, @Nullable String to) {
final Paths paths = getPaths(context, from, to, "xlstbin2xlsx", "xlsx");
boolean isSuccess = false;
if (paths != null) {
isSuccess = xlstbin2xlsx(paths.from, paths.to, paths.cache, false, "", null) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean xlst2xlsx(@NonNull Context context, @NonNull String from, @Nullable String to) {
final Paths paths = getPaths(context, from, to, "xlst2xlsx", "xlsx");
boolean isSuccess = false;
if (paths != null) {
isSuccess = xlst2xlsx(paths.from, paths.to, paths.cache, false, "", null) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
/*
* PPTX
* */
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean pptx2ppttbin(@NonNull Context context, @NonNull String from, @Nullable String to) {
final Paths paths = getPaths(context, from, to, "pptx2ppttbin", "pptt.bin");
boolean isSuccess = false;
if (paths != null) {
isSuccess = pptx2ppttbin(paths.from, paths.to, paths.cache, null) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean pptx2pptt(@NonNull Context context, @NonNull String from, @Nullable String to) {
final Paths paths = getPaths(context, from, to, "pptx2pptt", "pptt");
boolean isSuccess = false;
if (paths != null) {
isSuccess = pptx2pptt(paths.from, paths.to, paths.cache, null) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean ppttbin2pptx(@NonNull Context context, @NonNull String from, @Nullable String to) {
final Paths paths = getPaths(context, from, to, "ppttbin2pptx", "pptx");
boolean isSuccess = false;
if (paths != null) {
isSuccess = ppttbin2pptx(paths.from, paths.to, paths.cache, false, "", null) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean pptt2pptx(@NonNull Context context, @NonNull String from, @Nullable String to) {
final Paths paths = getPaths(context, from, to, "pptt2pptx", "pptx");
boolean isSuccess = false;
if (paths != null) {
isSuccess = pptt2pptx(paths.from, paths.to, paths.cache, false, "", null) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
/*
* CSV
* */
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean csv2xlst(@NonNull Context context, @NonNull String from, @Nullable String to, @NonNull String delimiter) {
final Paths paths = getPaths(context, from, to, "csv2xlst", "xlst");
boolean isSuccess = false;
if (paths != null) {
final InputParams inputParams = new InputParams();
inputParams.delimiterChar = delimiter;
isSuccess = csv2xlst(paths.from, paths.to, paths.cache, inputParams) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean csv2xlsx(@NonNull Context context, @NonNull String from, @Nullable String to, @NonNull String delimiter) {
final Paths paths = getPaths(context, from, to, "csv2xlsx", "xlsx");
boolean isSuccess = false;
if (paths != null) {
final InputParams inputParams = new InputParams();
inputParams.delimiterChar = delimiter;
isSuccess = csv2xlsx(paths.from, paths.to, paths.cache, inputParams) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean csv2xlstbin(@NonNull Context context, @NonNull String from, @Nullable String to, @NonNull String delimiter) {
final Paths paths = getPaths(context, from, to, "csv2xlstbin", "xlst.bin");
boolean isSuccess = false;
if (paths != null) {
final InputParams inputParams = new InputParams();
inputParams.delimiterChar = delimiter;
isSuccess = csv2xlstbin(paths.from, paths.to, inputParams) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean xlst2csv(@NonNull Context context, @NonNull String from, @Nullable String to, @NonNull String delimiter) {
final Paths paths = getPaths(context, from, to, "xlst2csv", "csv");
boolean isSuccess = false;
if (paths != null) {
final InputParams inputParams = new InputParams();
inputParams.delimiterChar = delimiter;
isSuccess = xlst2csv(paths.from, paths.to, paths.cache, inputParams) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean xlsx2csv(@NonNull Context context, @NonNull String from, @Nullable String to, @NonNull String delimiter) {
final Paths paths = getPaths(context, from, to, "xlsx2csv", "csv");
boolean isSuccess = false;
if (paths != null) {
final InputParams inputParams = new InputParams();
inputParams.delimiterChar = delimiter;
isSuccess = xlsx2csv(paths.from, paths.to, paths.cache, inputParams) == 0;
// deleteFolder(new File(paths.cache));
}
return isSuccess;
}
/*
* TXT
* */
@RequiresPermission(allOf = { READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE })
public static boolean txt2doctbin(@NonNull Context context, @NonNull String from, @Nullable String to) {
final Paths paths = getPaths(context, from, to, "txt2doctbin", "doct.bin");
boolean isSuccess = false;
if (paths != null) {
isSuccess = txt2doctbin(paths.from, paths.to, paths.cache, null) == 0;
deleteFolder(new File(paths.cache));
}
return isSuccess;
}
}

View File

@ -0,0 +1,3 @@
<resources>
<string name="app_name">core</string>
</resources>

View File

@ -0,0 +1,145 @@
import java.text.DateFormat
import java.text.SimpleDateFormat
import org.apache.tools.ant.taskdefs.condition.Os
/*
* Create a variable called keystorePropertiesFile, and initialize it to your
* keystore.properties file, in the rootProject folder.
* Example of file content:
* storePassword=password
* keyPassword=password
* keyAlias=AliasInKeyStore
* storeFile=C:/example/MyAndroidKeys.jks
*/
def getKeyStoreProperties(String filePath) {
// Initialize a new Properties() object called keystoreProperties.
def keystoreProperties = new Properties()
// You can place here passwords and path to keystore instead of file properties
keystoreProperties["keyAlias"] = "<YOUR_ALIAS>"
keystoreProperties["keyPassword"] = "<YOUR_PASSWORD>"
keystoreProperties["storeFile"] = "<PATH_TO_KEYSTORE_FILE>"
keystoreProperties["storePassword"] = "<KEYSTORE_PASSWORD>"
// Get file with properties
def keystorePropertiesFile = rootProject.file(filePath)
// File check to exist for success script building
if (keystorePropertiesFile.exists()) {
// Load your keystore.properties file into the keystoreProperties object.
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
} else {
def writer = new FileWriter(keystorePropertiesFile, false)
keystoreProperties.store(writer, "Google keystore file")
}
return keystoreProperties
}
def getBuildTimeMark() {
println "Get time mark..."
def date = new SimpleDateFormat("MMMMM.dd_HH-mm")
return date.format(new Date())
}
def getScriptExtensionOs() {
def scriptExt = Os.isFamily(Os.FAMILY_WINDOWS)? 'bat' : 'sh'
println "Script extension: $scriptExt"
return scriptExt
}
def getShellTypeOs() {
def shellType = Os.isFamily(Os.FAMILY_WINDOWS)? 'cmd' : 'sh'
println "Shell type: $shellType"
return shellType
}
def isUnixOs() {
return Os.isFamily(Os.FAMILY_UNIX);
}
def isWindowsOs() {
return Os.isFamily(Os.FAMILY_WINDOWS);
}
def getPathEnvOs(String path) {
return System.env.PATH + System.getProperty("path.separator") + path
}
def isFolderNotEmptyCheck(String path) {
def file = new File(path)
return file.exists() && file.isDirectory() && file.listFiles().length > 0
}
def getCmdArgsOs(String ... args) {
def argsList = []
if (args.length > 0) {
if (isWindowsOs()) {
argsList.add('cmd')
argsList.add('/c')
}
argsList.addAll(args)
}
println "Concatenated args: $args"
return argsList
}
def getBackSlashExt(String str) {
println "System path separator: $File.separator"
return str.replaceAll("\\\\", "/")
}
def getDirNameExt(String path) {
def countFolders = 0
def nameFolder = ''
file(path).listFiles().each { it ->
if (it.isDirectory()) {
nameFolder = it.getName()
++countFolders
}
}
return countFolders == 1? nameFolder : ''
}
/*
* Add methods/values here for export
* */
ext {
// Global constants
project.ext.SDK_MIN = 21
project.ext.SUPPORT = '27.1.1'
// Extra path
// Args for cmake
project.ext.SRC_CORE = "$rootProject.rootDir/../../../"
project.ext.PATH_TO_NATIVE_BUILDS = getBackSlashExt("$rootProject.projectDir/extra-builds/native")
project.ext.PATH_TO_NATIVE_LIBS = "$project.ext.PATH_TO_NATIVE_BUILDS/libs"
project.ext.PATH_TO_NATIVE_ARCHS = "$project.ext.PATH_TO_NATIVE_BUILDS/libs.tar"
project.ext.PATH_TO_NATIVE_SRC = "$project.ext.PATH_TO_NATIVE_BUILDS/src"
project.ext.PATH_STANDALONE_DEST = "$project.ext.PATH_TO_NATIVE_BUILDS/toolchain"
project.ext.LIBS_PACK_NAME = "libs.tar"
project.ext.LIB_WRAPPER = "wrapper"
project.ext.LIB_CORE = "core"
// ABIs
project.ext.ABI_ARM = 'armeabi-v7a'
project.ext.ABI_ARM_64 = 'arm64-v8a'
project.ext.ABI_x86 = 'x86'
project.ext.ABI_x64 = 'x86_64'
// Global methods
getKeystore = this.&getKeyStoreProperties
getTimeMark = this.&getBuildTimeMark
getScriptExt = this.&getScriptExtensionOs
getShellType = this.&getShellTypeOs
isUnix = this.&isUnixOs
isWindows = this.&isWindowsOs
getCmdArgs = this.&getCmdArgsOs
getPathEnv = this.&getPathEnvOs
isFolderNotEmpty = this.&isFolderNotEmptyCheck
getBackSlash = this.&getBackSlashExt
getDirName = this.&getDirNameExt
}

View File

@ -0,0 +1,161 @@
# ------------------
# Android configurations.
# ------------------
import os ;
local AndroidNDKRoot = [ os.environ AndroidNDKRoot ] ;
local AndroidBinariesPath = [ os.environ AndroidBinariesPath ] ;
# --------------------------------------------------------------------
using clang : armeabiv7a
:
$(AndroidBinariesPath)/clang++
:
<archiver>$(AndroidBinariesPath)/llvm-ar
<compileflags>-fexceptions
<compileflags>-frtti
<compileflags>-ffunction-sections
<compileflags>-funwind-tables
<compileflags>-fstack-protector-strong
<compileflags>-Wno-invalid-command-line-argument
<compileflags>-Wno-unused-command-line-argument
<compileflags>-no-canonical-prefixes
<compileflags>-DANDROID
<compileflags>-Wa,--noexecstack
<compileflags>-Wformat
<compileflags>-Werror=format-security
<compileflags>-DNDEBUG
<compileflags>-O2
<compileflags>-g
<compileflags>-gcc-toolchain
<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/llvm-libc++/include
<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/llvm-libc++abi/include
<compileflags>-I$(AndroidNDKRoot)/sources/android/support/include
<compileflags>$(AndroidNDKRoot)/toolchains/arm-linux-androideabi-4.9/prebuilt/${PlatformOS}-x86_64
<compileflags>-target
<compileflags>armv7-none-linux-androideabi15
<compileflags>-march=armv7-a
<compileflags>-mfloat-abi=softfp
<compileflags>-mfpu=vfpv3-d16
<compileflags>-mthumb
<compileflags>-fpic
<compileflags>-fno-integrated-as
<compileflags>--sysroot
<compileflags>$(AndroidNDKRoot)/sysroot
<compileflags>-isystem
<compileflags>$(AndroidNDKRoot)/sysroot/usr/include/arm-linux-androideabi
<compileflags>-D__ANDROID_API__=15
;
# --------------------------------------------------------------------
using clang : x86
:
$(AndroidBinariesPath)/clang++
:
<archiver>$(AndroidBinariesPath)/llvm-ar
<compileflags>-fexceptions
<compileflags>-frtti
<compileflags>-ffunction-sections
<compileflags>-funwind-tables
<compileflags>-fstack-protector-strong
<compileflags>-Wno-invalid-command-line-argument
<compileflags>-Wno-unused-command-line-argument
<compileflags>-no-canonical-prefixes
<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/llvm-libc++/include
<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/llvm-libc++abi/include
<compileflags>-I$(AndroidNDKRoot)/sources/android/support/include
<compileflags>-DANDROID
<compileflags>-Wa,--noexecstack
<compileflags>-Wformat
<compileflags>-Werror=format-security
<compileflags>-DNDEBUG
<compileflags>-O2
<compileflags>-g
<compileflags>-gcc-toolchain
<compileflags>$(AndroidNDKRoot)/toolchains/x86-4.9/prebuilt/${PlatformOS}-x86_64
<compileflags>-target
<compileflags>i686-none-linux-android
<compileflags>-fPIC
<compileflags>-mstackrealign
<compileflags>--sysroot
<compileflags>$(AndroidNDKRoot)/sysroot
<compileflags>-isystem
<compileflags>$(AndroidNDKRoot)/sysroot/usr/include/i686-linux-android
<compileflags>-D__ANDROID_API__=15
;
# --------------------------------------------------------------------
using clang : arm64v8a
:
$(AndroidBinariesPath)/clang++
:
<archiver>$(AndroidBinariesPath)/llvm-ar
<compileflags>-fexceptions
<compileflags>-frtti
<compileflags>-ffunction-sections
<compileflags>-funwind-tables
<compileflags>-fstack-protector-strong
<compileflags>-Wno-invalid-command-line-argument
<compileflags>-Wno-unused-command-line-argument
<compileflags>-no-canonical-prefixes
<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/llvm-libc++/include
<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/llvm-libc++abi/include
<compileflags>-I$(AndroidNDKRoot)/sources/android/support/include
<compileflags>-DANDROID
<compileflags>-Wa,--noexecstack
<compileflags>-Wformat
<compileflags>-Werror=format-security
<compileflags>-DNDEBUG
<compileflags>-O2
<compileflags>-g
<compileflags>-gcc-toolchain
<compileflags>$(AndroidNDKRoot)/toolchains/aarch64-linux-android-4.9/prebuilt/${PlatformOS}-x86_64
<compileflags>-target
<compileflags>aarch64-none-linux-android
<compileflags>-fpic
<compileflags>--sysroot
<compileflags>$(AndroidNDKRoot)/sysroot
<compileflags>-isystem
<compileflags>$(AndroidNDKRoot)/sysroot/usr/include/aarch64-linux-android
<compileflags>-D__ANDROID_API__=21
;
# --------------------------------------------------------------------
using clang : x8664
:
$(AndroidBinariesPath)/clang++
:
<archiver>$(AndroidBinariesPath)/llvm-ar
<compileflags>-fexceptions
<compileflags>-frtti
<compileflags>-ffunction-sections
<compileflags>-funwind-tables
<compileflags>-fstack-protector-strong
<compileflags>-Wno-invalid-command-line-argument
<compileflags>-Wno-unused-command-line-argument
<compileflags>-no-canonical-prefixes
<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/llvm-libc++/include
<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/llvm-libc++abi/include
<compileflags>-I$(AndroidNDKRoot)/sources/android/support/include
<compileflags>-DANDROID
<compileflags>-Wa,--noexecstack
<compileflags>-Wformat
<compileflags>-Werror=format-security
<compileflags>-DNDEBUG
<compileflags>-O2
<compileflags>-g
<compileflags>-gcc-toolchain
<compileflags>$(AndroidNDKRoot)/toolchains/x86_64-4.9/prebuilt/${PlatformOS}-x86_64
<compileflags>-target
<compileflags>x86_64-none-linux-android
<compileflags>-fPIC
<compileflags>--sysroot
<compileflags>$(AndroidNDKRoot)/sysroot
<compileflags>-isystem
<compileflags>$(AndroidNDKRoot)/sysroot/usr/include/x86_64-linux-android
<compileflags>-D__ANDROID_API__=21
;

Some files were not shown because too many files have changed in this diff Show More