mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Compare commits
54 Commits
v5.2.4.65
...
core-linux
| Author | SHA1 | Date | |
|---|---|---|---|
| 8985395ef1 | |||
| f4d72572c0 | |||
| bc319bddbf | |||
| 8625e93ac5 | |||
| 1493e4a949 | |||
| 85bf4b8fac | |||
| b1b911b538 | |||
| 2192bff46b | |||
| e4e6acd1bc | |||
| 7418b2327a | |||
| 18d610e3e0 | |||
| 4e81420eed | |||
| e26f836da7 | |||
| 538e477818 | |||
| b212e878c6 | |||
| 05694d13f3 | |||
| 1dd72c99a2 | |||
| 4b73e58693 | |||
| bee4f57dd3 | |||
| 142f9f57a3 | |||
| 28346c4571 | |||
| 9810087ee1 | |||
| 2b8e1456c2 | |||
| 49723e648a | |||
| b0a2104b21 | |||
| e4986f4202 | |||
| bd1dc5a7b6 | |||
| 1ccbe323f4 | |||
| 3811169415 | |||
| 2871769479 | |||
| acdce1edb9 | |||
| 67a40a5fc4 | |||
| 67cd654785 | |||
| 3816162555 | |||
| d8121d1a12 | |||
| a76bf57051 | |||
| 97b92cf75c | |||
| 506de8e9e1 | |||
| 677e3e49e0 | |||
| 02c84d107b | |||
| 49cd76d0f3 | |||
| 26f32dd511 | |||
| 395e54cf76 | |||
| 40476e7555 | |||
| 04f06c23a1 | |||
| a9a635747a | |||
| 4027a0de25 | |||
| f4fa754ce4 | |||
| 7d88a91fcc | |||
| 069b12839f | |||
| aa609336ca | |||
| 452917f213 | |||
| 5b5ccdc9be | |||
| adf7ca65ea |
@ -52,6 +52,7 @@
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
#include "../../DesktopEditor/common/Types.h"
|
||||
#include "../../Common/DocxFormat/Source/Base/unicode_util.h"
|
||||
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
|
||||
@ -217,7 +217,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
unsigned char* m_Data;
|
||||
unsigned char* m_Data;
|
||||
unsigned long m_Size;
|
||||
unsigned long m_Position;
|
||||
bool bMemoryCopy;
|
||||
|
||||
@ -42,15 +42,15 @@ class SectPr
|
||||
{
|
||||
public:
|
||||
std::wstring sHeaderFooterReference;
|
||||
double W;
|
||||
double H;
|
||||
long W;
|
||||
long H;
|
||||
BYTE cOrientation;
|
||||
double Left;
|
||||
double Top;
|
||||
double Right;
|
||||
double Bottom;
|
||||
double Header;
|
||||
double Footer;
|
||||
long Left;
|
||||
long Top;
|
||||
long Right;
|
||||
long Bottom;
|
||||
long Header;
|
||||
long Footer;
|
||||
bool TitlePg;
|
||||
bool EvenAndOddHeaders;
|
||||
BYTE SectionType;
|
||||
@ -61,6 +61,13 @@ public:
|
||||
std::wstring footnotePr;
|
||||
std::wstring endnotePr;
|
||||
|
||||
bool bW;
|
||||
bool bH;
|
||||
bool bOrientation;
|
||||
bool bLeft;
|
||||
bool bTop;
|
||||
bool bRight;
|
||||
bool bBottom;
|
||||
bool bHeader;
|
||||
bool bFooter;
|
||||
bool bTitlePg;
|
||||
@ -69,18 +76,16 @@ public:
|
||||
bool bPageNumStart;
|
||||
SectPr()
|
||||
{
|
||||
W = Page_Width;
|
||||
H = Page_Height;
|
||||
cOrientation = orientation_Portrait;
|
||||
Left = 30;
|
||||
Top = 20;
|
||||
Right = 15;
|
||||
Bottom = 20;
|
||||
Header = 12.5;
|
||||
Footer = 12.5;
|
||||
sHeaderFooterReference = _T("");
|
||||
cols = _T("<w:cols w:space=\"708\"/>");
|
||||
|
||||
bW = false;
|
||||
bH = false;
|
||||
bOrientation = false;
|
||||
bLeft = false;
|
||||
bTop = false;
|
||||
bRight = false;
|
||||
bBottom = false;
|
||||
bHeader = false;
|
||||
bFooter = false;
|
||||
bTitlePg = false;
|
||||
@ -91,14 +96,6 @@ public:
|
||||
std::wstring Write()
|
||||
{
|
||||
std::wstring sRes = _T("");
|
||||
long nWidth = SerializeCommon::Round(W * g_dKoef_mm_to_twips);
|
||||
long nHeight = SerializeCommon::Round(H * g_dKoef_mm_to_twips);
|
||||
long nMLeft = SerializeCommon::Round(Left * g_dKoef_mm_to_twips);
|
||||
long nMTop = SerializeCommon::Round(Top * g_dKoef_mm_to_twips);
|
||||
long nMRight = SerializeCommon::Round(Right * g_dKoef_mm_to_twips);
|
||||
long nMBottom = SerializeCommon::Round(Bottom * g_dKoef_mm_to_twips);
|
||||
long nMHeader = SerializeCommon::Round(Header * g_dKoef_mm_to_twips);
|
||||
long nMFooter = SerializeCommon::Round(Footer * g_dKoef_mm_to_twips);
|
||||
|
||||
if(!sHeaderFooterReference.empty())
|
||||
sRes += sHeaderFooterReference;
|
||||
@ -120,19 +117,41 @@ public:
|
||||
}
|
||||
sRes += L"<w:type w:val=\"" + sType + L"\"/>";
|
||||
}
|
||||
sRes += L"<w:pgSz w:w=\"" + std::to_wstring(nWidth) + L"\" w:h=\"" + std::to_wstring(nHeight) + L"\"";
|
||||
if(orientation_Portrait != cOrientation)
|
||||
sRes += L" w:orient=\"landscape\"";
|
||||
sRes += L"/>";
|
||||
if((bW && bH) || bOrientation)
|
||||
{
|
||||
sRes += L"<w:pgSz";
|
||||
if(bW && bH)
|
||||
{
|
||||
sRes += L" w:w=\"" + std::to_wstring(W) + L"\" w:h=\"" + std::to_wstring(H) + L"\"";
|
||||
}
|
||||
if(bOrientation)
|
||||
{
|
||||
if(orientation_Portrait != cOrientation)
|
||||
sRes += L" w:orient=\"landscape\"";
|
||||
else
|
||||
sRes += L" w:orient=\"portrait\"";
|
||||
}
|
||||
|
||||
sRes += L"<w:pgMar w:top=\"" + std::to_wstring(nMTop) + L"\" w:right=\"" + std::to_wstring(nMRight) +
|
||||
L"\" w:bottom=\"" + std::to_wstring(nMBottom) + L"\" w:left=\"" + std::to_wstring(nMLeft) + L"\" w:gutter=\"0\"";
|
||||
sRes += L"/>";
|
||||
}
|
||||
|
||||
if(bHeader)
|
||||
sRes += L" w:header=\"" + std::to_wstring(nMHeader) + L"\"";
|
||||
if(bFooter)
|
||||
sRes += L" w:footer=\"" + std::to_wstring(nMFooter) + L"\"";
|
||||
sRes += L"/>";
|
||||
if(bLeft || bTop || bRight || bBottom || bHeader || bFooter)
|
||||
{
|
||||
sRes += L"<w:pgMar";
|
||||
if(bTop)
|
||||
sRes += L" w:top=\"" + std::to_wstring(Top) + L"\"";
|
||||
if(bRight)
|
||||
sRes += L" w:right=\"" + std::to_wstring(Right) + L"\"";
|
||||
if(bBottom)
|
||||
sRes += L" w:bottom=\"" + std::to_wstring(Bottom) + L"\"";
|
||||
if(bLeft)
|
||||
sRes += L" w:left=\"" + std::to_wstring(Left) + L"\"";
|
||||
if(bHeader)
|
||||
sRes += L" w:header=\"" + std::to_wstring(Header) + L"\"";
|
||||
if(bFooter)
|
||||
sRes += L" w:footer=\"" + std::to_wstring(Footer) + L"\"";
|
||||
sRes += L" w:gutter=\"0\"/>";
|
||||
}
|
||||
if(!pgBorders.empty())
|
||||
sRes += pgBorders;
|
||||
|
||||
@ -245,6 +264,7 @@ class Spacing
|
||||
public:
|
||||
bool bLineRule;
|
||||
bool bLine;
|
||||
bool bLineTwips;
|
||||
bool bAfter;
|
||||
bool bBefore;
|
||||
bool bAfterAuto;
|
||||
@ -252,14 +272,16 @@ public:
|
||||
|
||||
BYTE LineRule;
|
||||
double Line;
|
||||
double After;
|
||||
double Before;
|
||||
long LineTwips;
|
||||
long After;
|
||||
long Before;
|
||||
bool AfterAuto;
|
||||
bool BeforeAuto;
|
||||
Spacing()
|
||||
{
|
||||
bLineRule = false;
|
||||
bLine = false;
|
||||
bLineTwips = false;
|
||||
bAfter = false;
|
||||
bBefore = false;
|
||||
bAfterAuto = false;
|
||||
@ -335,10 +357,48 @@ public:
|
||||
sShd += L"<w:shd";
|
||||
if(bValue)
|
||||
{
|
||||
if(shd_Nil == Value)
|
||||
sShd += L" w:val=\"nil\"";
|
||||
else
|
||||
sShd += L" w:val=\"clear\"";
|
||||
switch(Value)
|
||||
{
|
||||
case SimpleTypes::shdClear : sShd += L" w:val=\"clear\""; break;
|
||||
case SimpleTypes::shdDiagCross : sShd += L" w:val=\"diagCross\""; break;
|
||||
case SimpleTypes::shdDiagStripe : sShd += L" w:val=\"diagStripe\""; break;
|
||||
case SimpleTypes::shdHorzCross : sShd += L" w:val=\"horzCross\""; break;
|
||||
case SimpleTypes::shdHorzStripe : sShd += L" w:val=\"horzStripe\""; break;
|
||||
case SimpleTypes::shdNil : sShd += L" w:val=\"nil\""; break;
|
||||
case SimpleTypes::shdPct10 : sShd += L" w:val=\"pct10\""; break;
|
||||
case SimpleTypes::shdPct12 : sShd += L" w:val=\"pct12\""; break;
|
||||
case SimpleTypes::shdPct15 : sShd += L" w:val=\"pct15\""; break;
|
||||
case SimpleTypes::shdPct20 : sShd += L" w:val=\"pct20\""; break;
|
||||
case SimpleTypes::shdPct25 : sShd += L" w:val=\"pct25\""; break;
|
||||
case SimpleTypes::shdPct30 : sShd += L" w:val=\"pct30\""; break;
|
||||
case SimpleTypes::shdPct35 : sShd += L" w:val=\"pct35\""; break;
|
||||
case SimpleTypes::shdPct37 : sShd += L" w:val=\"pct37\""; break;
|
||||
case SimpleTypes::shdPct40 : sShd += L" w:val=\"pct40\""; break;
|
||||
case SimpleTypes::shdPct45 : sShd += L" w:val=\"pct45\""; break;
|
||||
case SimpleTypes::shdPct5 : sShd += L" w:val=\"pct5\""; break;
|
||||
case SimpleTypes::shdPct50 : sShd += L" w:val=\"pct50\""; break;
|
||||
case SimpleTypes::shdPct55 : sShd += L" w:val=\"pct55\""; break;
|
||||
case SimpleTypes::shdPct60 : sShd += L" w:val=\"pct60\""; break;
|
||||
case SimpleTypes::shdPct62 : sShd += L" w:val=\"pct62\""; break;
|
||||
case SimpleTypes::shdPct65 : sShd += L" w:val=\"pct65\""; break;
|
||||
case SimpleTypes::shdPct70 : sShd += L" w:val=\"pct70\""; break;
|
||||
case SimpleTypes::shdPct75 : sShd += L" w:val=\"pct75\""; break;
|
||||
case SimpleTypes::shdPct80 : sShd += L" w:val=\"pct80\""; break;
|
||||
case SimpleTypes::shdPct85 : sShd += L" w:val=\"pct85\""; break;
|
||||
case SimpleTypes::shdPct87 : sShd += L" w:val=\"pct87\""; break;
|
||||
case SimpleTypes::shdPct90 : sShd += L" w:val=\"pct90\""; break;
|
||||
case SimpleTypes::shdPct95 : sShd += L" w:val=\"pct95\""; break;
|
||||
case SimpleTypes::shdReverseDiagStripe : sShd += L" w:val=\"reverseDiagStripe\""; break;
|
||||
case SimpleTypes::shdSolid : sShd += L" w:val=\"solid\""; break;
|
||||
case SimpleTypes::shdThinDiagCross : sShd += L" w:val=\"thinDiagCross\""; break;
|
||||
case SimpleTypes::shdThinDiagStripe : sShd += L" w:val=\"thinDiagStripe\""; break;
|
||||
case SimpleTypes::shdThinHorzCross : sShd += L" w:val=\"thinHorzCross\""; break;
|
||||
case SimpleTypes::shdThinHorzStripe : sShd += L" w:val=\"thinHorzStripe\""; break;
|
||||
case SimpleTypes::shdThinReverseDiagStripe : sShd += L" w:val=\"thinReverseDiagStripe\""; break;
|
||||
case SimpleTypes::shdThinVertStripe : sShd += L" w:val=\"thinVertStripe\""; break;
|
||||
case SimpleTypes::shdVertStripe : sShd += L" w:val=\"vertStripe\""; break;
|
||||
default : sShd += L" w:val=\"solid\""; break;
|
||||
}
|
||||
}
|
||||
sShd += L" w:color=\"auto\"";
|
||||
if(bColor)
|
||||
@ -363,7 +423,7 @@ class Tab
|
||||
{
|
||||
public:
|
||||
BYTE Val;
|
||||
double Pos;
|
||||
long Pos;
|
||||
BYTE Leader;
|
||||
bool bLeader;
|
||||
Tab()
|
||||
@ -397,11 +457,11 @@ public:
|
||||
docRGB HighLight;
|
||||
std::wstring Shd;
|
||||
std::wstring RStyle;
|
||||
double Spacing;
|
||||
long Spacing;
|
||||
bool DStrikeout;
|
||||
bool Caps;
|
||||
bool SmallCaps;
|
||||
double Position;
|
||||
long Position;
|
||||
BYTE FontHint;
|
||||
bool BoldCs;
|
||||
bool ItalicCs;
|
||||
@ -642,13 +702,11 @@ public:
|
||||
}
|
||||
if(bSpacing)
|
||||
{
|
||||
long nSpacing = SerializeCommon::Round( g_dKoef_mm_to_twips * Spacing);
|
||||
pCStringWriter->WriteString(L"<w:spacing w:val=\"" + std::to_wstring(nSpacing) + L"\"/>");
|
||||
pCStringWriter->WriteString(L"<w:spacing w:val=\"" + std::to_wstring(Spacing) + L"\"/>");
|
||||
}
|
||||
if(bPosition)
|
||||
{
|
||||
long nPosition = SerializeCommon::Round( g_dKoef_mm_to_hps * Position);
|
||||
std::wstring sPosition = L"<w:position w:val=\"" + std::to_wstring(nPosition) + L"\"/>";
|
||||
std::wstring sPosition = L"<w:position w:val=\"" + std::to_wstring(Position) + L"\"/>";
|
||||
pCStringWriter->WriteString(sPosition);
|
||||
}
|
||||
if(bFontSize)
|
||||
@ -1001,6 +1059,26 @@ public:
|
||||
};
|
||||
class PaddingsToWrite
|
||||
{
|
||||
public:
|
||||
long Left;
|
||||
long Top;
|
||||
long Right;
|
||||
long Bottom;
|
||||
|
||||
bool bLeft;
|
||||
bool bTop;
|
||||
bool bRight;
|
||||
bool bBottom;
|
||||
public: PaddingsToWrite()
|
||||
{
|
||||
bLeft = false;
|
||||
bTop = false;
|
||||
bRight = false;
|
||||
bBottom = false;
|
||||
}
|
||||
};
|
||||
class PaddingsToWriteMM
|
||||
{
|
||||
public:
|
||||
double Left;
|
||||
double Top;
|
||||
@ -1011,7 +1089,7 @@ public:
|
||||
bool bTop;
|
||||
bool bRight;
|
||||
bool bBottom;
|
||||
public: PaddingsToWrite()
|
||||
public: PaddingsToWriteMM()
|
||||
{
|
||||
bLeft = false;
|
||||
bTop = false;
|
||||
@ -1028,7 +1106,7 @@ public:
|
||||
double Y;
|
||||
double Width;
|
||||
double Height;
|
||||
PaddingsToWrite Paddings;
|
||||
PaddingsToWriteMM Paddings;
|
||||
int m_nDocPr;
|
||||
|
||||
bool bMediaId;
|
||||
@ -1167,8 +1245,8 @@ class docBorder
|
||||
{
|
||||
public:
|
||||
docRGB Color;
|
||||
double Space;
|
||||
double Size;
|
||||
long Space;
|
||||
long Size;
|
||||
BYTE Value;
|
||||
CThemeColor ThemeColor;
|
||||
|
||||
@ -1201,13 +1279,11 @@ public:
|
||||
}
|
||||
if(bSize)
|
||||
{
|
||||
long nSize = SerializeCommon::Round(g_dKoef_mm_to_eightpoint * Size);
|
||||
pCStringWriter->WriteString(L" w:sz=\"" + std::to_wstring(nSize) + L"\"");
|
||||
pCStringWriter->WriteString(L" w:sz=\"" + std::to_wstring(Size) + L"\"");
|
||||
}
|
||||
if(bSpace)
|
||||
{
|
||||
long nSpace = SerializeCommon::Round(g_dKoef_mm_to_pt * Space);
|
||||
pCStringWriter->WriteString(L" w:space=\"" + std::to_wstring(nSpace) + L"\"");
|
||||
pCStringWriter->WriteString(L" w:space=\"" + std::to_wstring(Space) + L"\"");
|
||||
}
|
||||
if(bThemeColor && ThemeColor.IsNoEmpty())
|
||||
{
|
||||
@ -2074,8 +2150,8 @@ public:
|
||||
class CDrawingPropertyWrapPoint
|
||||
{
|
||||
public:
|
||||
double X;
|
||||
double Y;
|
||||
__int64 X;
|
||||
__int64 Y;
|
||||
|
||||
bool bX;
|
||||
bool bY;
|
||||
@ -2122,29 +2198,29 @@ public:
|
||||
long DataLength;
|
||||
BYTE Type;
|
||||
bool BehindDoc;
|
||||
double DistL;
|
||||
double DistT;
|
||||
double DistR;
|
||||
double DistB;
|
||||
__int64 DistL;
|
||||
__int64 DistT;
|
||||
__int64 DistR;
|
||||
__int64 DistB;
|
||||
bool LayoutInCell;
|
||||
unsigned long RelativeHeight;
|
||||
bool BSimplePos;
|
||||
double EffectExtentL;
|
||||
double EffectExtentT;
|
||||
double EffectExtentR;
|
||||
double EffectExtentB;
|
||||
double Width;
|
||||
double Height;
|
||||
__int64 EffectExtentL;
|
||||
__int64 EffectExtentT;
|
||||
__int64 EffectExtentR;
|
||||
__int64 EffectExtentB;
|
||||
__int64 Width;
|
||||
__int64 Height;
|
||||
BYTE PositionHRelativeFrom;
|
||||
BYTE PositionHAlign;
|
||||
double PositionHPosOffset;
|
||||
double PositionHPctOffset;
|
||||
__int64 PositionHPosOffset;
|
||||
double PositionHPctOffset;
|
||||
BYTE PositionVRelativeFrom;
|
||||
BYTE PositionVAlign;
|
||||
double PositionVPosOffset;
|
||||
__int64 PositionVPosOffset;
|
||||
double PositionVPctOffset;
|
||||
double SimplePosX;
|
||||
double SimplePosY;
|
||||
__int64 SimplePosX;
|
||||
__int64 SimplePosY;
|
||||
std::wstring sChartRels;
|
||||
std::wstring sSizeRelH;
|
||||
std::wstring sSizeRelV;
|
||||
@ -2234,24 +2310,17 @@ public:
|
||||
{
|
||||
if(bWidth && bHeight)
|
||||
{
|
||||
__int64 emuWidth = (__int64)(g_dKoef_mm_to_emu * Width);
|
||||
__int64 emuHeight = (__int64)(g_dKoef_mm_to_emu * Height);
|
||||
|
||||
if(false == bChart)
|
||||
sXml += L"<wp:inline xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" \
|
||||
distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstring(emuWidth) + L"\" cy=\"" + std::to_wstring(emuHeight) + L"\"/>";
|
||||
distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstring(Width) + L"\" cy=\"" + std::to_wstring(Height) + L"\"/>";
|
||||
else
|
||||
sXml += L"<w:drawing><wp:inline distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\">\
|
||||
<wp:extent cx=\"" + std::to_wstring(emuWidth) + L"\" cy=\"" + std::to_wstring(emuHeight) + L"\"/>";
|
||||
<wp:extent cx=\"" + std::to_wstring(Width) + L"\" cy=\"" + std::to_wstring(Height) + L"\"/>";
|
||||
|
||||
if(bEffectExtentL && bEffectExtentT && bEffectExtentR && bEffectExtentB)
|
||||
{
|
||||
__int64 emuEffectExtentL = (__int64)(g_dKoef_mm_to_emu * EffectExtentL);
|
||||
__int64 emuEffectExtentT = (__int64)(g_dKoef_mm_to_emu * EffectExtentT);
|
||||
__int64 emuEffectExtentR = (__int64)(g_dKoef_mm_to_emu * EffectExtentR);
|
||||
__int64 emuEffectExtentB = (__int64)(g_dKoef_mm_to_emu * EffectExtentB);
|
||||
sXml += L"<wp:effectExtent l=\"" + std::to_wstring(emuEffectExtentL) + L"\" t=\"" + std::to_wstring(emuEffectExtentT) +
|
||||
L"\" r=\"" + std::to_wstring(emuEffectExtentR) + L"\" b=\"" + std::to_wstring(emuEffectExtentB) + L"\"/>";
|
||||
sXml += L"<wp:effectExtent l=\"" + std::to_wstring(EffectExtentL) + L"\" t=\"" + std::to_wstring(EffectExtentT) +
|
||||
L"\" r=\"" + std::to_wstring(EffectExtentR) + L"\" b=\"" + std::to_wstring(EffectExtentB) + L"\"/>";
|
||||
}
|
||||
|
||||
if(!sDocPr.empty())
|
||||
@ -2293,13 +2362,13 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
|
||||
__int64 emuDistB = 0;
|
||||
|
||||
if(bDistL)
|
||||
emuDistL = (__int64)(g_dKoef_mm_to_emu * DistL);
|
||||
emuDistL = DistL;
|
||||
if(bDistT)
|
||||
emuDistT = (__int64)(g_dKoef_mm_to_emu * DistT);
|
||||
emuDistT = DistT;
|
||||
if(bDistR)
|
||||
emuDistR = (__int64)(g_dKoef_mm_to_emu * DistR);
|
||||
emuDistR = DistR;
|
||||
if(bDistB)
|
||||
emuDistB = (__int64)(g_dKoef_mm_to_emu * DistB);
|
||||
emuDistB = DistB;
|
||||
int nSimplePos = 0;
|
||||
if(bBSimplePos && BSimplePos)
|
||||
nSimplePos = 1;
|
||||
@ -2328,10 +2397,10 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
|
||||
|
||||
__int64 emuX = 0;
|
||||
if(bSimplePosX)
|
||||
emuX = (__int64)(g_dKoef_mm_to_emu * SimplePosX);
|
||||
emuX = SimplePosX;
|
||||
__int64 emuY = 0;
|
||||
if(bSimplePosY)
|
||||
emuY = (__int64)(g_dKoef_mm_to_emu * SimplePosY);
|
||||
emuY = SimplePosY;
|
||||
sXml += L"<wp:simplePos x=\"" + std::to_wstring(emuX) + L"\" y=\"" + std::to_wstring(emuY) + L"\"/>";
|
||||
|
||||
if(bPositionHRelativeFrom && (bPositionHAlign || bPositionHPosOffset || bPositionHPctOffset))
|
||||
@ -2362,8 +2431,7 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
|
||||
}
|
||||
else if(bPositionHPosOffset)
|
||||
{
|
||||
__int64 emuPosOffset = (__int64)(g_dKoef_mm_to_emu * PositionHPosOffset);
|
||||
sContent = L"<wp:posOffset>" + std::to_wstring(emuPosOffset) + L"</wp:posOffset>";
|
||||
sContent = L"<wp:posOffset>" + std::to_wstring(PositionHPosOffset) + L"</wp:posOffset>";
|
||||
}
|
||||
else if(bPositionHPctOffset)
|
||||
{
|
||||
@ -2400,8 +2468,7 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
|
||||
}
|
||||
else if(bPositionVPosOffset)
|
||||
{
|
||||
__int64 emuPosOffset = (__int64)(g_dKoef_mm_to_emu * PositionVPosOffset);
|
||||
sContent = L"<wp:posOffset>" + std::to_wstring(emuPosOffset) + L"</wp:posOffset>";
|
||||
sContent = L"<wp:posOffset>" + std::to_wstring(PositionVPosOffset) + L"</wp:posOffset>";
|
||||
}
|
||||
else if(bPositionVPctOffset)
|
||||
{
|
||||
@ -2410,20 +2477,13 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
|
||||
}
|
||||
sXml += L"<wp:positionV relativeFrom=\"" + sRelativeFrom + L"\">" + sContent + L"</wp:positionV>";
|
||||
}
|
||||
__int64 emuWidth = (__int64)(g_dKoef_mm_to_emu * Width);
|
||||
__int64 emuHeight = (__int64)(g_dKoef_mm_to_emu * Height);
|
||||
|
||||
sXml += L"<wp:extent cx=\"" + std::to_wstring(emuWidth) + L"\" cy=\"" + std::to_wstring(emuHeight)+ L"\"/>";
|
||||
sXml += L"<wp:extent cx=\"" + std::to_wstring(Width) + L"\" cy=\"" + std::to_wstring(Height)+ L"\"/>";
|
||||
|
||||
if(bEffectExtentL && bEffectExtentT && bEffectExtentR && bEffectExtentB)
|
||||
{
|
||||
__int64 emuEffectExtentL = (__int64)(g_dKoef_mm_to_emu * EffectExtentL);
|
||||
__int64 emuEffectExtentT = (__int64)(g_dKoef_mm_to_emu * EffectExtentT);
|
||||
__int64 emuEffectExtentR = (__int64)(g_dKoef_mm_to_emu * EffectExtentR);
|
||||
__int64 emuEffectExtentB = (__int64)(g_dKoef_mm_to_emu * EffectExtentB);
|
||||
sXml += L"<wp:effectExtent l=\"" + std::to_wstring(emuEffectExtentL) +
|
||||
L"\" t=\"" + std::to_wstring(emuEffectExtentT) + L"\" r=\"" + std::to_wstring(emuEffectExtentR) +
|
||||
L"\" b=\"" + std::to_wstring(emuEffectExtentB) + L"\"/>";
|
||||
sXml += L"<wp:effectExtent l=\"" + std::to_wstring(EffectExtentL) +
|
||||
L"\" t=\"" + std::to_wstring(EffectExtentT) + L"\" r=\"" + std::to_wstring(EffectExtentR) +
|
||||
L"\" b=\"" + std::to_wstring(EffectExtentB) + L"\"/>";
|
||||
}
|
||||
if(bDrawingPropertyWrap && DrawingPropertyWrap.bWrappingType)
|
||||
{
|
||||
@ -2454,9 +2514,7 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
|
||||
|
||||
if(DrawingPropertyWrap.bStart && DrawingPropertyWrap.Start.bX && DrawingPropertyWrap.Start.bY)
|
||||
{
|
||||
__int64 emuX = (__int64)(g_dKoef_mm_to_emu * DrawingPropertyWrap.Start.X);
|
||||
__int64 emuY = (__int64)(g_dKoef_mm_to_emu * DrawingPropertyWrap.Start.Y);
|
||||
sXml += L"<wp:start x=\"" + std::to_wstring(emuX) + L"\" y=\"" + std::to_wstring(emuY) + L"\"/>";
|
||||
sXml += L"<wp:start x=\"" + std::to_wstring(DrawingPropertyWrap.Start.X) + L"\" y=\"" + std::to_wstring(DrawingPropertyWrap.Start.Y) + L"\"/>";
|
||||
}
|
||||
|
||||
for(size_t i = 0; i < DrawingPropertyWrap.Points.size(); ++i)
|
||||
@ -2464,9 +2522,7 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
|
||||
CDrawingPropertyWrapPoint* pWrapPoint = DrawingPropertyWrap.Points[i];
|
||||
if(pWrapPoint->bX && pWrapPoint->bY)
|
||||
{
|
||||
__int64 emuX = (__int64)(g_dKoef_mm_to_emu * pWrapPoint->X);
|
||||
__int64 emuY = (__int64)(g_dKoef_mm_to_emu * pWrapPoint->Y);
|
||||
sXml += L"<wp:lineTo x=\"" + std::to_wstring(emuX) + L"\" y=\"" + std::to_wstring(emuY) + L"\"/>";
|
||||
sXml += L"<wp:lineTo x=\"" + std::to_wstring(pWrapPoint->X) + L"\" y=\"" + std::to_wstring(pWrapPoint->Y) + L"\"/>";
|
||||
}
|
||||
}
|
||||
sXml += L"</wp:wrapPolygon>";
|
||||
|
||||
@ -455,7 +455,13 @@ public:
|
||||
case c_oSerProp_rPrType::Spacing:
|
||||
{
|
||||
orPr->bSpacing = true;
|
||||
orPr->Spacing = m_oBufferedStream.GetDouble();
|
||||
orPr->Spacing = SerializeCommon::Round( g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
break;
|
||||
case c_oSerProp_rPrType::SpacingTwips:
|
||||
{
|
||||
orPr->bSpacing = true;
|
||||
orPr->Spacing = m_oBufferedStream.GetLong();
|
||||
}
|
||||
break;
|
||||
case c_oSerProp_rPrType::DStrikeout:
|
||||
@ -479,7 +485,13 @@ public:
|
||||
case c_oSerProp_rPrType::Position:
|
||||
{
|
||||
orPr->bPosition = true;
|
||||
orPr->Position = m_oBufferedStream.GetDouble();
|
||||
orPr->Position = SerializeCommon::Round( g_dKoef_mm_to_hps * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
break;
|
||||
case c_oSerProp_rPrType::PositionHps:
|
||||
{
|
||||
orPr->bPosition = true;
|
||||
orPr->Position = m_oBufferedStream.GetLong();
|
||||
}
|
||||
break;
|
||||
case c_oSerProp_rPrType::FontHint:
|
||||
@ -723,12 +735,12 @@ public:
|
||||
{
|
||||
Spacing oSpacing;
|
||||
READ2_DEF(length, res, this->ReadSpacing, &oSpacing);
|
||||
if(oSpacing.bLine || oSpacing.bAfter || oSpacing.bAfterAuto || oSpacing.bBefore || oSpacing.bBeforeAuto)
|
||||
if(oSpacing.bLine || oSpacing.bLineTwips || oSpacing.bAfter || oSpacing.bAfterAuto || oSpacing.bBefore || oSpacing.bBeforeAuto)
|
||||
{
|
||||
pCStringWriter->WriteString(std::wstring(L"<w:spacing"));
|
||||
BYTE bLineRule = linerule_Auto;
|
||||
//проверяется bLine, а не bLineRule чтобы всегда писать LineRule, если есть w:line
|
||||
if(oSpacing.bLine)
|
||||
if(oSpacing.bLine || oSpacing.bLineTwips)
|
||||
{
|
||||
if(oSpacing.bLineRule)
|
||||
bLineRule = oSpacing.LineRule;
|
||||
@ -756,10 +768,13 @@ public:
|
||||
}
|
||||
pCStringWriter->WriteString(sLine);
|
||||
}
|
||||
else if(oSpacing.bLineTwips)
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:line=\"" + std::to_wstring(oSpacing.LineTwips) + L"\"");
|
||||
}
|
||||
if(oSpacing.bAfter)
|
||||
{
|
||||
long After = SerializeCommon::Round( g_dKoef_mm_to_twips * oSpacing.After);
|
||||
std::wstring sAfter = L" w:after=\"" + std::to_wstring(After) + L"\"";
|
||||
std::wstring sAfter = L" w:after=\"" + std::to_wstring(oSpacing.After) + L"\"";
|
||||
pCStringWriter->WriteString(sAfter);
|
||||
}
|
||||
if(oSpacing.bAfterAuto)
|
||||
@ -771,8 +786,7 @@ public:
|
||||
}
|
||||
if(oSpacing.bBefore)
|
||||
{
|
||||
long Before = SerializeCommon::Round( g_dKoef_mm_to_twips * oSpacing.Before);
|
||||
std::wstring sBefore = L" w:before=\"" + std::to_wstring(Before) + L"\"";
|
||||
std::wstring sBefore = L" w:before=\"" + std::to_wstring(oSpacing.Before) + L"\"";
|
||||
pCStringWriter->WriteString(sBefore);
|
||||
}
|
||||
if(oSpacing.bBeforeAuto)
|
||||
@ -816,7 +830,6 @@ public:
|
||||
for(size_t i = 0; i < nLen; ++i)
|
||||
{
|
||||
Tab& oTab = oTabs.m_aTabs[i];
|
||||
long nTab = SerializeCommon::Round( g_dKoef_mm_to_twips * oTab.Pos);
|
||||
std::wstring sVal;
|
||||
switch(oTab.Val)
|
||||
{
|
||||
@ -825,7 +838,7 @@ public:
|
||||
case g_tabtype_clear: sVal = L"clear"; break;
|
||||
default: sVal = L"left"; break;
|
||||
}
|
||||
pCStringWriter->WriteString(L"<w:tab w:val=\"" + sVal + L"\" w:pos=\"" + std::to_wstring(nTab) + L"\"");
|
||||
pCStringWriter->WriteString(L"<w:tab w:val=\"" + sVal + L"\" w:pos=\"" + std::to_wstring(oTab.Pos) + L"\"");
|
||||
if (oTab.bLeader)
|
||||
{
|
||||
std::wstring sLeader;
|
||||
@ -937,6 +950,11 @@ public:
|
||||
pCStringWriter->WriteString(L" w:left=\"" + std::to_wstring(nIndLeft) + L"\"");
|
||||
break;
|
||||
}
|
||||
case c_oSerProp_pPrType::Ind_LeftTwips:
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:left=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
break;
|
||||
}
|
||||
case c_oSerProp_pPrType::Ind_Right:
|
||||
{
|
||||
double dIndRight = m_oBufferedStream.GetDouble();
|
||||
@ -945,18 +963,34 @@ public:
|
||||
pCStringWriter->WriteString(L" w:right=\"" + std::to_wstring(nIndRight) + L"\"");
|
||||
break;
|
||||
}
|
||||
case c_oSerProp_pPrType::Ind_RightTwips:
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:right=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
break;
|
||||
}
|
||||
case c_oSerProp_pPrType::Ind_FirstLine:
|
||||
{
|
||||
double dIndFirstLine = m_oBufferedStream.GetDouble();
|
||||
long nIndFirstLine = SerializeCommon::Round(dIndFirstLine * g_dKoef_mm_to_twips);
|
||||
std::wstring sIndFirstLine;
|
||||
if(nIndFirstLine > 0)
|
||||
if(nIndFirstLine >= 0)
|
||||
sIndFirstLine = L" w:firstLine =\"" + std::to_wstring(nIndFirstLine) + L"\"";
|
||||
else
|
||||
sIndFirstLine = L" w:hanging=\"" + std::to_wstring(-nIndFirstLine) + L"\"";
|
||||
pCStringWriter->WriteString(sIndFirstLine);
|
||||
break;
|
||||
}
|
||||
case c_oSerProp_pPrType::Ind_FirstLineTwips:
|
||||
{
|
||||
long nIndFirstLine = m_oBufferedStream.GetLong();
|
||||
std::wstring sIndFirstLine;
|
||||
if(nIndFirstLine >= 0)
|
||||
sIndFirstLine = L" w:firstLine =\"" + std::to_wstring(nIndFirstLine) + L"\"";
|
||||
else
|
||||
sIndFirstLine = L" w:hanging=\"" + std::to_wstring(-nIndFirstLine) + L"\"";
|
||||
pCStringWriter->WriteString(sIndFirstLine);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
break;
|
||||
@ -973,17 +1007,29 @@ public:
|
||||
pSpacing->bLine = true;
|
||||
pSpacing->Line = m_oBufferedStream.GetDouble();
|
||||
break;
|
||||
case c_oSerProp_pPrType::Spacing_LineTwips:
|
||||
pSpacing->bLineTwips = true;
|
||||
pSpacing->LineTwips = m_oBufferedStream.GetLong();
|
||||
break;
|
||||
case c_oSerProp_pPrType::Spacing_LineRule:
|
||||
pSpacing->bLineRule = true;
|
||||
pSpacing->LineRule = m_oBufferedStream.GetUChar();
|
||||
break;
|
||||
case c_oSerProp_pPrType::Spacing_Before:
|
||||
pSpacing->bBefore = true;
|
||||
pSpacing->Before = m_oBufferedStream.GetDouble();
|
||||
pSpacing->Before = SerializeCommon::Round( g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
break;
|
||||
case c_oSerProp_pPrType::Spacing_BeforeTwips:
|
||||
pSpacing->bBefore = true;
|
||||
pSpacing->Before = m_oBufferedStream.GetLong();
|
||||
break;
|
||||
case c_oSerProp_pPrType::Spacing_After:
|
||||
pSpacing->bAfter = true;
|
||||
pSpacing->After = m_oBufferedStream.GetDouble();
|
||||
pSpacing->After = SerializeCommon::Round( g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
break;
|
||||
case c_oSerProp_pPrType::Spacing_AfterTwips:
|
||||
pSpacing->bAfter = true;
|
||||
pSpacing->After = m_oBufferedStream.GetLong();
|
||||
break;
|
||||
case c_oSerProp_pPrType::Spacing_BeforeAuto:
|
||||
pSpacing->bBeforeAuto = true;
|
||||
@ -1020,7 +1066,9 @@ public:
|
||||
if(c_oSerProp_pPrType::Tab_Item_Val == type)
|
||||
poTabItem->Val = m_oBufferedStream.GetUChar();
|
||||
else if(c_oSerProp_pPrType::Tab_Item_Pos == type)
|
||||
poTabItem->Pos = m_oBufferedStream.GetDouble();
|
||||
poTabItem->Pos = SerializeCommon::Round( g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
else if(c_oSerProp_pPrType::Tab_Item_PosTwips == type)
|
||||
poTabItem->Pos = m_oBufferedStream.GetLong();
|
||||
else if(c_oSerProp_pPrType::Tab_Item_Leader == type)
|
||||
{
|
||||
poTabItem->bLeader = true;
|
||||
@ -1113,12 +1161,22 @@ public:
|
||||
else if( c_oSerBorderType::Space == type )
|
||||
{
|
||||
odocBorder->bSpace = true;
|
||||
odocBorder->Space = m_oBufferedStream.GetDouble();
|
||||
odocBorder->Space = SerializeCommon::Round(g_dKoef_mm_to_pt * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSerBorderType::SpacePoint == type )
|
||||
{
|
||||
odocBorder->bSpace = true;
|
||||
odocBorder->Space = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSerBorderType::Size == type )
|
||||
{
|
||||
odocBorder->bSize = true;
|
||||
odocBorder->Size = m_oBufferedStream.GetDouble();
|
||||
odocBorder->Size = SerializeCommon::Round(g_dKoef_mm_to_eightpoint * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSerBorderType::Size8Point == type )
|
||||
{
|
||||
odocBorder->bSize = true;
|
||||
odocBorder->Size = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSerBorderType::Value == type )
|
||||
{
|
||||
@ -1374,15 +1432,28 @@ public:
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
if( c_oSer_pgSzType::Orientation == type )
|
||||
{
|
||||
pSectPr->bOrientation = true;
|
||||
pSectPr->cOrientation = m_oBufferedStream.GetUChar();
|
||||
}
|
||||
else if( c_oSer_pgSzType::W == type )
|
||||
{
|
||||
pSectPr->W = m_oBufferedStream.GetDouble();
|
||||
pSectPr->bW = true;
|
||||
pSectPr->W = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgSzType::WTwips == type )
|
||||
{
|
||||
pSectPr->bW = true;
|
||||
pSectPr->W = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSer_pgSzType::H == type )
|
||||
{
|
||||
pSectPr->H = m_oBufferedStream.GetDouble();
|
||||
pSectPr->bH = true;
|
||||
pSectPr->H = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgSzType::HTwips == type )
|
||||
{
|
||||
pSectPr->bH = true;
|
||||
pSectPr->H = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
@ -1394,29 +1465,63 @@ public:
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
if( c_oSer_pgMarType::Left == type )
|
||||
{
|
||||
pSectPr->Left = m_oBufferedStream.GetDouble();
|
||||
pSectPr->bLeft = true;
|
||||
pSectPr->Left = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgMarType::LeftTwips == type )
|
||||
{
|
||||
pSectPr->bLeft = true;
|
||||
pSectPr->Left = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSer_pgMarType::Top == type )
|
||||
{
|
||||
pSectPr->Top = m_oBufferedStream.GetDouble();
|
||||
pSectPr->bTop = true;
|
||||
pSectPr->Top = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgMarType::TopTwips == type )
|
||||
{
|
||||
pSectPr->bTop = true;
|
||||
pSectPr->Top = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSer_pgMarType::Right == type )
|
||||
{
|
||||
pSectPr->Right = m_oBufferedStream.GetDouble();
|
||||
pSectPr->bRight = true;
|
||||
pSectPr->Right = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgMarType::RightTwips == type )
|
||||
{
|
||||
pSectPr->bRight = true;
|
||||
pSectPr->Right = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSer_pgMarType::Bottom == type )
|
||||
{
|
||||
pSectPr->Bottom = m_oBufferedStream.GetDouble();
|
||||
pSectPr->bBottom = true;
|
||||
pSectPr->Bottom = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgMarType::BottomTwips == type )
|
||||
{
|
||||
pSectPr->bBottom = true;
|
||||
pSectPr->Bottom = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSer_pgMarType::Header == type )
|
||||
{
|
||||
pSectPr->bHeader = true;
|
||||
pSectPr->Header = m_oBufferedStream.GetDouble();
|
||||
pSectPr->Header = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgMarType::HeaderTwips == type )
|
||||
{
|
||||
pSectPr->bHeader = true;
|
||||
pSectPr->Header = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if( c_oSer_pgMarType::Footer == type )
|
||||
{
|
||||
pSectPr->bFooter = true;
|
||||
pSectPr->Footer = m_oBufferedStream.GetDouble();
|
||||
pSectPr->Footer = SerializeCommon::Round(g_dKoef_mm_to_twips * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if( c_oSer_pgMarType::FooterTwips == type )
|
||||
{
|
||||
pSectPr->bFooter = true;
|
||||
pSectPr->Footer = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
@ -1716,6 +1821,10 @@ public:
|
||||
long nInd = SerializeCommon::Round( g_dKoef_mm_to_twips * dInd);
|
||||
pWiterTblPr->TableInd = L"<w:tblInd w:w=\"" + std::to_wstring(nInd) + L"\" w:type=\"dxa\"/>";
|
||||
}
|
||||
else if( c_oSerProp_tblPrType::TableIndTwips == type )
|
||||
{
|
||||
pWiterTblPr->TableInd = L"<w:tblInd w:w=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\" w:type=\"dxa\"/>";
|
||||
}
|
||||
else if( c_oSerProp_tblPrType::TableW == type )
|
||||
{
|
||||
docW odocW;
|
||||
@ -1815,6 +1924,10 @@ public:
|
||||
long nSpacing = SerializeCommon::Round( g_dKoef_mm_to_twips * dSpacing);
|
||||
pWiterTblPr->TableCellSpacing = L"<w:tblCellSpacing w:w=\"" + std::to_wstring(nSpacing) + L"\" w:type=\"dxa\"/>";
|
||||
}
|
||||
else if( c_oSerProp_tblPrType::TableCellSpacingTwips == type )
|
||||
{
|
||||
pWiterTblPr->TableCellSpacing = L"<w:tblCellSpacing w:w=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\" w:type=\"dxa\"/>";
|
||||
}
|
||||
else if( c_oSerProp_tblPrType::tblCaption == type )
|
||||
{
|
||||
pWiterTblPr->Caption = m_oBufferedStream.GetString3(length);
|
||||
@ -1959,6 +2072,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L" w:tblpX=\"" + std::to_wstring(nX) + L"\"");
|
||||
}
|
||||
else if( c_oSer_tblpPrType2::TblpXTwips == type )
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:tblpX=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
}
|
||||
else if( c_oSer_tblpPrType2::TblpXSpec == type )
|
||||
{
|
||||
std::wstring sXml;
|
||||
@ -1992,6 +2109,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L" w:tblpY=\"" + std::to_wstring(nY) + L"\"");
|
||||
}
|
||||
else if( c_oSer_tblpPrType2::TblpYTwips == type )
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:tblpY=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
}
|
||||
else if( c_oSer_tblpPrType2::TblpYSpec == type )
|
||||
{
|
||||
std::wstring sXml;
|
||||
@ -2087,6 +2208,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L"<w:tblCellSpacing w:w=\"" + std::to_wstring(nSpacing) + L"\" w:type=\"dxa\"/>");
|
||||
}
|
||||
else if( c_oSerProp_rowPrType::TableCellSpacingTwips == type )
|
||||
{
|
||||
pCStringWriter->WriteString(L"<w:tblCellSpacing w:w=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\" w:type=\"dxa\"/>");
|
||||
}
|
||||
else if( c_oSerProp_rowPrType::Height == type )
|
||||
{
|
||||
RowHeight val;
|
||||
@ -2180,6 +2305,10 @@ public:
|
||||
double dHeight = m_oBufferedStream.GetDouble();
|
||||
pHeight->nHeight = SerializeCommon::Round( g_dKoef_mm_to_twips * dHeight);
|
||||
}
|
||||
else if( c_oSerProp_rowPrType::Height_ValueTwips == type )
|
||||
{
|
||||
pHeight->nHeight = m_oBufferedStream.GetLong();
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -2358,6 +2487,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L" w:leftFromText=\"" + std::to_wstring(nLeft) + L"\"");
|
||||
}
|
||||
else if (c_oSerPaddingType::leftTwips == type)
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:leftFromText=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
}
|
||||
else if (c_oSerPaddingType::top == type)
|
||||
{
|
||||
double dTop = m_oBufferedStream.GetDouble();
|
||||
@ -2365,6 +2498,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L" w:topFromText=\"" + std::to_wstring(nTop) + L"\"");
|
||||
}
|
||||
else if (c_oSerPaddingType::topTwips == type)
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:topFromText=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
}
|
||||
else if (c_oSerPaddingType::right == type)
|
||||
{
|
||||
double dRight = m_oBufferedStream.GetDouble();
|
||||
@ -2372,6 +2509,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L" w:rightFromText=\"" + std::to_wstring(nRight) + L"\"");
|
||||
}
|
||||
else if (c_oSerPaddingType::rightTwips == type)
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:rightFromText=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
}
|
||||
else if (c_oSerPaddingType::bottom == type)
|
||||
{
|
||||
double dBottom = m_oBufferedStream.GetDouble();
|
||||
@ -2379,6 +2520,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L" w:bottomFromText=\"" + std::to_wstring(nBottom) + L"\"");
|
||||
}
|
||||
else if (c_oSerPaddingType::bottomTwips == type)
|
||||
{
|
||||
pCStringWriter->WriteString(L" w:bottomFromText=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3294,10 +3439,12 @@ public:
|
||||
{
|
||||
double dDefTabStop = m_oBufferedStream.GetDouble();
|
||||
long nDefTabStop = SerializeCommon::Round(dDefTabStop * g_dKoef_mm_to_twips);
|
||||
std::wstring sXml;
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<w:defaultTabStop w:val=\"" + std::to_wstring(nDefTabStop) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_SettingsType::DefaultTabStopTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<w:defaultTabStop w:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_SettingsType::MathPr == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(_T("<m:mathPr>"));
|
||||
@ -3582,6 +3729,10 @@ public:
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:interSp m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_OMathBottomNodesValType::ValTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:interSp m:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3614,6 +3765,10 @@ public:
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:intraSp m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_OMathBottomNodesValType::ValTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:intraSp m:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3627,6 +3782,10 @@ public:
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:lMargin m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_OMathBottomNodesValType::ValTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:lMargin m:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3678,6 +3837,10 @@ public:
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:postSp m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_OMathBottomNodesValType::ValTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:postSp m:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3691,6 +3854,10 @@ public:
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:preSp m:val=\"" + std::to_wstring(lVal)+ L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_OMathBottomNodesValType::ValTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:preSp m:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3704,6 +3871,10 @@ public:
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:rMargin m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_OMathBottomNodesValType::ValTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:rMargin m:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3734,6 +3905,10 @@ public:
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:wrapIndent m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
else if ( c_oSer_OMathBottomNodesValType::ValTwips == type )
|
||||
{
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:wrapIndent m:val=\"" + std::to_wstring(m_oBufferedStream.GetLong()) + L"\"/>");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -7131,6 +7306,10 @@ public:
|
||||
|
||||
pCStringWriter->WriteString(L"<w:gridCol w:w=\"" + std::to_wstring(ngridCol)+ L"\"/>");
|
||||
}
|
||||
else if( c_oSerDocTableType::tblGrid_ItemTwips == type )
|
||||
{
|
||||
pCStringWriter->WriteString(L"<w:gridCol w:w=\"" + std::to_wstring(m_oBufferedStream.GetLong())+ L"\"/>");
|
||||
}
|
||||
else if( c_oSerDocTableType::tblGridChange == type )
|
||||
{
|
||||
TrackRevision oTrackRevision;
|
||||
@ -7471,22 +7650,42 @@ public:
|
||||
else if ( c_oSerImageType2::DistL == type )
|
||||
{
|
||||
pDrawingProperty->bDistL = true;
|
||||
pDrawingProperty->DistL = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->DistL = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerImageType2::DistLEmu == type )
|
||||
{
|
||||
pDrawingProperty->bDistL = true;
|
||||
pDrawingProperty->DistL = (__int64)m_oBufferedStream.GetULong();
|
||||
}
|
||||
else if ( c_oSerImageType2::DistT == type )
|
||||
{
|
||||
pDrawingProperty->bDistT = true;
|
||||
pDrawingProperty->DistT = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->DistT = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerImageType2::DistTEmu == type )
|
||||
{
|
||||
pDrawingProperty->bDistT = true;
|
||||
pDrawingProperty->DistT = (__int64)m_oBufferedStream.GetULong();
|
||||
}
|
||||
else if ( c_oSerImageType2::DistR == type )
|
||||
{
|
||||
pDrawingProperty->bDistR = true;
|
||||
pDrawingProperty->DistR = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->DistR = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerImageType2::DistREmu == type )
|
||||
{
|
||||
pDrawingProperty->bDistR = true;
|
||||
pDrawingProperty->DistR = (__int64)m_oBufferedStream.GetULong();
|
||||
}
|
||||
else if ( c_oSerImageType2::DistB == type )
|
||||
{
|
||||
pDrawingProperty->bDistB = true;
|
||||
pDrawingProperty->DistB = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->DistB = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerImageType2::DistBEmu == type )
|
||||
{
|
||||
pDrawingProperty->bDistB = true;
|
||||
pDrawingProperty->DistB = (__int64)m_oBufferedStream.GetULong();
|
||||
}
|
||||
else if ( c_oSerImageType2::LayoutInCell == type )
|
||||
{
|
||||
@ -7726,22 +7925,42 @@ public:
|
||||
if ( c_oSerEffectExtent::Left == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentL = true;
|
||||
pDrawingProperty->EffectExtentL = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->EffectExtentL = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerEffectExtent::LeftEmu == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentL = true;
|
||||
pDrawingProperty->EffectExtentL = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if ( c_oSerEffectExtent::Top == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentT = true;
|
||||
pDrawingProperty->EffectExtentT = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->EffectExtentT = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerEffectExtent::TopEmu == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentT = true;
|
||||
pDrawingProperty->EffectExtentT = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if ( c_oSerEffectExtent::Right == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentR = true;
|
||||
pDrawingProperty->EffectExtentR = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->EffectExtentR = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerEffectExtent::RightEmu == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentR = true;
|
||||
pDrawingProperty->EffectExtentR = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if ( c_oSerEffectExtent::Bottom == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentB = true;
|
||||
pDrawingProperty->EffectExtentB = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->EffectExtentB = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerEffectExtent::BottomEmu == type )
|
||||
{
|
||||
pDrawingProperty->bEffectExtentB = true;
|
||||
pDrawingProperty->EffectExtentB = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
@ -7754,12 +7973,22 @@ public:
|
||||
if ( c_oSerExtent::Cx == type )
|
||||
{
|
||||
pDrawingProperty->bWidth = true;
|
||||
pDrawingProperty->Width = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->Width = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerExtent::CxEmu == type )
|
||||
{
|
||||
pDrawingProperty->bWidth = true;
|
||||
pDrawingProperty->Width = (__int64)m_oBufferedStream.GetULong();
|
||||
}
|
||||
else if ( c_oSerExtent::Cy == type )
|
||||
{
|
||||
pDrawingProperty->bHeight = true;
|
||||
pDrawingProperty->Height = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->Height = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerExtent::CyEmu == type )
|
||||
{
|
||||
pDrawingProperty->bHeight = true;
|
||||
pDrawingProperty->Height = (__int64)m_oBufferedStream.GetULong();
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
@ -7782,7 +8011,12 @@ public:
|
||||
else if ( c_oSerPosHV::PosOffset == type )
|
||||
{
|
||||
pDrawingProperty->bPositionHPosOffset = true;
|
||||
pDrawingProperty->PositionHPosOffset = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->PositionHPosOffset = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerPosHV::PosOffsetEmu == type )
|
||||
{
|
||||
pDrawingProperty->bPositionHPosOffset = true;
|
||||
pDrawingProperty->PositionHPosOffset = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if ( c_oSerPosHV::PctOffset == type )
|
||||
{
|
||||
@ -7810,7 +8044,12 @@ public:
|
||||
else if ( c_oSerPosHV::PosOffset == type )
|
||||
{
|
||||
pDrawingProperty->bPositionVPosOffset = true;
|
||||
pDrawingProperty->PositionVPosOffset = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->PositionVPosOffset = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerPosHV::PosOffsetEmu == type )
|
||||
{
|
||||
pDrawingProperty->bPositionVPosOffset = true;
|
||||
pDrawingProperty->PositionVPosOffset = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if ( c_oSerPosHV::PctOffset == type )
|
||||
{
|
||||
@ -7828,12 +8067,22 @@ public:
|
||||
if ( c_oSerSimplePos::X == type )
|
||||
{
|
||||
pDrawingProperty->bSimplePosX = true;
|
||||
pDrawingProperty->SimplePosX = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->SimplePosX = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerSimplePos::XEmu == type )
|
||||
{
|
||||
pDrawingProperty->bSimplePosX = true;
|
||||
pDrawingProperty->SimplePosX = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if ( c_oSerSimplePos::Y == type )
|
||||
{
|
||||
pDrawingProperty->bSimplePosY = true;
|
||||
pDrawingProperty->SimplePosY = m_oBufferedStream.GetDouble();
|
||||
pDrawingProperty->SimplePosY = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerSimplePos::YEmu == type )
|
||||
{
|
||||
pDrawingProperty->bSimplePosY = true;
|
||||
pDrawingProperty->SimplePosY = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
@ -7929,12 +8178,22 @@ public:
|
||||
if ( c_oSerPoint2D::X == type )
|
||||
{
|
||||
pWrapPoint->bX = true;
|
||||
pWrapPoint->X = m_oBufferedStream.GetDouble();
|
||||
pWrapPoint->X = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerPoint2D::XEmu == type )
|
||||
{
|
||||
pWrapPoint->bX = true;
|
||||
pWrapPoint->X = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else if ( c_oSerPoint2D::Y == type )
|
||||
{
|
||||
pWrapPoint->bY = true;
|
||||
pWrapPoint->Y = m_oBufferedStream.GetDouble();
|
||||
pWrapPoint->Y = (__int64)(g_dKoef_mm_to_emu * m_oBufferedStream.GetDouble());
|
||||
}
|
||||
else if ( c_oSerPoint2D::YEmu == type )
|
||||
{
|
||||
pWrapPoint->bY = true;
|
||||
pWrapPoint->Y = (__int64)m_oBufferedStream.GetLong();
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
|
||||
@ -36,17 +36,6 @@ namespace BinDocxRW
|
||||
{
|
||||
const double eps = 0.001;
|
||||
|
||||
const int Page_Width = 210;
|
||||
const int Page_Height = 297;
|
||||
|
||||
const int X_Left_Margin = 30; // 3 cm
|
||||
const int X_Right_Margin = 15; // 1.5 cm
|
||||
const int Y_Bottom_Margin = 20; // 2 cm
|
||||
const int Y_Top_Margin = 20; // 2 cm
|
||||
|
||||
const double Y_Default_Header = 12.5; // 1.25 cm расстояние от верха страницы до верха верхнего колонтитула
|
||||
const double Y_Default_Footer = 12.5; // 1.25 cm расстояние от низа страницы до низа нижнего колонтитула
|
||||
|
||||
const int shd_Clear = 0;
|
||||
const int shd_Nil = 1;
|
||||
|
||||
@ -311,7 +300,9 @@ extern int g_nCurFormatVersion;
|
||||
RowBandSize = 15,
|
||||
ColBandSize = 16,
|
||||
tblCaption = 17,
|
||||
tblDescription = 18
|
||||
tblDescription = 18,
|
||||
TableIndTwips = 19,
|
||||
TableCellSpacingTwips = 20
|
||||
};}
|
||||
namespace c_oSer_tblpPrType{enum c_oSer_tblpPrType
|
||||
{
|
||||
@ -328,7 +319,9 @@ extern int g_nCurFormatVersion;
|
||||
VertAnchor = 3,
|
||||
TblpY = 4,
|
||||
TblpYSpec = 5,
|
||||
Paddings = 6
|
||||
Paddings = 6,
|
||||
TblpXTwips = 7,
|
||||
TblpYTwips = 8
|
||||
};}
|
||||
namespace c_oSerProp_pPrType{enum c_oSerProp_pPrType
|
||||
{
|
||||
@ -365,7 +358,14 @@ extern int g_nCurFormatVersion;
|
||||
numPr_Ins = 32,
|
||||
pPrChange = 33,
|
||||
outlineLvl = 34,
|
||||
Tab_Item_Leader = 35
|
||||
Tab_Item_Leader = 35,
|
||||
Ind_LeftTwips = 36,
|
||||
Ind_RightTwips = 37,
|
||||
Ind_FirstLineTwips = 38,
|
||||
Spacing_LineTwips = 39,
|
||||
Spacing_BeforeTwips = 40,
|
||||
Spacing_AfterTwips = 41,
|
||||
Tab_Item_PosTwips = 42
|
||||
};}
|
||||
namespace c_oSerProp_rPrType{enum c_oSerProp_rPrType
|
||||
{
|
||||
@ -406,7 +406,9 @@ extern int g_nCurFormatVersion;
|
||||
Ins = 34,
|
||||
rPrChange = 35,
|
||||
MoveFrom = 36,
|
||||
MoveTo = 37
|
||||
MoveTo = 37,
|
||||
SpacingTwips = 38,
|
||||
PositionHps = 39
|
||||
};}
|
||||
namespace c_oSerProp_rowPrType{enum c_oSerProp_rowPrType
|
||||
{
|
||||
@ -427,7 +429,9 @@ extern int g_nCurFormatVersion;
|
||||
TableHeader = 14,
|
||||
Del = 15,
|
||||
Ins = 16,
|
||||
trPrChange = 17
|
||||
trPrChange = 17,
|
||||
TableCellSpacingTwips = 18,
|
||||
Height_ValueTwips = 19
|
||||
};}
|
||||
namespace c_oSerProp_cellPrType{enum c_oSerProp_cellPrType
|
||||
{
|
||||
@ -517,7 +521,8 @@ extern int g_nCurFormatVersion;
|
||||
tblGridChange = 9,
|
||||
Sdt = 10,
|
||||
BookmarkStart = 11,
|
||||
BookmarkEnd = 12
|
||||
BookmarkEnd = 12,
|
||||
tblGrid_ItemTwips = 13
|
||||
};}
|
||||
namespace c_oSerRunType{enum c_oSerRunType
|
||||
{
|
||||
@ -607,26 +612,37 @@ extern int g_nCurFormatVersion;
|
||||
SizeRelV = 28,
|
||||
Embedded = 29,
|
||||
GraphicFramePr = 30,
|
||||
DocPr = 31
|
||||
DocPr = 31,
|
||||
DistBEmu = 32,
|
||||
DistLEmu = 33,
|
||||
DistREmu = 34,
|
||||
DistTEmu = 35
|
||||
};}
|
||||
namespace c_oSerEffectExtent{enum c_oSerEffectExtent
|
||||
{
|
||||
Left = 0,
|
||||
Top = 1,
|
||||
Right = 2,
|
||||
Bottom = 3
|
||||
Bottom = 3,
|
||||
LeftEmu = 4,
|
||||
TopEmu = 5,
|
||||
RightEmu = 6,
|
||||
BottomEmu = 7
|
||||
};}
|
||||
namespace c_oSerExtent{enum c_oSerExtent
|
||||
{
|
||||
Cx = 0,
|
||||
Cy = 1
|
||||
Cy = 1,
|
||||
CxEmu = 2,
|
||||
CyEmu = 3
|
||||
};}
|
||||
namespace c_oSerPosHV{enum c_oSerPosHV
|
||||
{
|
||||
RelativeFrom = 0,
|
||||
Align = 1,
|
||||
PosOffset = 2,
|
||||
PctOffset = 3
|
||||
PctOffset = 3,
|
||||
PosOffsetEmu = 4
|
||||
};}
|
||||
namespace c_oSerSizeRelHV{enum c_oSerSizeRelHV
|
||||
{
|
||||
@ -636,7 +652,9 @@ extern int g_nCurFormatVersion;
|
||||
namespace c_oSerSimplePos{enum c_oSerSimplePos
|
||||
{
|
||||
X = 0,
|
||||
Y = 1
|
||||
Y = 1,
|
||||
XEmu = 2,
|
||||
YEmu = 3
|
||||
};}
|
||||
namespace c_oSerWrapSquare{enum c_oSerWrapSquare
|
||||
{
|
||||
@ -645,20 +663,28 @@ extern int g_nCurFormatVersion;
|
||||
DistR = 2,
|
||||
DistB = 3,
|
||||
WrapText = 4,
|
||||
EffectExtent = 5
|
||||
EffectExtent = 5,
|
||||
DistLEmu = 6,
|
||||
DistTEmu = 7,
|
||||
DistREmu = 8,
|
||||
DistBEmu = 9
|
||||
};}
|
||||
namespace c_oSerWrapThroughTight{enum c_oSerWrapThroughTight
|
||||
{
|
||||
DistL = 0,
|
||||
DistR = 1,
|
||||
WrapText = 2,
|
||||
WrapPolygon = 3
|
||||
WrapPolygon = 3,
|
||||
DistLEmu = 4,
|
||||
DistREmu = 5
|
||||
};}
|
||||
namespace c_oSerWrapTopBottom{enum c_oSerWrapTopBottom
|
||||
{
|
||||
DistT = 0,
|
||||
DistB = 1,
|
||||
EffectExtent = 2
|
||||
EffectExtent = 2,
|
||||
DistTEmu = 3,
|
||||
DistBEmu = 4
|
||||
};}
|
||||
namespace c_oSerWrapPolygon{enum c_oSerWrapPolygon
|
||||
{
|
||||
@ -670,7 +696,9 @@ extern int g_nCurFormatVersion;
|
||||
namespace c_oSerPoint2D{enum c_oSerPoint2D
|
||||
{
|
||||
X = 0,
|
||||
Y = 1
|
||||
Y = 1,
|
||||
XEmu = 2,
|
||||
YEmu = 3
|
||||
};}
|
||||
namespace c_oSerBorderType{enum c_oSerBorderType
|
||||
{
|
||||
@ -678,7 +706,9 @@ extern int g_nCurFormatVersion;
|
||||
Space = 1,
|
||||
Size = 2,
|
||||
Value = 3,
|
||||
ColorTheme = 4
|
||||
ColorTheme = 4,
|
||||
SpacePoint = 5,
|
||||
Size8Point = 6
|
||||
};}
|
||||
namespace c_oSerShdType{enum c_oSerShdType
|
||||
{
|
||||
@ -691,7 +721,11 @@ extern int g_nCurFormatVersion;
|
||||
left = 0,
|
||||
top = 1,
|
||||
right = 2,
|
||||
bottom = 3
|
||||
bottom = 3,
|
||||
leftTwips = 4,
|
||||
topTwips = 5,
|
||||
rightTwips = 6,
|
||||
bottomTwips = 7
|
||||
};}
|
||||
namespace c_oSerMarginsType{enum c_oSerMarginsType
|
||||
{
|
||||
@ -725,7 +759,9 @@ extern int g_nCurFormatVersion;
|
||||
{
|
||||
W = 0,
|
||||
H = 1,
|
||||
Orientation = 2
|
||||
Orientation = 2,
|
||||
WTwips = 3,
|
||||
HTwips = 4
|
||||
};}
|
||||
namespace c_oSer_pgMarType{enum c_oSer_pgMarType
|
||||
{
|
||||
@ -734,7 +770,13 @@ extern int g_nCurFormatVersion;
|
||||
Right = 2,
|
||||
Bottom = 3,
|
||||
Header = 4,
|
||||
Footer = 5
|
||||
Footer = 5,
|
||||
LeftTwips = 6,
|
||||
TopTwips = 7,
|
||||
RightTwips = 8,
|
||||
BottomTwips = 9,
|
||||
HeaderTwips = 10,
|
||||
FooterTwips = 11
|
||||
};}
|
||||
namespace c_oSer_ColorType{enum c_oSer_ColorType
|
||||
{
|
||||
@ -765,7 +807,8 @@ extern int g_nCurFormatVersion;
|
||||
EndnotePr = 5,
|
||||
SdtGlobalColor = 6,
|
||||
SdtGlobalShowHighlight = 7,
|
||||
Compat = 8
|
||||
Compat = 8,
|
||||
DefaultTabStopTwips = 9
|
||||
};}
|
||||
namespace c_oSer_MathPrType{enum c_oSer_SettingsType
|
||||
{
|
||||
@ -860,7 +903,8 @@ extern int g_nCurFormatVersion;
|
||||
namespace c_oSer_OMathBottomNodesValType{enum c_oSer_OMathBottomNodesValType
|
||||
{
|
||||
Val = 0,
|
||||
AlnAt = 1
|
||||
AlnAt = 1,
|
||||
ValTwips = 2
|
||||
};}
|
||||
namespace c_oSer_OMathContentType{enum c_oSer_OMathContentType
|
||||
{
|
||||
|
||||
@ -148,15 +148,15 @@ namespace BinDocxRW
|
||||
WriteThemeColor(c_oSerBorderType::ColorTheme, border.m_oColor, border.m_oThemeColor, border.m_oThemeTint, border.m_oThemeShade);
|
||||
if(border.m_oSpace.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerBorderType::Space);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(border.m_oSpace->ToMM());
|
||||
m_oStream.WriteBYTE(c_oSerBorderType::SpacePoint);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oStream.WriteLONG(border.m_oSpace->GetValue());
|
||||
}
|
||||
if(border.m_oSz.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerBorderType::Size);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(border.m_oSz->ToMM());
|
||||
m_oStream.WriteBYTE(c_oSerBorderType::Size8Point);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oStream.WriteLONG(border.m_oSz->GetValue());
|
||||
}
|
||||
//Val
|
||||
m_oStream.WriteBYTE(c_oSerBorderType::Value);
|
||||
@ -315,85 +315,51 @@ namespace BinDocxRW
|
||||
void WriteShd(const ComplexTypes::Word::CShading& Shd)
|
||||
{
|
||||
//Type
|
||||
if(false != Shd.m_oVal.IsInit())
|
||||
if (false != Shd.m_oVal.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerShdType::Value);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
switch(Shd.m_oVal.get().GetValue())
|
||||
{
|
||||
case SimpleTypes::shdNil: m_oStream.WriteBYTE(shd_Nil);break;
|
||||
default: m_oStream.WriteBYTE(shd_Clear);break;
|
||||
}
|
||||
m_oStream.WriteBYTE(Shd.m_oVal.get().GetValue()); //Misalignment-footer.doc
|
||||
|
||||
}
|
||||
//Value
|
||||
if(false != Shd.m_oFill.IsInit())
|
||||
if (false != Shd.m_oFill.IsInit())
|
||||
WriteColor(c_oSerShdType::Color, Shd.m_oFill.get());
|
||||
else if (false != Shd.m_oColor.IsInit())
|
||||
WriteColor(c_oSerShdType::Color, Shd.m_oColor.get());
|
||||
|
||||
WriteThemeColor(c_oSerShdType::ColorTheme, Shd.m_oFill, Shd.m_oThemeFill, Shd.m_oThemeFillTint, Shd.m_oThemeFillShade);
|
||||
}
|
||||
void WriteDistance(const NSCommon::nullable<SimpleTypes::CWrapDistance<>>& m_oDistL,
|
||||
const NSCommon::nullable<SimpleTypes::CWrapDistance<>>& m_oDistT,
|
||||
const NSCommon::nullable<SimpleTypes::CWrapDistance<>>& m_oDistR,
|
||||
const NSCommon::nullable<SimpleTypes::CWrapDistance<>>& m_oDistB)
|
||||
{
|
||||
//left
|
||||
if(false != m_oDistL.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::left);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(m_oDistL.get().ToMM());
|
||||
}
|
||||
//top
|
||||
if(false != m_oDistT.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::top);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(m_oDistT.get().ToMM());
|
||||
}
|
||||
//Right
|
||||
if(false != m_oDistR.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::right);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(m_oDistR.get().ToMM());
|
||||
}
|
||||
//bottom
|
||||
if(false != m_oDistB.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::bottom);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(m_oDistB.get().ToMM());
|
||||
}
|
||||
}
|
||||
void WritePaddings(const nullable<SimpleTypes::CTwipsMeasure>& left, const nullable<SimpleTypes::CTwipsMeasure>& top,
|
||||
const nullable<SimpleTypes::CTwipsMeasure>& right, const nullable<SimpleTypes::CTwipsMeasure>& bottom)
|
||||
{
|
||||
//left
|
||||
if(left.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::left);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(left.get().ToMm());
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::leftTwips);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oStream.WriteLONG(left->ToTwips());
|
||||
}
|
||||
//top
|
||||
if(top.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::top);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(top.get().ToMm());
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::topTwips);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oStream.WriteLONG(top->ToTwips());
|
||||
}
|
||||
//Right
|
||||
if(right.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::right);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(right.get().ToMm());
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::rightTwips);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oStream.WriteLONG(right->ToTwips());
|
||||
}
|
||||
//bottom
|
||||
if(bottom.IsInit())
|
||||
{
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::bottom);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oStream.WriteDouble(bottom.get().ToMm());
|
||||
m_oStream.WriteBYTE(c_oSerPaddingType::bottomTwips);
|
||||
m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oStream.WriteLONG(bottom->ToTwips());
|
||||
}
|
||||
}
|
||||
void WriteFont(std::wstring& sFontName, BYTE bType, DocWrapper::FontProcessor& m_oFontProcessor)
|
||||
@ -701,9 +667,9 @@ namespace BinDocxRW
|
||||
//Spacing
|
||||
if(false != rPr->m_oSpacing.IsInit() && false != rPr->m_oSpacing->m_oVal.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::Spacing);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(rPr->m_oSpacing->m_oVal->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::SpacingTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(rPr->m_oSpacing->m_oVal->ToTwips());
|
||||
}
|
||||
//DStrikeout
|
||||
if(false != rPr->m_oDStrike.IsInit())
|
||||
@ -729,9 +695,9 @@ namespace BinDocxRW
|
||||
//Position
|
||||
if(false != rPr->m_oPosition.IsInit() && false != rPr->m_oPosition->m_oVal.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::Position);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(rPr->m_oPosition->m_oVal->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::PositionHps);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(rPr->m_oPosition->m_oVal->ToHps());
|
||||
}
|
||||
//BoldCs
|
||||
if(rPr->m_oBoldCs.IsInit())
|
||||
@ -1066,29 +1032,29 @@ namespace BinDocxRW
|
||||
//Left
|
||||
if(false != Ind.m_oStart.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_Left);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(Ind.m_oStart.get().ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_LeftTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(Ind.m_oStart.get().ToTwips());
|
||||
}
|
||||
//Right
|
||||
if(false != Ind.m_oEnd.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_Right);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(Ind.m_oEnd.get().ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_RightTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(Ind.m_oEnd.get().ToTwips());
|
||||
}
|
||||
//FirstLine
|
||||
if(false != Ind.m_oFirstLine.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_FirstLine);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(Ind.m_oFirstLine.get().ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_FirstLineTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(Ind.m_oFirstLine.get().ToTwips());
|
||||
}
|
||||
else if(false != Ind.m_oHanging.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_FirstLine);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble( -1 * Ind.m_oHanging.get().ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Ind_FirstLineTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG( -1 * Ind.m_oHanging.get().ToTwips());
|
||||
}
|
||||
}
|
||||
void WriteSpacing(const ComplexTypes::Word::CSpacing& Spacing)
|
||||
@ -1101,24 +1067,9 @@ namespace BinDocxRW
|
||||
//Line
|
||||
if(false != Spacing.m_oLine.IsInit())
|
||||
{
|
||||
const SimpleTypes::CSignedTwipsMeasure& oLine = Spacing.m_oLine.get();
|
||||
double dLineMm = oLine.ToMm();
|
||||
if(dLineMm < 0)
|
||||
{
|
||||
dLineMm = -dLineMm;
|
||||
eLineSpacingRule = SimpleTypes::linespacingruleExact;
|
||||
}
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Spacing_Line);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
if(SimpleTypes::linespacingruleAuto == eLineSpacingRule)
|
||||
{
|
||||
SimpleTypes::CSignedTwipsMeasure oTmp;oTmp.FromPoints(12);//240 twips
|
||||
m_oBcw.m_oStream.WriteDouble(dLineMm / oTmp.ToMm());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_oBcw.m_oStream.WriteDouble(dLineMm);
|
||||
}
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Spacing_LineTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(Spacing.m_oLine->ToTwips());
|
||||
//Write LineRule
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Spacing_LineRule);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
@ -1138,9 +1089,9 @@ namespace BinDocxRW
|
||||
}
|
||||
if(false != Spacing.m_oBefore.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Spacing_Before);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(Spacing.m_oBefore.get().ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Spacing_BeforeTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(Spacing.m_oBefore.get().ToTwips());
|
||||
}
|
||||
//After
|
||||
if(Spacing.m_oAfterAutospacing.IsInit())
|
||||
@ -1151,9 +1102,9 @@ namespace BinDocxRW
|
||||
}
|
||||
if(false != Spacing.m_oAfter.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Spacing_After);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(Spacing.m_oAfter.get().ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Spacing_AfterTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(Spacing.m_oAfter.get().ToTwips());
|
||||
}
|
||||
}
|
||||
void WriteTabs(const OOX::Logic::CTabs& Tab, const nullable<ComplexTypes::Word::CInd>& oInd)
|
||||
@ -1197,9 +1148,9 @@ namespace BinDocxRW
|
||||
//pos
|
||||
if(false != TabItem.m_oPos.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Tab_Item_Pos);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(TabItem.m_oPos.get().ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_pPrType::Tab_Item_PosTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(TabItem.m_oPos.get().ToTwips());
|
||||
}
|
||||
if(false != TabItem.m_oLeader.IsInit())
|
||||
{
|
||||
@ -1425,93 +1376,78 @@ namespace BinDocxRW
|
||||
}
|
||||
void WritePageSize(OOX::Logic::CSectionProperty* pSectPr)
|
||||
{
|
||||
double W = Page_Width;
|
||||
double H = Page_Height;
|
||||
BYTE Orientation = orientation_Portrait;
|
||||
if(NULL != pSectPr && pSectPr->m_oPgSz.IsInit())
|
||||
{
|
||||
const ComplexTypes::Word::CPageSz& pSz = pSectPr->m_oPgSz.get();
|
||||
if(pSz.m_oW.IsInit())
|
||||
W = pSz.m_oW.get().ToMm();
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgSzType::WTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pSz.m_oW->ToTwips());
|
||||
}
|
||||
if(pSz.m_oH.IsInit())
|
||||
H = pSz.m_oH.get().ToMm();
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgSzType::HTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pSz.m_oH->ToTwips());
|
||||
}
|
||||
if(pSz.m_oOrient.IsInit())
|
||||
{
|
||||
BYTE Orientation = orientation_Portrait;
|
||||
switch(pSz.m_oOrient.get().GetValue())
|
||||
{
|
||||
case SimpleTypes::pageorientPortrait: Orientation = orientation_Portrait;break;
|
||||
case SimpleTypes::pageorientLandscape: Orientation = orientation_Landscape;break;
|
||||
default: break;
|
||||
}
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgSzType::Orientation);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(Orientation);
|
||||
}
|
||||
}
|
||||
//W
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgSzType::W);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(W);
|
||||
//H
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgSzType::H);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(H);
|
||||
//Orientation
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgSzType::Orientation);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(Orientation);
|
||||
}
|
||||
void WritePageMargin(OOX::Logic::CSectionProperty* pSectPr)
|
||||
{
|
||||
double H = Page_Height;
|
||||
double L = X_Left_Margin;
|
||||
double T = Y_Top_Margin;
|
||||
double R = X_Right_Margin;
|
||||
double B = Y_Bottom_Margin;
|
||||
double Header = Y_Default_Header;
|
||||
double Footer = Y_Default_Footer;
|
||||
|
||||
if(NULL != pSectPr && pSectPr->m_oPgSz.IsInit() && pSectPr->m_oPgMar.IsInit())
|
||||
{
|
||||
const ComplexTypes::Word::CPageSz& pSz = pSectPr->m_oPgSz.get();
|
||||
if(pSz.m_oH.IsInit())
|
||||
H = pSz.m_oH.get().ToMm();
|
||||
|
||||
const ComplexTypes::Word::CPageMar& pMar = pSectPr->m_oPgMar.get();
|
||||
if(pMar.m_oLeft.IsInit())
|
||||
L = pMar.m_oLeft.get().ToMm();
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::LeftTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pMar.m_oLeft->ToTwips());
|
||||
}
|
||||
if(pMar.m_oTop.IsInit())
|
||||
T = pMar.m_oTop.get().ToMm();
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::TopTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pMar.m_oTop->ToTwips());
|
||||
}
|
||||
if(pMar.m_oRight.IsInit())
|
||||
R = pMar.m_oRight.get().ToMm();
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::RightTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pMar.m_oRight->ToTwips());
|
||||
}
|
||||
if(pMar.m_oBottom.IsInit())
|
||||
B = pMar.m_oBottom.get().ToMm();
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::BottomTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pMar.m_oBottom->ToTwips());
|
||||
}
|
||||
if(pMar.m_oHeader.IsInit())
|
||||
Header = pMar.m_oHeader.get().ToMm();
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::HeaderTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pMar.m_oHeader->ToTwips());
|
||||
}
|
||||
if(pMar.m_oFooter.IsInit())
|
||||
Footer = pMar.m_oFooter.get().ToMm();
|
||||
}
|
||||
//Left
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::Left);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(L);
|
||||
//Top
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::Top);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(T);
|
||||
//Right
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::Right);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(R);
|
||||
//Bottom
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::Bottom);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(B);
|
||||
//Header
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::Header);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(Header);
|
||||
//Footer
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::Footer);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(Footer);
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_pgMarType::FooterTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pMar.m_oFooter->ToTwips());
|
||||
}
|
||||
}
|
||||
}
|
||||
void WriteHeaderFooter(OOX::Logic::CSectionProperty* pSectPr, std::vector<ComplexTypes::Word::CHdrFtrRef*>& aRefs, bool bHdr)
|
||||
{
|
||||
@ -1816,11 +1752,8 @@ namespace BinDocxRW
|
||||
if(tblPr.m_oTblInd->m_oW.IsInit() && false == tblPr.m_oTblInd->m_oW->IsPercent() &&
|
||||
tblPr.m_oTblInd->m_oType.IsInit() && SimpleTypes::tblwidthDxa == tblPr.m_oTblInd->m_oType->GetValue())
|
||||
{
|
||||
SimpleTypes::CPoint oPoint;
|
||||
oPoint.FromTwips(tblPr.m_oTblInd->m_oW->GetValue());
|
||||
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerProp_tblPrType::TableInd);
|
||||
m_oBcw.m_oStream.WriteDouble(oPoint.ToMm());
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerProp_tblPrType::TableIndTwips);
|
||||
m_oBcw.m_oStream.WriteLONG(tblPr.m_oTblInd->m_oW->GetValue());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
@ -1886,11 +1819,8 @@ namespace BinDocxRW
|
||||
if(cs.m_oW.IsInit() && false == cs.m_oW->IsPercent() &&
|
||||
cs.m_oType.IsInit() && SimpleTypes::tblwidthDxa == cs.m_oType->GetValue())
|
||||
{
|
||||
SimpleTypes::CPoint oPoint;
|
||||
oPoint.FromTwips(cs.m_oW->GetValue());
|
||||
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerProp_tblPrType::TableCellSpacing);
|
||||
m_oBcw.m_oStream.WriteDouble(oPoint.ToMm() * 2);//Умножаем на 2 из-за разного понимания cellSpacing
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerProp_tblPrType::TableCellSpacingTwips);
|
||||
m_oBcw.m_oStream.WriteLONG(cs.m_oW->GetValue());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
@ -1948,9 +1878,9 @@ namespace BinDocxRW
|
||||
}
|
||||
if(pr.m_oTblpX.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_tblpPrType2::TblpX);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pr.m_oTblpX->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_tblpPrType2::TblpXTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pr.m_oTblpX->ToTwips());
|
||||
}
|
||||
if(pr.m_oTblpXSpec.IsInit())
|
||||
{
|
||||
@ -1966,9 +1896,9 @@ namespace BinDocxRW
|
||||
}
|
||||
if(pr.m_oTblpY.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_tblpPrType2::TblpY);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pr.m_oTblpY->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_tblpPrType2::TblpYTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pr.m_oTblpY->ToTwips());
|
||||
}
|
||||
if(pr.m_oTblpYSpec.IsInit())
|
||||
{
|
||||
@ -2035,12 +1965,9 @@ namespace BinDocxRW
|
||||
if(cs.m_oW.IsInit() && false == cs.m_oW->IsPercent() &&
|
||||
cs.m_oType.IsInit() && SimpleTypes::tblwidthDxa == cs.m_oType->GetValue())
|
||||
{
|
||||
SimpleTypes::CPoint oPoint;
|
||||
oPoint.FromTwips(cs.m_oW->GetValue());
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rowPrType::TableCellSpacing);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oPoint.ToMm() * 2);//Умножаем на 2 из-за разного понимания cellSpacing
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rowPrType::TableCellSpacingTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(cs.m_oW->GetValue());
|
||||
}
|
||||
}
|
||||
//Height
|
||||
@ -2133,9 +2060,9 @@ namespace BinDocxRW
|
||||
|
||||
|
||||
//Value
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rowPrType::Height_Value);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(rowHeight.m_oVal->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rowPrType::Height_ValueTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(rowHeight.m_oVal->ToTwips());
|
||||
}
|
||||
}
|
||||
void WriteW(int nType, const ComplexTypes::Word::CTblWidth& tableW, bool bWrite2 = false)
|
||||
@ -6117,27 +6044,28 @@ namespace BinDocxRW
|
||||
}
|
||||
if(pAnchor.m_oDistL.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistL);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pAnchor.m_oDistL->ToMM());
|
||||
//document is corrupted if the value is greater UINT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistLEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)pAnchor.m_oDistL->GetValue());
|
||||
}
|
||||
if(pAnchor.m_oDistT.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistT);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pAnchor.m_oDistT->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistTEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)pAnchor.m_oDistT->GetValue());
|
||||
}
|
||||
if(pAnchor.m_oDistR.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistR);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pAnchor.m_oDistR->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistREmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)pAnchor.m_oDistR->GetValue());
|
||||
}
|
||||
if(pAnchor.m_oDistB.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistB);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pAnchor.m_oDistB->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerImageType2::DistBEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)pAnchor.m_oDistB->GetValue());
|
||||
}
|
||||
if(pAnchor.m_oHidden.IsInit())
|
||||
{
|
||||
@ -6356,34 +6284,39 @@ namespace BinDocxRW
|
||||
}
|
||||
void WriteEffectExtent(const OOX::Drawing::CEffectExtent& oEffectExtent)
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::Left);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oEffectExtent.m_oL.ToMm());
|
||||
int nCurPos = 0;
|
||||
//document is corrupted if the value is greater INT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::LeftEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oEffectExtent.m_oL.ToEmu());
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::Top);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oEffectExtent.m_oT.ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::TopEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oEffectExtent.m_oT.ToEmu());
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::Right);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oEffectExtent.m_oR.ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::RightEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oEffectExtent.m_oR.ToEmu());
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::Bottom);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oEffectExtent.m_oB.ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerEffectExtent::BottomEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oEffectExtent.m_oB.ToEmu());
|
||||
}
|
||||
void WriteExtent(const ComplexTypes::Drawing::CPositiveSize2D& oExtent)
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerExtent::Cx);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oExtent.m_oCx.ToMM());
|
||||
int nCurPos = 0;
|
||||
//document is corrupted if the value is greater UINT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerExtent::CxEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oExtent.m_oCx.GetValue());
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerExtent::Cy);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oExtent.m_oCy.ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerExtent::CyEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oExtent.m_oCy.GetValue());
|
||||
}
|
||||
void WritePositionH(const OOX::Drawing::CPosH& oPosH)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if(oPosH.m_oRelativeFrom.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPosHV::RelativeFrom);
|
||||
@ -6398,9 +6331,10 @@ namespace BinDocxRW
|
||||
}
|
||||
if(oPosH.m_oPosOffset.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPosHV::PosOffset);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oPosH.m_oPosOffset->ToMM());
|
||||
//document is corrupted if the value is greater INT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPosHV::PosOffsetEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oPosH.m_oPosOffset->GetValue());
|
||||
}
|
||||
if(oPosH.m_oPctOffset.IsInit())
|
||||
{
|
||||
@ -6411,6 +6345,7 @@ namespace BinDocxRW
|
||||
}
|
||||
void WritePositionV(const OOX::Drawing::CPosV& oPosV)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if(oPosV.m_oRelativeFrom.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPosHV::RelativeFrom);
|
||||
@ -6425,9 +6360,9 @@ namespace BinDocxRW
|
||||
}
|
||||
if(oPosV.m_oPosOffset.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPosHV::PosOffset);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oPosV.m_oPosOffset->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPosHV::PosOffsetEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oPosV.m_oPosOffset->GetValue());
|
||||
}
|
||||
if(oPosV.m_oPctOffset.IsInit())
|
||||
{
|
||||
@ -6468,40 +6403,43 @@ namespace BinDocxRW
|
||||
}
|
||||
void WriteSimplePos(const ComplexTypes::Drawing::CPoint2D& oSimplePos)
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerSimplePos::X);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oSimplePos.m_oX.ToMm());
|
||||
int nCurPos = 0;
|
||||
//document is corrupted if the value is greater INT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerSimplePos::XEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oSimplePos.m_oX.GetValue());
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerSimplePos::Y);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oSimplePos.m_oY.ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerSimplePos::YEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oSimplePos.m_oY.GetValue());
|
||||
}
|
||||
void WriteWrapSquare(const OOX::Drawing::CWrapSquare& oWrapSquare)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if(oWrapSquare.m_oDistL.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistL);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapSquare.m_oDistL->ToMM());
|
||||
//document is corrupted if the value is greater UINT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistLEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapSquare.m_oDistL->GetValue());
|
||||
}
|
||||
if(oWrapSquare.m_oDistT.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistT);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapSquare.m_oDistT->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistTEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapSquare.m_oDistT->GetValue());
|
||||
}
|
||||
if(oWrapSquare.m_oDistR.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistR);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapSquare.m_oDistR->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistREmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapSquare.m_oDistR->GetValue());
|
||||
}
|
||||
if(oWrapSquare.m_oDistB.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistB);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapSquare.m_oDistB->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapSquare::DistBEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapSquare.m_oDistB->GetValue());
|
||||
}
|
||||
if(oWrapSquare.m_oWrapText.IsInit())
|
||||
{
|
||||
@ -6524,15 +6462,16 @@ namespace BinDocxRW
|
||||
int nCurPos = 0;
|
||||
if(oWrapThrough.m_oDistL.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistL);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapThrough.m_oDistL->ToMM());
|
||||
//document is corrupted if the value is greater UINT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistLEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapThrough.m_oDistL->GetValue());
|
||||
}
|
||||
if(oWrapThrough.m_oDistR.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistR);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapThrough.m_oDistR->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistREmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapThrough.m_oDistR->GetValue());
|
||||
}
|
||||
if(oWrapThrough.m_oWrapText.IsInit())
|
||||
{
|
||||
@ -6555,15 +6494,16 @@ namespace BinDocxRW
|
||||
int nCurPos = 0;
|
||||
if(oWrapTight.m_oDistL.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistL);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapTight.m_oDistL->ToMM());
|
||||
//document is corrupted if the value is greater UINT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistLEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapTight.m_oDistL->GetValue());
|
||||
}
|
||||
if(oWrapTight.m_oDistR.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistR);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapTight.m_oDistR->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapThroughTight::DistREmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapTight.m_oDistR->GetValue());
|
||||
}
|
||||
if(oWrapTight.m_oWrapText.IsInit())
|
||||
{
|
||||
@ -6586,23 +6526,23 @@ namespace BinDocxRW
|
||||
int nCurPos = 0;
|
||||
if(oWrapTopBottom.m_oDistT.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapTopBottom::DistT);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapTopBottom.m_oDistT->ToMM());
|
||||
//document is corrupted if the value is greater UINT32
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapTopBottom::DistTEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapTopBottom.m_oDistT->GetValue());
|
||||
}
|
||||
if(oWrapTopBottom.m_oDistB.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapTopBottom::DistB);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oWrapTopBottom.m_oDistB->ToMM());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapTopBottom::DistBEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteULONG((_UINT32)oWrapTopBottom.m_oDistB->GetValue());
|
||||
}
|
||||
if(oWrapTopBottom.m_oEffectExtent.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapTopBottom::EffectExtent);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
|
||||
|
||||
nCurPos = m_oBcw.WriteItemWithLengthStart();
|
||||
WriteEffectExtent(oWrapTopBottom.m_oEffectExtent.get());
|
||||
WriteEffectExtent(oWrapTopBottom.m_oEffectExtent.get());
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
@ -6619,9 +6559,8 @@ namespace BinDocxRW
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWrapPolygon::Start);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
|
||||
|
||||
nCurPos = m_oBcw.WriteItemWithLengthStart();
|
||||
WritePoint2D(oWrapPath.m_oStart.get());
|
||||
WritePoint2D(oWrapPath.m_oStart.get());
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
if(oWrapPath.m_arrLineTo.size() > 0)
|
||||
@ -6648,14 +6587,15 @@ namespace BinDocxRW
|
||||
}
|
||||
void WritePoint2D(const ComplexTypes::Drawing::CPoint2D& oPoint2D)
|
||||
{
|
||||
//document is corrupted if the value is greater INT32
|
||||
int nCurPos = 0;
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPoint2D::X);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oPoint2D.m_oX.ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPoint2D::XEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oPoint2D.m_oX.ToEmu());
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPoint2D::Y);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(oPoint2D.m_oY.ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPoint2D::YEmu);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG((_INT32)oPoint2D.m_oY.ToEmu());
|
||||
}
|
||||
void WriteDocTable(OOX::Logic::CTbl* tbl)
|
||||
{
|
||||
@ -6856,9 +6796,9 @@ namespace BinDocxRW
|
||||
const ComplexTypes::Word::CTblGridCol& item = *grid.m_arrGridCol[i];
|
||||
if(item.m_oW.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerDocTableType::tblGrid_Item);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(item.m_oW->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerDocTableType::tblGrid_ItemTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(item.m_oW->ToTwips());
|
||||
}
|
||||
}
|
||||
if(grid.m_oTblGridChange.IsInit())
|
||||
@ -7533,8 +7473,8 @@ namespace BinDocxRW
|
||||
}
|
||||
if(oSettings.m_oDefaultTabStop.IsInit() && oSettings.m_oDefaultTabStop->m_oVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSer_SettingsType::DefaultTabStop);
|
||||
m_oBcw.m_oStream.WriteDouble(oSettings.m_oDefaultTabStop->m_oVal->ToMm());
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSer_SettingsType::DefaultTabStopTwips);
|
||||
m_oBcw.m_oStream.WriteLONG(oSettings.m_oDefaultTabStop->m_oVal->ToTwips());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oSettings.m_oMathPr.IsInit())
|
||||
@ -7651,9 +7591,9 @@ namespace BinDocxRW
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_MathPrType::InterSp);
|
||||
if (pInterSp->m_val.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pInterSp->m_val->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::ValTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pInterSp->m_val->ToTwips());
|
||||
}
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -7677,9 +7617,9 @@ namespace BinDocxRW
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_MathPrType::IntraSp);
|
||||
if (pIntraSp->m_val.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pIntraSp->m_val->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::ValTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pIntraSp->m_val->ToTwips());
|
||||
}
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -7690,9 +7630,9 @@ namespace BinDocxRW
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_MathPrType::LMargin);
|
||||
if (pLMargin->m_val.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pLMargin->m_val->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::ValTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pLMargin->m_val->ToTwips());
|
||||
}
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -7729,9 +7669,9 @@ namespace BinDocxRW
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_MathPrType::PostSp);
|
||||
if (pPostSp->m_val.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pPostSp->m_val->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::ValTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pPostSp->m_val->ToTwips());
|
||||
}
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -7742,9 +7682,9 @@ namespace BinDocxRW
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_MathPrType::PreSp);
|
||||
if (pPreSp->m_val.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pPreSp->m_val->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::ValTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pPreSp->m_val->ToTwips());
|
||||
}
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -7755,9 +7695,9 @@ namespace BinDocxRW
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_MathPrType::RMargin);
|
||||
if (pRMargin->m_val.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pRMargin->m_val->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::ValTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pRMargin->m_val->ToTwips());
|
||||
}
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
@ -7781,9 +7721,9 @@ namespace BinDocxRW
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_MathPrType::WrapIndent);
|
||||
if (pWrapIndent->m_val.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Double);
|
||||
m_oBcw.m_oStream.WriteDouble(pWrapIndent->m_val->ToMm());
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::ValTwips);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(pWrapIndent->m_val->ToTwips());
|
||||
}
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
|
||||
@ -53,6 +53,8 @@
|
||||
69F181AF1C77274E00B2952B /* FileDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F181AD1C77274E00B2952B /* FileDownloader.h */; };
|
||||
8A404FD3208A01AF00F2D5CF /* FileDownloader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A404FD2208A01AF00F2D5CF /* FileDownloader.cpp */; };
|
||||
8A404FD5208A01CE00F2D5CF /* FileDownloader_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A404FD4208A01CE00F2D5CF /* FileDownloader_private.h */; };
|
||||
8AB24BFD213004E400E80DDD /* CustormXmlWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AB24BFB213004E300E80DDD /* CustormXmlWriter.cpp */; };
|
||||
8AB24BFE213004E400E80DDD /* CustormXmlWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8AB24BFC213004E300E80DDD /* CustormXmlWriter.h */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@ -103,6 +105,8 @@
|
||||
69F181AD1C77274E00B2952B /* FileDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileDownloader.h; path = ../../../Common/FileDownloader/FileDownloader.h; sourceTree = "<group>"; };
|
||||
8A404FD2208A01AF00F2D5CF /* FileDownloader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileDownloader.cpp; path = ../../../Common/FileDownloader/FileDownloader.cpp; sourceTree = "<group>"; };
|
||||
8A404FD4208A01CE00F2D5CF /* FileDownloader_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileDownloader_private.h; path = ../../../Common/FileDownloader/FileDownloader_private.h; sourceTree = "<group>"; };
|
||||
8AB24BFB213004E300E80DDD /* CustormXmlWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustormXmlWriter.cpp; sourceTree = "<group>"; };
|
||||
8AB24BFC213004E300E80DDD /* CustormXmlWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustormXmlWriter.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -149,6 +153,8 @@
|
||||
children = (
|
||||
17E17EEB1AC4544900BEA2EA /* ChartWriter.h */,
|
||||
17E17EEC1AC4544900BEA2EA /* CommentsWriter.h */,
|
||||
8AB24BFB213004E300E80DDD /* CustormXmlWriter.cpp */,
|
||||
8AB24BFC213004E300E80DDD /* CustormXmlWriter.h */,
|
||||
17A765271B0F3DC30046BC0B /* DefaultThemeWriter.h */,
|
||||
17E17EF01AC4544900BEA2EA /* DocumentRelsWriter.h */,
|
||||
17E17EF11AC4544900BEA2EA /* DocumentWriter.h */,
|
||||
@ -292,6 +298,7 @@
|
||||
17C1FEBC1ACC42C4006B99B3 /* DocxSerializer.h in Headers */,
|
||||
17C1FEBD1ACC42C4006B99B3 /* FileWriter.h in Headers */,
|
||||
17C1FEBE1ACC42C4006B99B3 /* CSVWriter.h in Headers */,
|
||||
8AB24BFE213004E400E80DDD /* CustormXmlWriter.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -346,6 +353,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8AB24BFD213004E400E80DDD /* CustormXmlWriter.cpp in Sources */,
|
||||
17C1FE961ACC42C4006B99B3 /* Common.cpp in Sources */,
|
||||
17C1FE971ACC42C4006B99B3 /* ChartFromToBinary.cpp in Sources */,
|
||||
17C1FE981ACC42C4006B99B3 /* CSVReader.cpp in Sources */,
|
||||
@ -375,18 +383,11 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
NODOCX,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
USE_ATL_CSTRING,
|
||||
USE_AVSOFFICESTUDIO_XMLUTILS,
|
||||
SOLUTION_ASCOFFICEDOCXFILE2,
|
||||
_USE_LIBXML2_READER_,
|
||||
LIBXML_READER_ENABLED,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
_XCODE,
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
@ -414,18 +415,11 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
NODOCX,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
USE_ATL_CSTRING,
|
||||
USE_AVSOFFICESTUDIO_XMLUTILS,
|
||||
SOLUTION_ASCOFFICEDOCXFILE2,
|
||||
_USE_LIBXML2_READER_,
|
||||
LIBXML_READER_ENABLED,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
_XCODE,
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
|
||||
@ -105,7 +105,7 @@ HRESULT convert_single(std::wstring srcFileName)
|
||||
}
|
||||
_CP_LOG << L"[info] " << srcFileName << std::endl;
|
||||
|
||||
nResult = ConvertODF2OOXml(srcTempPath, dstTempPath, L"C:\\Windows\\Fonts", srcTempPath2, L"password", NULL);
|
||||
nResult = ConvertODF2OOXml(srcTempPath, dstTempPath, L"C:\\Windows\\Fonts", srcTempPath2, L"", NULL);
|
||||
|
||||
if (srcTempPath != srcFileName)
|
||||
{
|
||||
|
||||
@ -1411,7 +1411,31 @@ std::wstring CDrawingConverter::ObjectToVML (const std::wstring& sXml)
|
||||
|
||||
HRESULT CDrawingConverter::AddObject(const std::wstring& bsXml, std::wstring** pMainProps)
|
||||
{
|
||||
std::wstring sBegin(L"<main xmlns:wpc=\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\" xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns:p=\"urn:schemas-microsoft-com:office:powerpoint\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:w10=\"urn:schemas-microsoft-com:office:word\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" xmlns:ve=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" xmlns:wp14=\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\" xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\" xmlns:w15=\"http://schemas.microsoft.com/office/word/2012/wordml\" xmlns:wpg=\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\" xmlns:wpi=\"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\" xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\" xmlns:wps=\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" xmlns:a14=\"http://schemas.microsoft.com/office/drawing/2010/main\" xmlns:pic=\"http://schemas.openxmlformats.org/drawingml/2006/picture\" xmlns:xdr=\"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\">");
|
||||
std::wstring sBegin(L"<main \
|
||||
xmlns:wpc=\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\" \
|
||||
xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \
|
||||
xmlns:p=\"urn:schemas-microsoft-com:office:powerpoint\" \
|
||||
xmlns:v=\"urn:schemas-microsoft-com:vml\" \
|
||||
xmlns:x=\"urn:schemas-microsoft-com:office:excel\" \
|
||||
xmlns:o=\"urn:schemas-microsoft-com:office:office\" \
|
||||
xmlns:w10=\"urn:schemas-microsoft-com:office:word\" \
|
||||
xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" \
|
||||
xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" \
|
||||
xmlns:ve=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \
|
||||
xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" \
|
||||
xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" \
|
||||
xmlns:wp14=\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\" \
|
||||
xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\" \
|
||||
xmlns:w15=\"http://schemas.microsoft.com/office/word/2012/wordml\" \
|
||||
xmlns:wpg=\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\" \
|
||||
xmlns:wpi=\"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\" \
|
||||
xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\" \
|
||||
xmlns:wps=\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\" \
|
||||
xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" \
|
||||
xmlns:a14=\"http://schemas.microsoft.com/office/drawing/2010/main\" \
|
||||
xmlns:pic=\"http://schemas.openxmlformats.org/drawingml/2006/picture\" \
|
||||
xmlns:xdr=\"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\" \
|
||||
mc:Ignorable=\"w14 w15 wp14\">");
|
||||
|
||||
std::wstring sEnd(L"</main>");
|
||||
std::wstring strXml = sBegin + bsXml + sEnd;
|
||||
@ -2386,6 +2410,25 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
XmlMacroReadAttributeBase(oNodeShape, L"strokecolor", sStrokeColor);
|
||||
XmlMacroReadAttributeBase(oNodeShape, L"strokeweight", sStrokeWeight);
|
||||
XmlMacroReadAttributeBase(oNodeShape, L"stroked", sStroked);
|
||||
|
||||
XmlUtils::CXmlNode oNodeStroke = oNodeShape.ReadNode(L"v:stroke");
|
||||
if (oNodeStroke.IsValid())
|
||||
{
|
||||
nullable_string sStrokeOn;
|
||||
XmlMacroReadAttributeBase(oNodeStroke, L"on", sStrokeOn);
|
||||
if (sStrokeOn.is_init())
|
||||
{
|
||||
sStroked.reset();
|
||||
sStroked = sStrokeOn;
|
||||
}
|
||||
nullable_string sStrokeColor1;
|
||||
XmlMacroReadAttributeBase(oNodeStroke, L"strokecolor", sStrokeColor1);
|
||||
if (sStrokeColor1.is_init())
|
||||
{
|
||||
sStrokeColor1.reset();
|
||||
sStrokeColor = sStrokeColor1;
|
||||
}
|
||||
}
|
||||
|
||||
//textFill
|
||||
strRPr += L"<w14:textFill>";
|
||||
@ -2533,8 +2576,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
strRPr += L"<w14:noFill/>";
|
||||
bStroked = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (sStrokeColor.is_init())
|
||||
{
|
||||
color = NS_DWC_Common::getColorFromString(*sStrokeColor);
|
||||
@ -4461,9 +4503,21 @@ void CDrawingConverter::CheckPenShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils::
|
||||
pSpPr->ln->w = size;
|
||||
pPPTShape->m_bIsStroked = true;
|
||||
}
|
||||
|
||||
XmlUtils::CXmlNode oNodeStroke = oNode.ReadNode(L"v:stroke");
|
||||
|
||||
nullable_string sStroked;
|
||||
XmlMacroReadAttributeBase(oNode, L"stroked", sStroked);
|
||||
|
||||
if (oNodeStroke.IsValid())
|
||||
{
|
||||
nullable_string sStrokeOn;
|
||||
XmlMacroReadAttributeBase(oNodeStroke, L"on", sStrokeOn);
|
||||
if (sStrokeOn.is_init())
|
||||
{
|
||||
sStroked.reset();
|
||||
sStroked = sStrokeOn;
|
||||
}
|
||||
}
|
||||
if (sStroked.is_init())
|
||||
{
|
||||
if (*sStroked == L"false" || *sStroked == L"f")
|
||||
@ -4484,16 +4538,8 @@ void CDrawingConverter::CheckPenShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils::
|
||||
pSpPr->ln->Fill.Fill = new PPTX::Logic::NoFill();
|
||||
}
|
||||
|
||||
XmlUtils::CXmlNode oNodeStroke = oNode.ReadNode(L"v:stroke");
|
||||
if (oNodeStroke.IsValid())
|
||||
{
|
||||
nullable_string sStrokeOn;
|
||||
XmlMacroReadAttributeBase(oNodeStroke, L"on", sStrokeOn);
|
||||
if (sStrokeOn.is_init())
|
||||
{
|
||||
sStroked.reset();
|
||||
sStroked = sStrokeOn;
|
||||
}
|
||||
sStrokeColor.reset();
|
||||
XmlMacroReadAttributeBase(oNodeStroke, L"strokecolor", sStrokeColor);
|
||||
if (sStrokeColor.is_init())
|
||||
|
||||
@ -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
|
||||
|
||||
@ -19,7 +19,6 @@
|
||||
17C1FCB71ACC429D006B99B3 /* CxnSp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A44361AC57B83005A27F7 /* CxnSp.cpp */; };
|
||||
17C1FCB81ACC429D006B99B3 /* Hyperlink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A44771AC57B83005A27F7 /* Hyperlink.cpp */; };
|
||||
17C1FCB91ACC429D006B99B3 /* SpPr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A44B11AC57B83005A27F7 /* SpPr.cpp */; };
|
||||
17C1FCBA1ACC429D006B99B3 /* TableCell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A44BC1AC57B83005A27F7 /* TableCell.cpp */; };
|
||||
17C1FCBB1ACC429D006B99B3 /* FileFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A43A11AC57B83005A27F7 /* FileFactory.cpp */; };
|
||||
17C1FCBC1ACC429D006B99B3 /* pptxformatlib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A43681AC57B46005A27F7 /* pptxformatlib.cpp */; };
|
||||
17C1FCBD1ACC429D006B99B3 /* TxBody.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A45091AC57B83005A27F7 /* TxBody.cpp */; };
|
||||
@ -831,6 +830,13 @@
|
||||
696791821D9E8B81002CA4BA /* MathParaWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 696791801D9E8B81002CA4BA /* MathParaWrapper.cpp */; };
|
||||
696791831D9E8B81002CA4BA /* MathParaWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 696791811D9E8B81002CA4BA /* MathParaWrapper.h */; };
|
||||
697DFC1E200F51A700F0A9AF /* WavAudioFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 697DFC1D200F51A600F0A9AF /* WavAudioFile.cpp */; };
|
||||
8A35A6FF215E612C005CC806 /* xmlutils.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A35A6FE215E612B005CC806 /* xmlutils.h */; };
|
||||
8A35A701215E6194005CC806 /* xmldom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A35A700215E6194005CC806 /* xmldom.cpp */; };
|
||||
8A35A706215E61BE005CC806 /* xmllight_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A35A703215E61BE005CC806 /* xmllight_private.h */; };
|
||||
8A35A707215E61BE005CC806 /* xmllight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A35A704215E61BE005CC806 /* xmllight.cpp */; };
|
||||
8A35A709215E622B005CC806 /* BlipFill.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A35A708215E622B005CC806 /* BlipFill.cpp */; };
|
||||
8A35A70B215E626D005CC806 /* UniFill.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A35A70A215E626D005CC806 /* UniFill.cpp */; };
|
||||
8A35A70D215E62D0005CC806 /* TableCell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A35A70C215E62D0005CC806 /* TableCell.cpp */; };
|
||||
8A9FACE120777BA7007787F6 /* Structures.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A9FACE020777BA7007787F6 /* Structures.h */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@ -1109,7 +1115,6 @@
|
||||
179A44B81AC57B83005A27F7 /* SupplementalFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SupplementalFont.h; sourceTree = "<group>"; };
|
||||
179A44B91AC57B83005A27F7 /* Tab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tab.h; sourceTree = "<group>"; };
|
||||
179A44BB1AC57B83005A27F7 /* Table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Table.h; sourceTree = "<group>"; };
|
||||
179A44BC1AC57B83005A27F7 /* TableCell.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TableCell.cpp; sourceTree = "<group>"; };
|
||||
179A44BD1AC57B83005A27F7 /* TableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableCell.h; sourceTree = "<group>"; };
|
||||
179A44BE1AC57B83005A27F7 /* TableCellProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableCellProperties.h; sourceTree = "<group>"; };
|
||||
179A44BF1AC57B83005A27F7 /* TableCol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableCol.h; sourceTree = "<group>"; };
|
||||
@ -1662,6 +1667,13 @@
|
||||
696791801D9E8B81002CA4BA /* MathParaWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathParaWrapper.cpp; sourceTree = "<group>"; };
|
||||
696791811D9E8B81002CA4BA /* MathParaWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathParaWrapper.h; sourceTree = "<group>"; };
|
||||
697DFC1D200F51A600F0A9AF /* WavAudioFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WavAudioFile.cpp; sourceTree = "<group>"; };
|
||||
8A35A6FE215E612B005CC806 /* xmlutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xmlutils.h; path = ../../../DesktopEditor/xml/include/xmlutils.h; sourceTree = "<group>"; };
|
||||
8A35A700215E6194005CC806 /* xmldom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = xmldom.cpp; path = ../../../DesktopEditor/xml/src/xmldom.cpp; sourceTree = "<group>"; };
|
||||
8A35A703215E61BE005CC806 /* xmllight_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xmllight_private.h; path = ../../../DesktopEditor/xml/src/xmllight_private.h; sourceTree = "<group>"; };
|
||||
8A35A704215E61BE005CC806 /* xmllight.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = xmllight.cpp; path = ../../../DesktopEditor/xml/src/xmllight.cpp; sourceTree = "<group>"; };
|
||||
8A35A708215E622B005CC806 /* BlipFill.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BlipFill.cpp; sourceTree = "<group>"; };
|
||||
8A35A70A215E626D005CC806 /* UniFill.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UniFill.cpp; sourceTree = "<group>"; };
|
||||
8A35A70C215E62D0005CC806 /* TableCell.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TableCell.cpp; sourceTree = "<group>"; };
|
||||
8A9FACE020777BA7007787F6 /* Structures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Structures.h; path = Drawing/Structures.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@ -1679,6 +1691,7 @@
|
||||
17063B5A1AC5708E0056A3F1 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8A35A6FD215E6124005CC806 /* XmlUtils */,
|
||||
695BC0221C070DCB00817D7E /* HtmlRenderer */,
|
||||
175CC2441AC96AA0007D7DEC /* OfficeDrawing */,
|
||||
17D91A141AC5A4DF0096D788 /* Editor */,
|
||||
@ -1983,14 +1996,15 @@
|
||||
179A44CC1AC57B83005A27F7 /* TextSpacing.h */,
|
||||
179A44CD1AC57B83005A27F7 /* Timing */,
|
||||
179A44FA1AC57B83005A27F7 /* Transitions */,
|
||||
179A45091AC57B83005A27F7 /* TxBody.cpp */,
|
||||
179A450A1AC57B83005A27F7 /* TxBody.h */,
|
||||
179A45091AC57B83005A27F7 /* TxBody.cpp */,
|
||||
179A450B1AC57B83005A27F7 /* TxStyles.h */,
|
||||
179A450C1AC57B83005A27F7 /* UniColor.cpp */,
|
||||
179A450D1AC57B83005A27F7 /* UniColor.h */,
|
||||
179A450E1AC57B83005A27F7 /* UniEffect.cpp */,
|
||||
179A450F1AC57B83005A27F7 /* UniEffect.h */,
|
||||
179A450E1AC57B83005A27F7 /* UniEffect.cpp */,
|
||||
179A45101AC57B83005A27F7 /* UniFill.h */,
|
||||
8A35A70A215E626D005CC806 /* UniFill.cpp */,
|
||||
179A45111AC57B83005A27F7 /* UniMedia.h */,
|
||||
179A45121AC57B83005A27F7 /* UniPath2D.h */,
|
||||
179A45131AC57B83005A27F7 /* Xfrm.h */,
|
||||
@ -2076,6 +2090,7 @@
|
||||
179A44611AC57B83005A27F7 /* Blip.cpp */,
|
||||
179A44621AC57B83005A27F7 /* Blip.h */,
|
||||
179A44631AC57B83005A27F7 /* BlipFill.h */,
|
||||
8A35A708215E622B005CC806 /* BlipFill.cpp */,
|
||||
179A44641AC57B83005A27F7 /* GradFill.h */,
|
||||
179A44651AC57B83005A27F7 /* NoFill.h */,
|
||||
179A44661AC57B83005A27F7 /* PattFill.h */,
|
||||
@ -2128,8 +2143,8 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
179A44BB1AC57B83005A27F7 /* Table.h */,
|
||||
179A44BC1AC57B83005A27F7 /* TableCell.cpp */,
|
||||
179A44BD1AC57B83005A27F7 /* TableCell.h */,
|
||||
8A35A70C215E62D0005CC806 /* TableCell.cpp */,
|
||||
179A44BE1AC57B83005A27F7 /* TableCellProperties.h */,
|
||||
179A44BF1AC57B83005A27F7 /* TableCol.h */,
|
||||
179A44C01AC57B83005A27F7 /* TableProperties.h */,
|
||||
@ -2737,6 +2752,17 @@
|
||||
path = OOXMLShapes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8A35A6FD215E6124005CC806 /* XmlUtils */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8A35A6FE215E612B005CC806 /* xmlutils.h */,
|
||||
8A35A703215E61BE005CC806 /* xmllight_private.h */,
|
||||
8A35A704215E61BE005CC806 /* xmllight.cpp */,
|
||||
8A35A700215E6194005CC806 /* xmldom.cpp */,
|
||||
);
|
||||
name = XmlUtils;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
@ -3230,6 +3256,7 @@
|
||||
69656E411FC2FF800028C4BA /* QuadArrowCalloutType.h in Headers */,
|
||||
17C1FDE51ACC429D006B99B3 /* OuterShdw.h in Headers */,
|
||||
69656E5F1FC2FF800028C4BA /* WaveType.h in Headers */,
|
||||
8A35A6FF215E612C005CC806 /* xmlutils.h in Headers */,
|
||||
17C1FDE61ACC429D006B99B3 /* PPTXEvent.h in Headers */,
|
||||
69656ED01FC2FF800028C4BA /* CHeptagon.h in Headers */,
|
||||
69656EF71FC2FF800028C4BA /* CQuadArrowCallout.h in Headers */,
|
||||
@ -3380,6 +3407,7 @@
|
||||
17C1FE401ACC429D006B99B3 /* Conformance.h in Headers */,
|
||||
17C1FE411ACC429D006B99B3 /* TLColorSpace.h in Headers */,
|
||||
69656E5C1FC2FF800028C4BA /* UturnArrowType.h in Headers */,
|
||||
8A35A706215E61BE005CC806 /* xmllight_private.h in Headers */,
|
||||
69656EFF1FC2FF800028C4BA /* CRound1Rect.h in Headers */,
|
||||
69656EA21FC2FF800028C4BA /* CDiagStripe.h in Headers */,
|
||||
17C1FE421ACC429D006B99B3 /* Sld.h in Headers */,
|
||||
@ -3588,8 +3616,8 @@
|
||||
17C1FCB91ACC429D006B99B3 /* SpPr.cpp in Sources */,
|
||||
695BBFF81C06FFA100817D7E /* TextAttributesEx.cpp in Sources */,
|
||||
17C1E3E11AD40612001E3D18 /* Controls.cpp in Sources */,
|
||||
17C1FCBA1ACC429D006B99B3 /* TableCell.cpp in Sources */,
|
||||
17C1FCBB1ACC429D006B99B3 /* FileFactory.cpp in Sources */,
|
||||
8A35A709215E622B005CC806 /* BlipFill.cpp in Sources */,
|
||||
17C1FCBC1ACC429D006B99B3 /* pptxformatlib.cpp in Sources */,
|
||||
17C1FCBD1ACC429D006B99B3 /* TxBody.cpp in Sources */,
|
||||
697DFC1E200F51A700F0A9AF /* WavAudioFile.cpp in Sources */,
|
||||
@ -3602,8 +3630,10 @@
|
||||
17C1FCC51ACC429D006B99B3 /* Shape.cpp in Sources */,
|
||||
17C1FCC71ACC429D006B99B3 /* BuildNodeBase.cpp in Sources */,
|
||||
17C1FCC81ACC429D006B99B3 /* ContentPart.cpp in Sources */,
|
||||
8A35A707215E61BE005CC806 /* xmllight.cpp in Sources */,
|
||||
69656F501FC2FF800028C4BA /* PptxShape.cpp in Sources */,
|
||||
69656E631FC2FF800028C4BA /* PptFormula.cpp in Sources */,
|
||||
8A35A70D215E62D0005CC806 /* TableCell.cpp in Sources */,
|
||||
17C1FCC91ACC429D006B99B3 /* CNvGrpSpPr.cpp in Sources */,
|
||||
17C1FCCA1ACC429D006B99B3 /* EffectStyle.cpp in Sources */,
|
||||
17C1FCCB1ACC429D006B99B3 /* UniColor.cpp in Sources */,
|
||||
@ -3615,6 +3645,7 @@
|
||||
17C1FCD11ACC429D006B99B3 /* Bg.cpp in Sources */,
|
||||
17C1FCD21ACC429D006B99B3 /* Folder.cpp in Sources */,
|
||||
17C1FCD31ACC429D006B99B3 /* BinaryFileReaderWriter.cpp in Sources */,
|
||||
8A35A701215E6194005CC806 /* xmldom.cpp in Sources */,
|
||||
17C1FCD41ACC429D006B99B3 /* TimeNodeBase.cpp in Sources */,
|
||||
17C1FCD51ACC429D006B99B3 /* GraphicFrame.cpp in Sources */,
|
||||
69656E651FC2FF800028C4BA /* PptShape.cpp in Sources */,
|
||||
@ -3623,6 +3654,7 @@
|
||||
17C1FCD81ACC429D006B99B3 /* UniEffect.cpp in Sources */,
|
||||
17C1FCDA1ACC429D006B99B3 /* Pic.cpp in Sources */,
|
||||
17C1FCDB1ACC429D006B99B3 /* NvGraphicFramePr.cpp in Sources */,
|
||||
8A35A70B215E626D005CC806 /* UniFill.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -3738,20 +3770,9 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
PPTX_DEF,
|
||||
PPT_DEF,
|
||||
ENABLE_PPT_TO_PPTX_CONVERT,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML,
|
||||
NODOCX,
|
||||
CXIMAGE_DONT_DECLARE_TCHAR,
|
||||
BUILD_CONFIG_FULL_VERSION,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
CXIMAGE_DONT_DECLARE_TCHAR,
|
||||
_IOS,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
@ -3780,20 +3801,9 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
PPTX_DEF,
|
||||
PPT_DEF,
|
||||
ENABLE_PPT_TO_PPTX_CONVERT,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML,
|
||||
NODOCX,
|
||||
CXIMAGE_DONT_DECLARE_TCHAR,
|
||||
BUILD_CONFIG_FULL_VERSION,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
CXIMAGE_DONT_DECLARE_TCHAR,
|
||||
_IOS,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
|
||||
@ -86,7 +86,6 @@
|
||||
6967B1561E27B4B800A129E2 /* OOXParagraphElementReaders.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OOXParagraphElementReaders.cpp; sourceTree = "<group>"; };
|
||||
6967B1571E27B4B800A129E2 /* OOXParagraphReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OOXParagraphReader.h; sourceTree = "<group>"; };
|
||||
6967B1581E27B4B800A129E2 /* OOXPictureAnchorReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OOXPictureAnchorReader.h; sourceTree = "<group>"; };
|
||||
6967B1591E27B4B800A129E2 /* OOXPictureGraphicReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OOXPictureGraphicReader.h; sourceTree = "<group>"; };
|
||||
6967B15A1E27B4B800A129E2 /* OOXPictureInlineReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OOXPictureInlineReader.h; sourceTree = "<group>"; };
|
||||
6967B15B1E27B4B800A129E2 /* OOXPictureReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OOXPictureReader.h; sourceTree = "<group>"; };
|
||||
6967B15C1E27B4B800A129E2 /* OOXpPrFrameReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OOXpPrFrameReader.h; sourceTree = "<group>"; };
|
||||
@ -241,7 +240,6 @@
|
||||
6967B1561E27B4B800A129E2 /* OOXParagraphElementReaders.cpp */,
|
||||
6967B1571E27B4B800A129E2 /* OOXParagraphReader.h */,
|
||||
6967B1581E27B4B800A129E2 /* OOXPictureAnchorReader.h */,
|
||||
6967B1591E27B4B800A129E2 /* OOXPictureGraphicReader.h */,
|
||||
6967B15A1E27B4B800A129E2 /* OOXPictureInlineReader.h */,
|
||||
6967B15B1E27B4B800A129E2 /* OOXPictureReader.h */,
|
||||
6967B15C1E27B4B800A129E2 /* OOXpPrFrameReader.h */,
|
||||
@ -574,21 +572,14 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
LINUX,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
PPT_DEF,
|
||||
_IOS,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML,
|
||||
_XCODE,
|
||||
_IOS,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/,
|
||||
/usr/include/libxml2/,
|
||||
/usr/include/libxml2,
|
||||
"$(PROJECT_DIR)/../../../Common/3dParty/boost/boost_1_58_0",
|
||||
"$(PROJECT_DIR)/../../../DesktopEditor",
|
||||
"$(PROJECT_DIR)/../../../DesktopEditor/freetype-2.5.2/include",
|
||||
@ -608,21 +599,14 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
LINUX,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
PPT_DEF,
|
||||
_IOS,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML,
|
||||
_XCODE,
|
||||
_IOS,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/,
|
||||
/usr/include/libxml2/,
|
||||
/usr/include/libxml2,
|
||||
"$(PROJECT_DIR)/../../../Common/3dParty/boost/boost_1_58_0",
|
||||
"$(PROJECT_DIR)/../../../DesktopEditor",
|
||||
"$(PROJECT_DIR)/../../../DesktopEditor/freetype-2.5.2/include",
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
6967AFE91E279C6F00A129E2 /* ToString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967AFE51E279C6F00A129E2 /* ToString.cpp */; };
|
||||
6967AFF01E279C7700A129E2 /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967AFEB1E279C7700A129E2 /* File.cpp */; };
|
||||
6967AFF11E279C7700A129E2 /* TxtFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967AFED1E279C7700A129E2 /* TxtFile.cpp */; };
|
||||
8AB24C012130055700E80DDD /* SystemUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AB24C002130055700E80DDD /* SystemUtils.cpp */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@ -49,6 +50,8 @@
|
||||
6967AFED1E279C7700A129E2 /* TxtFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TxtFile.cpp; sourceTree = "<group>"; };
|
||||
6967AFEE1E279C7700A129E2 /* TxtFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TxtFile.h; sourceTree = "<group>"; };
|
||||
6967AFEF1E279C7700A129E2 /* TxtFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TxtFormat.h; sourceTree = "<group>"; };
|
||||
8AB24BFF2130055700E80DDD /* SystemUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SystemUtils.h; path = ../../../../DesktopEditor/common/SystemUtils.h; sourceTree = "<group>"; };
|
||||
8AB24C002130055700E80DDD /* SystemUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SystemUtils.cpp; path = ../../../../DesktopEditor/common/SystemUtils.cpp; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -104,6 +107,8 @@
|
||||
6967AFE51E279C6F00A129E2 /* ToString.cpp */,
|
||||
6967AFE61E279C6F00A129E2 /* ToString.h */,
|
||||
6967AFE71E279C6F00A129E2 /* Utility.h */,
|
||||
8AB24C002130055700E80DDD /* SystemUtils.cpp */,
|
||||
8AB24BFF2130055700E80DDD /* SystemUtils.h */,
|
||||
);
|
||||
name = Common;
|
||||
path = ../../../Source/Common;
|
||||
@ -186,6 +191,7 @@
|
||||
6967AFD61E2798DB00A129E2 /* TxtXmlFile.cpp in Sources */,
|
||||
6967AFF01E279C7700A129E2 /* File.cpp in Sources */,
|
||||
6967AFD51E2798DB00A129E2 /* ConvertTxt2Docx.cpp in Sources */,
|
||||
8AB24C012130055700E80DDD /* SystemUtils.cpp in Sources */,
|
||||
6967AFD41E2798DB00A129E2 /* ConvertDocx2Txt.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -304,10 +310,6 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
LIBXML_READER_ENABLED,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
@ -316,8 +318,7 @@
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/,
|
||||
/usr/include/libxml2/,
|
||||
/usr/include/libxml2,
|
||||
"$(PROJECT_DIR)/../../../../Common/3dParty/boost/boost_1_58_0",
|
||||
"$(PROJECT_DIR)/../../../../DesktopEditor/xml/libxml2/include",
|
||||
"$(PROJECT_DIR)/../../../../DesktopEditor/freetype-2.5.2/include",
|
||||
@ -335,10 +336,6 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
LIBXML_READER_ENABLED,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
@ -347,8 +344,7 @@
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/,
|
||||
/usr/include/libxml2/,
|
||||
/usr/include/libxml2,
|
||||
"$(PROJECT_DIR)/../../../../Common/3dParty/boost/boost_1_58_0",
|
||||
"$(PROJECT_DIR)/../../../../DesktopEditor/xml/libxml2/include",
|
||||
"$(PROJECT_DIR)/../../../../DesktopEditor/freetype-2.5.2/include",
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1231,9 +1231,6 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
@ -1245,7 +1242,7 @@
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/,
|
||||
/usr/include/libxml2/,
|
||||
/usr/include/libxml2,
|
||||
"$(PROJECT_DIR)/../../../UnicodeConverter/icubuilds/mac/icu/**",
|
||||
"$(PROJECT_DIR)/../../../UnicodeConverter/icubuilds/mac/icu/icu/common",
|
||||
"$(PROJECT_DIR)/../../../UnicodeConverter/icubuilds/mac/icu/icu/i18n",
|
||||
@ -1273,9 +1270,6 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
@ -1287,7 +1281,7 @@
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/,
|
||||
/usr/include/libxml2/,
|
||||
/usr/include/libxml2,
|
||||
"$(PROJECT_DIR)/../../../UnicodeConverter/icubuilds/mac/icu/**",
|
||||
"$(PROJECT_DIR)/../../../UnicodeConverter/icubuilds/mac/icu/icu/common",
|
||||
"$(PROJECT_DIR)/../../../UnicodeConverter/icubuilds/mac/icu/icu/i18n",
|
||||
|
||||
@ -165,6 +165,10 @@ namespace SimpleTypes
|
||||
{
|
||||
return (long)Pt_To_Dx(m_dValue);
|
||||
}
|
||||
long ToHps() const
|
||||
{
|
||||
return (long)(m_dValue * 2);
|
||||
}
|
||||
unsigned long ToUnsignedTwips() const
|
||||
{
|
||||
return (unsigned long)Pt_To_Dx(m_dValue);
|
||||
|
||||
@ -4884,11 +4884,11 @@ namespace SimpleTypes
|
||||
enum EShd
|
||||
{
|
||||
shdClear = 0,
|
||||
shdDiagCross = 1,
|
||||
shdDiagStripe = 2,
|
||||
shdHorzCross = 3,
|
||||
shdHorzStripe = 4,
|
||||
shdNil = 5,
|
||||
shdNil = 1,
|
||||
shdDiagCross = 2,
|
||||
shdDiagStripe = 3,
|
||||
shdHorzCross = 4,
|
||||
shdHorzStripe = 5,
|
||||
shdPct10 = 6,
|
||||
shdPct12 = 7,
|
||||
shdPct15 = 8,
|
||||
|
||||
@ -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"
|
||||
|
||||
|
||||
@ -991,10 +991,10 @@ namespace NSEditorApi
|
||||
js_wrapper<int> m_nTransitionType;
|
||||
js_wrapper<int> m_nTransitionOption;
|
||||
js_wrapper<int> m_nTransitionDuration;
|
||||
js_wrapper<int> m_nSlideAdvanceDuration;
|
||||
|
||||
js_wrapper<bool> m_bSlideAdvanceOnMouseClick;
|
||||
js_wrapper<bool> m_bSlideAdvanceAfter;
|
||||
js_wrapper<bool> m_bSlideAdvanceDuration;
|
||||
js_wrapper<bool> m_bShowLoop;
|
||||
|
||||
public:
|
||||
@ -1007,10 +1007,10 @@ namespace NSEditorApi
|
||||
LINK_PROPERTY_INT_JS(TransitionType)
|
||||
LINK_PROPERTY_INT_JS(TransitionOption)
|
||||
LINK_PROPERTY_INT_JS(TransitionDuration)
|
||||
LINK_PROPERTY_INT_JS(SlideAdvanceDuration)
|
||||
|
||||
LINK_PROPERTY_BOOL_JS(SlideAdvanceOnMouseClick)
|
||||
LINK_PROPERTY_BOOL_JS(SlideAdvanceAfter)
|
||||
LINK_PROPERTY_BOOL_JS(SlideAdvanceDuration)
|
||||
LINK_PROPERTY_BOOL_JS(ShowLoop)
|
||||
};
|
||||
|
||||
|
||||
@ -690,6 +690,7 @@
|
||||
#define ASC_MENU_EVENT_TYPE_SECTION 17
|
||||
#define ASC_MENU_EVENT_TYPE_SHAPE 18
|
||||
#define ASC_MENU_EVENT_TYPE_SLIDE 20
|
||||
#define ASC_MENU_EVENT_TYPE_CHART 21
|
||||
|
||||
// insert commands
|
||||
#define ASC_MENU_EVENT_TYPE_INSERT_IMAGE 50
|
||||
@ -748,6 +749,7 @@
|
||||
#define ASC_MENU_EVENT_TYPE_USER_ZOOM 301
|
||||
|
||||
#define ASC_MENU_EVENT_TYPE_INSERT_CHART 400
|
||||
#define ASC_MENU_EVENT_TYPE_ADD_CHART_DATA 440
|
||||
#define ASC_MENU_EVENT_TYPE_GET_CHART_DATA 450
|
||||
#define ASC_MENU_EVENT_TYPE_SET_CHART_DATA 460
|
||||
|
||||
|
||||
@ -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"
|
||||
|
||||
|
||||
60
DesktopEditor/doctrenderer/doctrenderer_android.cpp
Normal file
60
DesktopEditor/doctrenderer/doctrenderer_android.cpp
Normal 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() {}
|
||||
}
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -51,6 +51,7 @@
|
||||
8ABC65A3208A1EFA00E96FFE /* pro_Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8ABC65A2208A1EFA00E96FFE /* pro_Image.cpp */; };
|
||||
8ABC65A5208A1F1B00E96FFE /* pro_Fonts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8ABC65A4208A1F1B00E96FFE /* pro_Fonts.cpp */; };
|
||||
8ABC65A7208A1F3A00E96FFE /* MetafileToRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8ABC65A6208A1F3A00E96FFE /* MetafileToRenderer.cpp */; };
|
||||
8ADE001421302B3600BFAD8C /* SystemUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8ADE001321302B3600BFAD8C /* SystemUtils.cpp */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@ -129,6 +130,8 @@
|
||||
8ABC65A2208A1EFA00E96FFE /* pro_Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = pro_Image.cpp; path = ../../graphics/pro/pro_Image.cpp; sourceTree = "<group>"; };
|
||||
8ABC65A4208A1F1B00E96FFE /* pro_Fonts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = pro_Fonts.cpp; path = ../../graphics/pro/pro_Fonts.cpp; sourceTree = "<group>"; };
|
||||
8ABC65A6208A1F3A00E96FFE /* MetafileToRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MetafileToRenderer.cpp; path = ../../graphics/MetafileToRenderer.cpp; sourceTree = "<group>"; };
|
||||
8ADE001221302B3600BFAD8C /* SystemUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SystemUtils.h; path = ../../common/SystemUtils.h; sourceTree = "<group>"; };
|
||||
8ADE001321302B3600BFAD8C /* SystemUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SystemUtils.cpp; path = ../../common/SystemUtils.cpp; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -145,11 +148,13 @@
|
||||
1791A2181BAC19C600FC9C28 /* PdfWriter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
698AF5031C0766200080D889 /* unicode_util.cpp */,
|
||||
698AF5041C0766200080D889 /* unicode_util.h */,
|
||||
698AF5031C0766200080D889 /* unicode_util.cpp */,
|
||||
7C560FF01AA71C5C000E5860 /* AscEditorPDFPrinter.h */,
|
||||
7C560FFB1AA73B7D000E5860 /* AscEditorPDFPrinter.mm */,
|
||||
8A7E89E020E6211000E06CBE /* ICCProfile.h */,
|
||||
8ADE001221302B3600BFAD8C /* SystemUtils.h */,
|
||||
8ADE001321302B3600BFAD8C /* SystemUtils.cpp */,
|
||||
17FFC2C11BAB15CE00D91F59 /* PdfRenderer.h */,
|
||||
17FFC2C01BAB15CE00D91F59 /* PdfRenderer.cpp */,
|
||||
17FFC2C41BAB163500D91F59 /* OnlineOfficeBinToPdf.h */,
|
||||
@ -322,6 +327,7 @@
|
||||
176285F11BAAFC3B00AEDA07 /* Font.cpp in Sources */,
|
||||
176285F21BAAFC3B00AEDA07 /* Font14.cpp in Sources */,
|
||||
176E57401BB0057700276C19 /* ImageFileFormatChecker.cpp in Sources */,
|
||||
8ADE001421302B3600BFAD8C /* SystemUtils.cpp in Sources */,
|
||||
176285FD1BAAFC3B00AEDA07 /* Streams.cpp in Sources */,
|
||||
176285FA1BAAFC3B00AEDA07 /* Pages.cpp in Sources */,
|
||||
17FFC2C21BAB15CE00D91F59 /* PdfRenderer.cpp in Sources */,
|
||||
@ -467,9 +473,6 @@
|
||||
UNICODE,
|
||||
_LINUX_QT,
|
||||
LINUX,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
BUILD_CONFIG_FULL_VERSION,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
LIBXML_READER_ENABLED,
|
||||
@ -482,6 +485,7 @@
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/libxml2,
|
||||
"../../agg-2.4/include",
|
||||
"../../freetype-2.5.2/include",
|
||||
../../cximage/zlib,
|
||||
@ -509,9 +513,6 @@
|
||||
UNICODE,
|
||||
_LINUX_QT,
|
||||
LINUX,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
BUILD_CONFIG_FULL_VERSION,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
LIBXML_READER_ENABLED,
|
||||
@ -524,6 +525,7 @@
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/libxml2,
|
||||
"../../agg-2.4/include",
|
||||
"../../freetype-2.5.2/include",
|
||||
../../cximage/zlib,
|
||||
|
||||
@ -584,15 +584,20 @@
|
||||
DEVELOPMENT_TEAM = 2WH24U26GJ;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
USE_LITE_READER,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
LINUX,
|
||||
MAC,
|
||||
_IOS,
|
||||
LIBXML_READER_ENABLED,
|
||||
_XCODE,
|
||||
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,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -612,15 +617,20 @@
|
||||
DEVELOPMENT_TEAM = 2WH24U26GJ;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
USE_LITE_READER,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
LINUX,
|
||||
MAC,
|
||||
_IOS,
|
||||
LIBXML_READER_ENABLED,
|
||||
_XCODE,
|
||||
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,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -34,9 +34,15 @@
|
||||
|
||||
#include "../../../DesktopEditor/common/File.h"
|
||||
|
||||
#include "../libxml2/libxml.h"
|
||||
#include "../libxml2/include/libxml/xmlreader.h"
|
||||
#include "../libxml2/include/libxml/c14n.h"
|
||||
#ifdef _IOS
|
||||
#include <libxml2/libxml/xmlreader.h>
|
||||
#include <libxml2/libxml/c14n.h>
|
||||
#else
|
||||
#include "../libxml2/libxml.h"
|
||||
#include "../libxml2/include/libxml/xmlreader.h"
|
||||
#include "../libxml2/include/libxml/c14n.h"
|
||||
#endif
|
||||
|
||||
#include "../include/xmlutils.h"
|
||||
|
||||
namespace XmlUtils
|
||||
|
||||
@ -12,6 +12,10 @@
|
||||
#define OOXML_HASH_ALG_SHA384 4
|
||||
#define OOXML_HASH_ALG_SHA512 5
|
||||
|
||||
#define OOXML_HASH_ALG_GOST_GR3411 10
|
||||
#define OOXML_HASH_ALG_GOST_GR3411_2012_256 11
|
||||
#define OOXML_HASH_ALG_GOST_GR3411_2012_512 12
|
||||
|
||||
#define OPEN_SSL_WARNING_OK 0
|
||||
#define OPEN_SSL_WARNING_ERR 1
|
||||
#define OPEN_SSL_WARNING_ALL_OK 2
|
||||
@ -91,6 +95,7 @@ public:
|
||||
public:
|
||||
virtual std::string GetNumber() = 0;
|
||||
virtual std::wstring GetSignerName() = 0;
|
||||
virtual std::wstring GetIssuerName() = 0;
|
||||
|
||||
virtual std::string GetCertificateBase64() = 0;
|
||||
virtual std::string GetCertificateHash() = 0;
|
||||
@ -111,6 +116,8 @@ public:
|
||||
virtual std::vector<int> GetHashAlgs() = 0;
|
||||
virtual int GetHashAlg() = 0;
|
||||
|
||||
virtual bool IsGOST() = 0;
|
||||
|
||||
public:
|
||||
virtual int ShowSelectDialog(void* parent = NULL) = 0;
|
||||
virtual int ShowCertificate(void* parent = NULL) = 0;
|
||||
|
||||
@ -445,7 +445,10 @@ Type=\"http://schemas.openxmlformats.org/package/2006/relationships/digital-sign
|
||||
builder.WriteString(L"<SignatureImage>");
|
||||
builder.WriteString(m_image_valid);
|
||||
builder.WriteString(L"</SignatureImage>");
|
||||
builder.WriteString(L"<SignatureComments/>\
|
||||
|
||||
if (!m_certificate->IsGOST())
|
||||
{
|
||||
builder.WriteString(L"<SignatureComments/>\
|
||||
<WindowsVersion>10.0</WindowsVersion>\
|
||||
<OfficeVersion>16.0</OfficeVersion>\
|
||||
<ApplicationVersion>16.0</ApplicationVersion>\
|
||||
@ -460,6 +463,25 @@ Type=\"http://schemas.openxmlformats.org/package/2006/relationships/digital-sign
|
||||
</SignatureInfoV1>\
|
||||
</SignatureProperty>\
|
||||
</SignatureProperties>");
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.WriteString(L"<SignatureComments/>\
|
||||
<WindowsVersion>10.0</WindowsVersion>\
|
||||
<OfficeVersion>16.0</OfficeVersion>\
|
||||
<ApplicationVersion>16.0</ApplicationVersion>\
|
||||
<Monitors>2</Monitors>\
|
||||
<HorizontalResolution>1680</HorizontalResolution>\
|
||||
<VerticalResolution>1050</VerticalResolution>\
|
||||
<ColorDepth>32</ColorDepth>\
|
||||
<SignatureProviderId>{F5AC7D23-DA04-45F5-ABCB-38CE7A982553}</SignatureProviderId>\
|
||||
<SignatureProviderUrl>http://www.cryptopro.ru/products/office/signature</SignatureProviderUrl>\
|
||||
<SignatureProviderDetails>8</SignatureProviderDetails>\
|
||||
<SignatureType>1</SignatureType>\
|
||||
</SignatureInfoV1>\
|
||||
</SignatureProperty>\
|
||||
</SignatureProperties>");
|
||||
}
|
||||
|
||||
m_signed_info.WriteString("<Reference Type=\"http://www.w3.org/2000/09/xmldsig#Object\" URI=\"#idOfficeObject\">");
|
||||
m_signed_info.WriteString(GetReferenceMain(builder.GetData(), L"idOfficeObject", false));
|
||||
@ -486,7 +508,7 @@ Type=\"http://schemas.openxmlformats.org/package/2006/relationships/digital-sign
|
||||
|
||||
std::wstring GenerateSignPropertiesObject()
|
||||
{
|
||||
std::wstring sName = m_certificate->GetSignerName();
|
||||
std::wstring sName = m_certificate->GetIssuerName();
|
||||
|
||||
std::string sKeyA = m_certificate->GetNumber();
|
||||
std::wstring sKey = UTF8_TO_U(sKeyA);
|
||||
|
||||
@ -369,6 +369,22 @@ public:
|
||||
return s;
|
||||
}
|
||||
|
||||
void string_replaceA(std::string& text, const std::string& replaceFrom, const std::string& replaceTo)
|
||||
{
|
||||
size_t posn = 0;
|
||||
while (std::string::npos != (posn = text.find(replaceFrom, posn)))
|
||||
{
|
||||
text.replace(posn, replaceFrom.length(), replaceTo);
|
||||
posn += replaceTo.length();
|
||||
}
|
||||
}
|
||||
|
||||
void MakeBase64_NOCRLF(std::string& value)
|
||||
{
|
||||
string_replaceA(value, "\r", "");
|
||||
string_replaceA(value, "\n", "");
|
||||
}
|
||||
|
||||
friend class COOXMLVerifier;
|
||||
|
||||
public:
|
||||
@ -396,6 +412,8 @@ public:
|
||||
return OOXML_SIGNATURE_NOTSUPPORTED;
|
||||
|
||||
std::string sValue = U_TO_UTF8((node.ReadNodeText(L"DigestValue")));
|
||||
MakeBase64_NOCRLF(sValue);
|
||||
|
||||
std::string sCalcValue = "";
|
||||
|
||||
XmlUtils::CXmlNode nodeTransform = node.ReadNode(L"Transforms");
|
||||
@ -404,6 +422,7 @@ public:
|
||||
// simple hash
|
||||
sCalcValue = m_cert->GetHash(sFile, nAlg);
|
||||
sValue = U_TO_UTF8((node.ReadNodeText(L"DigestValue")));
|
||||
MakeBase64_NOCRLF(sValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -419,6 +438,7 @@ public:
|
||||
|
||||
sCalcValue = m_cert->GetHash(sXml, nAlg);
|
||||
sValue = U_TO_UTF8((node.ReadNodeText(L"DigestValue")));
|
||||
MakeBase64_NOCRLF(sValue);
|
||||
}
|
||||
|
||||
if (sCalcValue != sValue)
|
||||
@ -437,6 +457,7 @@ public:
|
||||
sURI = sURI.substr(1);
|
||||
|
||||
std::string sValue = U_TO_UTF8((node.ReadNodeText(L"DigestValue")));
|
||||
MakeBase64_NOCRLF(sValue);
|
||||
|
||||
CXmlTransforms oTransforms;
|
||||
|
||||
@ -451,6 +472,7 @@ public:
|
||||
// simple hash
|
||||
sCalcValue = m_cert->GetHash(sFile, nAlg);
|
||||
sValue = U_TO_UTF8((node.ReadNodeText(L"DigestValue")));
|
||||
MakeBase64_NOCRLF(sValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -466,6 +488,7 @@ public:
|
||||
|
||||
sCalcValue = m_cert->GetHash(sXml, nAlg);
|
||||
sValue = U_TO_UTF8((node.ReadNodeText(L"DigestValue")));
|
||||
MakeBase64_NOCRLF(sValue);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@ -57,6 +57,18 @@ int ICertificate::GetOOXMLHashAlg(const std::string& sAlg)
|
||||
"http://www.w3.org/2001/04/xmlenc#sha512" == sAlg)
|
||||
return OOXML_HASH_ALG_SHA512;
|
||||
|
||||
if ("urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411" == sAlg ||
|
||||
"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411" == sAlg)
|
||||
return OOXML_HASH_ALG_GOST_GR3411;
|
||||
|
||||
if ("urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256" == sAlg ||
|
||||
"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256" == sAlg)
|
||||
return OOXML_HASH_ALG_GOST_GR3411_2012_256;
|
||||
|
||||
if ("urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512" == sAlg ||
|
||||
"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512" == sAlg)
|
||||
return OOXML_HASH_ALG_GOST_GR3411_2012_512;
|
||||
|
||||
return OOXML_HASH_ALG_INVALID;
|
||||
}
|
||||
|
||||
@ -74,6 +86,12 @@ std::string ICertificate::GetDigestMethodA(const int& nAlg)
|
||||
return "http://www.w3.org/2001/04/xmldsig-more#sha384";
|
||||
case OOXML_HASH_ALG_SHA512:
|
||||
return "http://www.w3.org/2001/04/xmlenc#sha512";
|
||||
case OOXML_HASH_ALG_GOST_GR3411:
|
||||
return "urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411";
|
||||
case OOXML_HASH_ALG_GOST_GR3411_2012_256:
|
||||
return "urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256";
|
||||
case OOXML_HASH_ALG_GOST_GR3411_2012_512:
|
||||
return "urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -98,6 +116,12 @@ std::string ICertificate::GetSignatureMethodA(const int& nAlg)
|
||||
return "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384";
|
||||
case OOXML_HASH_ALG_SHA512:
|
||||
return "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512";
|
||||
case OOXML_HASH_ALG_GOST_GR3411:
|
||||
return "urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411";
|
||||
case OOXML_HASH_ALG_GOST_GR3411_2012_256:
|
||||
return "urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256";
|
||||
case OOXML_HASH_ALG_GOST_GR3411_2012_512:
|
||||
return "urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -11,6 +11,18 @@
|
||||
#include "../../../common/File.h"
|
||||
#include "../../../common/BigInteger.h"
|
||||
|
||||
#define ALG_SID_GR3411 30
|
||||
#define ALG_SID_GR3411_2012_256 33
|
||||
#define ALG_SID_GR3411_2012_512 34
|
||||
|
||||
#define CALG_GR3411 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_GR3411)
|
||||
#define CALG_GR3411_2012_256 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_GR3411_2012_256)
|
||||
#define CALG_GR3411_2012_512 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_GR3411_2012_512)
|
||||
|
||||
#define PROV_GOST_2001_DH 75
|
||||
#define PROV_GOST_2012_256 80
|
||||
#define PROV_GOST_2012_512 81
|
||||
|
||||
#ifdef MS_CRYPTO_PRIVATE
|
||||
namespace NSMSCryptoPrivate
|
||||
{
|
||||
@ -153,6 +165,19 @@ public:
|
||||
}
|
||||
|
||||
virtual std::wstring GetSignerName()
|
||||
{
|
||||
if (!m_context)
|
||||
return L"";
|
||||
|
||||
DWORD dwNameLen = CertGetNameStringW(m_context, CERT_NAME_SIMPLE_DISPLAY_TYPE, 0, NULL, NULL, 0);
|
||||
wchar_t* pNameData = new wchar_t[dwNameLen];
|
||||
CertGetNameStringW(m_context, CERT_NAME_SIMPLE_DISPLAY_TYPE, 0, NULL, pNameData, dwNameLen);
|
||||
std::wstring sName(pNameData);
|
||||
RELEASEARRAYOBJECTS(pNameData);
|
||||
return sName;
|
||||
}
|
||||
|
||||
virtual std::wstring GetIssuerName()
|
||||
{
|
||||
if (!m_context)
|
||||
return L"";
|
||||
@ -231,6 +256,16 @@ public:
|
||||
algs.push_back(OOXML_HASH_ALG_SHA384);
|
||||
else if ("1.2.840.113549.1.1.13" == sAlg)
|
||||
algs.push_back(OOXML_HASH_ALG_SHA512);
|
||||
else if ("1.2.643.2.2.3" == sAlg)
|
||||
{
|
||||
std::string sHashAlg = m_context->pCertInfo->SubjectPublicKeyInfo.Algorithm.pszObjId;
|
||||
if ("1.2.643.2.2.20" == sHashAlg || "1.2.643.2.2.19" == sHashAlg)
|
||||
algs.push_back(OOXML_HASH_ALG_GOST_GR3411);
|
||||
else if ("1.2.643.7.1.1.1.1" == sHashAlg)
|
||||
algs.push_back(OOXML_HASH_ALG_GOST_GR3411_2012_256);
|
||||
else if ("1.2.643.7.1.1.1.2" == sHashAlg)
|
||||
algs.push_back(OOXML_HASH_ALG_GOST_GR3411_2012_512);
|
||||
}
|
||||
else
|
||||
algs.push_back(OOXML_HASH_ALG_SHA1);
|
||||
|
||||
@ -239,7 +274,7 @@ public:
|
||||
else
|
||||
m_alg = algs[0];
|
||||
|
||||
m_alg = OOXML_HASH_ALG_SHA1;
|
||||
//m_alg = OOXML_HASH_ALG_SHA1;
|
||||
return algs;
|
||||
}
|
||||
int GetHashAlg()
|
||||
@ -249,6 +284,43 @@ public:
|
||||
return m_alg;
|
||||
}
|
||||
|
||||
bool IsGOST()
|
||||
{
|
||||
if (m_alg == OOXML_HASH_ALG_INVALID)
|
||||
GetHashAlgs();
|
||||
|
||||
switch (m_alg)
|
||||
{
|
||||
case OOXML_HASH_ALG_GOST_GR3411:
|
||||
case OOXML_HASH_ALG_GOST_GR3411_2012_256:
|
||||
case OOXML_HASH_ALG_GOST_GR3411_2012_512:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int GetGOSTProviderType()
|
||||
{
|
||||
if (!IsGOST())
|
||||
return PROV_RSA_FULL;
|
||||
|
||||
switch (m_alg)
|
||||
{
|
||||
case OOXML_HASH_ALG_GOST_GR3411:
|
||||
return PROV_GOST_2001_DH;
|
||||
case OOXML_HASH_ALG_GOST_GR3411_2012_256:
|
||||
return PROV_GOST_2012_256;
|
||||
case OOXML_HASH_ALG_GOST_GR3411_2012_512:
|
||||
return PROV_GOST_2012_512;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return PROV_RSA_FULL;
|
||||
}
|
||||
|
||||
public:
|
||||
PCRYPT_KEY_PROV_INFO GetProviderInfo()
|
||||
{
|
||||
@ -302,7 +374,11 @@ public:
|
||||
if (!bResult)
|
||||
{
|
||||
CryptReleaseContext(hCryptProv, 0);
|
||||
if (!CryptAcquireContextW(&hCryptProv, info->pwszContainerName, NULL, PROV_RSA_AES, 0))
|
||||
int nProvType = PROV_RSA_AES;
|
||||
if (IsGOST())
|
||||
nProvType = GetGOSTProviderType();
|
||||
|
||||
if (!CryptAcquireContextW(&hCryptProv, info->pwszContainerName, NULL, nProvType, 0))
|
||||
{
|
||||
CryptReleaseContext(hCryptProv, 0);
|
||||
free(info);
|
||||
@ -399,6 +475,21 @@ public:
|
||||
dwProvType = PROV_RSA_AES;
|
||||
break;
|
||||
}
|
||||
case OOXML_HASH_ALG_GOST_GR3411:
|
||||
{
|
||||
dwProvType = PROV_GOST_2001_DH;
|
||||
break;
|
||||
}
|
||||
case OOXML_HASH_ALG_GOST_GR3411_2012_256:
|
||||
{
|
||||
dwProvType = PROV_GOST_2012_256;
|
||||
break;
|
||||
}
|
||||
case OOXML_HASH_ALG_GOST_GR3411_2012_512:
|
||||
{
|
||||
dwProvType = PROV_GOST_2012_512;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -497,6 +588,21 @@ public:
|
||||
dwProvType = PROV_RSA_AES;
|
||||
break;
|
||||
}
|
||||
case OOXML_HASH_ALG_GOST_GR3411:
|
||||
{
|
||||
dwProvType = PROV_GOST_2001_DH;
|
||||
break;
|
||||
}
|
||||
case OOXML_HASH_ALG_GOST_GR3411_2012_256:
|
||||
{
|
||||
dwProvType = PROV_GOST_2012_256;
|
||||
break;
|
||||
}
|
||||
case OOXML_HASH_ALG_GOST_GR3411_2012_512:
|
||||
{
|
||||
dwProvType = PROV_GOST_2012_512;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -616,6 +722,12 @@ private:
|
||||
return CALG_SHA_512;
|
||||
case OOXML_HASH_ALG_SHA224:
|
||||
return CALG_SHA1;
|
||||
case OOXML_HASH_ALG_GOST_GR3411:
|
||||
return CALG_GR3411;
|
||||
case OOXML_HASH_ALG_GOST_GR3411_2012_256:
|
||||
return CALG_GR3411_2012_256;
|
||||
case OOXML_HASH_ALG_GOST_GR3411_2012_512:
|
||||
return CALG_GR3411_2012_512;
|
||||
default:
|
||||
return CALG_SHA1;
|
||||
}
|
||||
|
||||
@ -167,6 +167,11 @@ public:
|
||||
return sNameW;
|
||||
}
|
||||
|
||||
std::wstring GetIssuerName()
|
||||
{
|
||||
return GetSignerName();
|
||||
}
|
||||
|
||||
std::string GetCertificateBase64()
|
||||
{
|
||||
if (NULL == m_cert)
|
||||
@ -830,6 +835,11 @@ std::wstring CCertificate_openssl::GetSignerName()
|
||||
return m_internal->GetSignerName();
|
||||
}
|
||||
|
||||
std::wstring CCertificate_openssl::GetIssuerName()
|
||||
{
|
||||
return m_internal->GetIssuerName();
|
||||
}
|
||||
|
||||
std::string CCertificate_openssl::GetCertificateBase64()
|
||||
{
|
||||
return m_internal->GetCertificateBase64();
|
||||
@ -914,6 +924,11 @@ int CCertificate_openssl::GetHashAlg()
|
||||
return m_internal->GetHashAlg();
|
||||
}
|
||||
|
||||
bool CCertificate_openssl::IsGOST()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
namespace NSOpenSSL
|
||||
{
|
||||
int LoadKey(std::wstring file, std::string password)
|
||||
|
||||
@ -18,6 +18,8 @@ public:
|
||||
|
||||
virtual std::wstring GetSignerName();
|
||||
|
||||
virtual std::wstring GetIssuerName();
|
||||
|
||||
virtual std::string GetCertificateBase64();
|
||||
|
||||
virtual std::string GetCertificateHash();
|
||||
@ -44,6 +46,8 @@ public:
|
||||
virtual std::vector<int> GetHashAlgs();
|
||||
virtual int GetHashAlg();
|
||||
|
||||
virtual bool IsGOST();
|
||||
|
||||
public:
|
||||
virtual int ShowSelectDialog(void* parent = NULL);
|
||||
virtual int ShowCertificate(void* parent = NULL);
|
||||
|
||||
@ -248,10 +248,6 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
LIBXML_READER_ENABLED,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
@ -262,8 +258,7 @@
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/,
|
||||
/usr/include/libxml2/,
|
||||
/usr/include/libxml2,
|
||||
);
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
@ -279,10 +274,6 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
LIBXML_READER_ENABLED,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
@ -293,8 +284,7 @@
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
/usr/include/,
|
||||
/usr/include/libxml2/,
|
||||
/usr/include/libxml2,
|
||||
);
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
|
||||
@ -31,8 +31,6 @@
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
69676CA91CA58B7400D7A1D1 /* libOfficeUtils.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libOfficeUtils.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
69676CB61CA58BBD00D7A1D1 /* ASCOfficeCriticalSection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASCOfficeCriticalSection.h; sourceTree = "<group>"; };
|
||||
69676CB71CA58BBD00D7A1D1 /* CSLocker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSLocker.h; sourceTree = "<group>"; };
|
||||
69676CB81CA58BBD00D7A1D1 /* OfficeUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OfficeUtils.cpp; sourceTree = "<group>"; };
|
||||
69676CB91CA58BBD00D7A1D1 /* OfficeUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OfficeUtils.h; sourceTree = "<group>"; };
|
||||
69676CBA1CA58BBD00D7A1D1 /* OfficeUtilsCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OfficeUtilsCommon.h; sourceTree = "<group>"; };
|
||||
@ -81,8 +79,6 @@
|
||||
69676CB51CA58BBD00D7A1D1 /* src */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
69676CB61CA58BBD00D7A1D1 /* ASCOfficeCriticalSection.h */,
|
||||
69676CB71CA58BBD00D7A1D1 /* CSLocker.h */,
|
||||
69676CB81CA58BBD00D7A1D1 /* OfficeUtils.cpp */,
|
||||
69676CB91CA58BBD00D7A1D1 /* OfficeUtils.h */,
|
||||
69676CBA1CA58BBD00D7A1D1 /* OfficeUtilsCommon.h */,
|
||||
|
||||
@ -46,7 +46,7 @@ namespace NSUnicodeConverter
|
||||
const char* DisplayName;
|
||||
};
|
||||
|
||||
#define UNICODE_CONVERTER_ENCODINGS_COUNT 52
|
||||
#define UNICODE_CONVERTER_ENCODINGS_COUNT 53
|
||||
static const EncodindId Encodings[UNICODE_CONVERTER_ENCODINGS_COUNT] =
|
||||
{
|
||||
{ 0, 28596, "ISO-8859-6", "Arabic (ISO 8859-6)" },
|
||||
@ -118,7 +118,9 @@ namespace NSUnicodeConverter
|
||||
{ 49, 1201, "UTF-16BE", "Unicode (UTF-16 Big Endian)" },
|
||||
|
||||
{ 50, 12000, "UTF-32LE", "Unicode (UTF-32)" },
|
||||
{ 51, 12001, "UTF-32BE", "Unicode (UTF-32 Big Endian)" }
|
||||
{ 51, 12001, "UTF-32BE", "Unicode (UTF-32 Big Endian)" },
|
||||
{ 52, 950, "EUC-JP", "Japanese (EUC-JP)" }
|
||||
|
||||
};
|
||||
|
||||
static std::map<int, std::string> create_mapEncodingsICU()
|
||||
@ -161,6 +163,7 @@ namespace NSUnicodeConverter
|
||||
m[1255] = "windows-1255";
|
||||
|
||||
m[932] = "Shift_JIS";
|
||||
m[950] = "EUC-JP";
|
||||
|
||||
m[949] = "KS_C_5601-1987";
|
||||
m[51949] = "EUC-KR";
|
||||
|
||||
@ -242,9 +242,6 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
@ -270,9 +267,6 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
MAC,
|
||||
unix,
|
||||
_IOS,
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
17C8DEC71ACD696100902C85 /* X2tConverter.mm in Sources */ = {isa = PBXBuildFile; fileRef = 17C27A191AC2DB3D00E1D003 /* X2tConverter.mm */; };
|
||||
17C8DECC1ACD696100902C85 /* X2tConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 17C27A171AC2DB3D00E1D003 /* X2tConverter.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
6911A9691F6036DA0061AB4D /* OfficeFileErrorDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 6911A9681F6036DA0061AB4D /* OfficeFileErrorDescription.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
691A8BD31E2FA68F00DCB54A /* liblibxml2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 691A8BD01E2FA67E00DCB54A /* liblibxml2.a */; };
|
||||
69415F271CB51C37003E771B /* libOfficeUtils.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 69415F241CB51C2A003E771B /* libOfficeUtils.a */; };
|
||||
69415F311CB51D41003E771B /* libASCOfficeDocxFile2Lib_ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 17E17F5B1AC457CD00BEA2EA /* libASCOfficeDocxFile2Lib_ios.a */; };
|
||||
69415FE01CB52455003E771B /* libmng_ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 69415FD41CB5243F003E771B /* libmng_ios.a */; };
|
||||
@ -56,6 +55,10 @@
|
||||
69DA32F81CEE100E00E10AF0 /* libPPTXFormatLib_ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 69DA32611CEE09BB00E10AF0 /* libPPTXFormatLib_ios.a */; };
|
||||
69DA32F91CEE100E00E10AF0 /* libraster_ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 69DA32491CEE094A00E10AF0 /* libraster_ios.a */; };
|
||||
69EC66D91E01775B003527E2 /* libUnicodeConverter.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 69EC66D21E01770D003527E2 /* libUnicodeConverter.a */; };
|
||||
8A35A6EE215E5F46005CC806 /* xmlutils.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A35A6EC215E5F46005CC806 /* xmlutils.h */; };
|
||||
8A35A6F3215E5F62005CC806 /* xmldom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A35A6F0215E5F62005CC806 /* xmldom.cpp */; };
|
||||
8A35A6F4215E5F62005CC806 /* xmllight_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A35A6F1215E5F62005CC806 /* xmllight_private.h */; };
|
||||
8A35A6F5215E5F62005CC806 /* xmllight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A35A6F2215E5F62005CC806 /* xmllight.cpp */; };
|
||||
8A9FAC2B207772E1007787F6 /* libicu.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A9FAC27207772CC007787F6 /* libicu.a */; };
|
||||
8ADB5F4220C52EFE00B72D37 /* version.h in Headers */ = {isa = PBXBuildFile; fileRef = 8ADB5F4120C52EFE00B72D37 /* version.h */; };
|
||||
/* End PBXBuildFile section */
|
||||
@ -75,20 +78,6 @@
|
||||
remoteGlobalIDString = 17E17EDC1AC453F800BEA2EA;
|
||||
remoteInfo = ASCOfficeDocxFile2Lib;
|
||||
};
|
||||
691A8BCF1E2FA67E00DCB54A /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 691A8BCB1E2FA67E00DCB54A /* libxml2.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 69967F581E2F84F100B620CD;
|
||||
remoteInfo = libxml2;
|
||||
};
|
||||
691A8BD11E2FA68900DCB54A /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 691A8BCB1E2FA67E00DCB54A /* libxml2.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 69967F571E2F84F100B620CD;
|
||||
remoteInfo = libxml2;
|
||||
};
|
||||
69415F231CB51C2A003E771B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 69415F1F1CB51C29003E771B /* OfficeUtils.xcodeproj */;
|
||||
@ -447,7 +436,6 @@
|
||||
17C8DED01ACD696100902C85 /* libX2tConverter.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libX2tConverter.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
17E17F561AC457CD00BEA2EA /* ASCOfficeDocxFile2Lib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ASCOfficeDocxFile2Lib.xcodeproj; path = ../../../../ASCOfficeDocxFile2/Mac/ASCOfficeDocxFile2Lib.xcodeproj; sourceTree = "<group>"; };
|
||||
6911A9681F6036DA0061AB4D /* OfficeFileErrorDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OfficeFileErrorDescription.h; path = ../../../../../Common/OfficeFileErrorDescription.h; sourceTree = "<group>"; };
|
||||
691A8BCB1E2FA67E00DCB54A /* libxml2.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libxml2.xcodeproj; path = ../../../../DesktopEditor/xml/mac/libxml2.xcodeproj; sourceTree = "<group>"; };
|
||||
69415F1F1CB51C29003E771B /* OfficeUtils.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OfficeUtils.xcodeproj; path = ../../../../OfficeUtils/OfficeUtils.xcodeproj; sourceTree = "<group>"; };
|
||||
69415FAE1CB5243F003E771B /* mng.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = mng.xcodeproj; path = ../../../../DesktopEditor/mac_build/cximage/mng/mng.xcodeproj; sourceTree = "<group>"; };
|
||||
69415FB11CB5243F003E771B /* png.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = png.xcodeproj; path = ../../../../DesktopEditor/mac_build/cximage/png/png.xcodeproj; sourceTree = "<group>"; };
|
||||
@ -479,6 +467,10 @@
|
||||
69DA32561CEE099000E10AF0 /* DocxFormatLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = DocxFormatLib.xcodeproj; path = ../../../../Common/DocxFormat/Mac/DocxFormatLib.xcodeproj; sourceTree = "<group>"; };
|
||||
69DA325C1CEE09BB00E10AF0 /* PPTXFormatLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = PPTXFormatLib.xcodeproj; path = ../../../../ASCOfficePPTXFile/PPTXLib/Mac/PPTXFormatLib.xcodeproj; sourceTree = "<group>"; };
|
||||
69EC66CD1E01770C003527E2 /* UnicodeConverter.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = UnicodeConverter.xcodeproj; path = ../../../../UnicodeConverter/build/UnicodeConverter/UnicodeConverter.xcodeproj; sourceTree = "<group>"; };
|
||||
8A35A6EC215E5F46005CC806 /* xmlutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xmlutils.h; path = ../../../../../DesktopEditor/xml/include/xmlutils.h; sourceTree = "<group>"; };
|
||||
8A35A6F0215E5F62005CC806 /* xmldom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = xmldom.cpp; path = ../../../../../DesktopEditor/xml/src/xmldom.cpp; sourceTree = "<group>"; };
|
||||
8A35A6F1215E5F62005CC806 /* xmllight_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xmllight_private.h; path = ../../../../../DesktopEditor/xml/src/xmllight_private.h; sourceTree = "<group>"; };
|
||||
8A35A6F2215E5F62005CC806 /* xmllight.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = xmllight.cpp; path = ../../../../../DesktopEditor/xml/src/xmllight.cpp; sourceTree = "<group>"; };
|
||||
8A9FAC22207772CC007787F6 /* icu.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = icu.xcodeproj; path = icu/icu.xcodeproj; sourceTree = "<group>"; };
|
||||
8ADB5F4120C52EFE00B72D37 /* version.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
@ -490,7 +482,6 @@
|
||||
files = (
|
||||
8A9FAC2B207772E1007787F6 /* libicu.a in Frameworks */,
|
||||
696DD7CF1F5D98220021D0F3 /* libOfficeCryptReader.a in Frameworks */,
|
||||
691A8BD31E2FA68F00DCB54A /* liblibxml2.a in Frameworks */,
|
||||
6967B1D11E27B9D700A129E2 /* libRtfFormatLib.a in Frameworks */,
|
||||
6967B10A1E27A41B00A129E2 /* libPdfWriter.a in Frameworks */,
|
||||
6967B0D41E27A36E00A129E2 /* libHtmlFile.a in Frameworks */,
|
||||
@ -526,7 +517,6 @@
|
||||
children = (
|
||||
8A9FAC22207772CC007787F6 /* icu.xcodeproj */,
|
||||
696DD7C91F5D981A0021D0F3 /* OfficeCryptReader.xcodeproj */,
|
||||
691A8BCB1E2FA67E00DCB54A /* libxml2.xcodeproj */,
|
||||
6967B1C91E27B9C400A129E2 /* RtfFormatLib.xcodeproj */,
|
||||
6967B1031E27A41300A129E2 /* PdfWriter.xcodeproj */,
|
||||
6967B0CC1E27A35E00A129E2 /* HtmlFile.xcodeproj */,
|
||||
@ -585,14 +575,6 @@
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
691A8BCC1E2FA67E00DCB54A /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
691A8BD01E2FA67E00DCB54A /* liblibxml2.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
69415F201CB51C29003E771B /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -668,6 +650,7 @@
|
||||
6967AFA51E27918600A129E2 /* src */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8A35A6EF215E5F4A005CC806 /* XmlUtils */,
|
||||
6967B1181E27A9D500A129E2 /* OfficeFileFormatChecker */,
|
||||
6911A9681F6036DA0061AB4D /* OfficeFileErrorDescription.h */,
|
||||
6967BEAF1E27D16A00A129E2 /* ASCConverters_ios.cpp */,
|
||||
@ -815,6 +798,17 @@
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8A35A6EF215E5F4A005CC806 /* XmlUtils */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8A35A6F0215E5F62005CC806 /* xmldom.cpp */,
|
||||
8A35A6F1215E5F62005CC806 /* xmllight_private.h */,
|
||||
8A35A6F2215E5F62005CC806 /* xmllight.cpp */,
|
||||
8A35A6EC215E5F46005CC806 /* xmlutils.h */,
|
||||
);
|
||||
name = XmlUtils;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8A9FAC23207772CC007787F6 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -833,6 +827,8 @@
|
||||
6967AFB11E2793A500A129E2 /* cextracttools.h in Headers */,
|
||||
8ADB5F4220C52EFE00B72D37 /* version.h in Headers */,
|
||||
6911A9691F6036DA0061AB4D /* OfficeFileErrorDescription.h in Headers */,
|
||||
8A35A6F4215E5F62005CC806 /* xmllight_private.h in Headers */,
|
||||
8A35A6EE215E5F46005CC806 /* xmlutils.h in Headers */,
|
||||
6967B10F1E27A65600A129E2 /* OfficeFileFormatChecker.h in Headers */,
|
||||
6967AFB51E27940600A129E2 /* ASCConverters.h in Headers */,
|
||||
17C8DECC1ACD696100902C85 /* X2tConverter.h in Headers */,
|
||||
@ -856,7 +852,6 @@
|
||||
dependencies = (
|
||||
8A9FAC2A207772D9007787F6 /* PBXTargetDependency */,
|
||||
696DD7D11F5D98270021D0F3 /* PBXTargetDependency */,
|
||||
691A8BD21E2FA68900DCB54A /* PBXTargetDependency */,
|
||||
6967B1D01E27B9D000A129E2 /* PBXTargetDependency */,
|
||||
6967B10C1E27A42500A129E2 /* PBXTargetDependency */,
|
||||
6967B0D31E27A36800A129E2 /* PBXTargetDependency */,
|
||||
@ -959,10 +954,6 @@
|
||||
ProductGroup = 69415FBB1CB5243F003E771B /* Products */;
|
||||
ProjectRef = 69415FBA1CB5243F003E771B /* libpsd.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 691A8BCC1E2FA67E00DCB54A /* Products */;
|
||||
ProjectRef = 691A8BCB1E2FA67E00DCB54A /* libxml2.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 69DA322D1CEE08DC00E10AF0 /* Products */;
|
||||
ProjectRef = 69DA322C1CEE08DC00E10AF0 /* metafile.xcodeproj */;
|
||||
@ -1032,13 +1023,6 @@
|
||||
remoteRef = 17E17F5A1AC457CD00BEA2EA /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
691A8BD01E2FA67E00DCB54A /* liblibxml2.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = liblibxml2.a;
|
||||
remoteRef = 691A8BCF1E2FA67E00DCB54A /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
69415F241CB51C2A003E771B /* libOfficeUtils.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
@ -1252,7 +1236,9 @@
|
||||
files = (
|
||||
17C8DEC71ACD696100902C85 /* X2tConverter.mm in Sources */,
|
||||
6967B1101E27A65600A129E2 /* OfficeFileFormatChecker2.cpp in Sources */,
|
||||
8A35A6F3215E5F62005CC806 /* xmldom.cpp in Sources */,
|
||||
6967BEB01E27D16A00A129E2 /* ASCConverters_ios.cpp in Sources */,
|
||||
8A35A6F5215E5F62005CC806 /* xmllight.cpp in Sources */,
|
||||
6967AFB01E2793A500A129E2 /* cextracttools.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -1265,11 +1251,6 @@
|
||||
name = ASCOfficeDocxFile2Lib_ios;
|
||||
targetProxy = 17C8DEDB1ACD6A3900902C85 /* PBXContainerItemProxy */;
|
||||
};
|
||||
691A8BD21E2FA68900DCB54A /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = libxml2;
|
||||
targetProxy = 691A8BD11E2FA68900DCB54A /* PBXContainerItemProxy */;
|
||||
};
|
||||
69415F261CB51C32003E771B /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = OfficeUtils;
|
||||
@ -1522,9 +1503,6 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
PPTX_DEF,
|
||||
PPT_DEF,
|
||||
ENABLE_PPT_TO_PPTX_CONVERT,
|
||||
@ -1571,9 +1549,6 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
UNICODE,
|
||||
_UNICODE,
|
||||
_USE_LIBXML2_READER_,
|
||||
_USE_XMLLITE_READER_,
|
||||
USE_LITE_READER,
|
||||
PPTX_DEF,
|
||||
PPT_DEF,
|
||||
ENABLE_PPT_TO_PPTX_CONVERT,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#ifndef X2T_VERSION_H
|
||||
#define X2T_VERSION_H
|
||||
|
||||
#define X2T_VERSION "2.4.539.0"
|
||||
#define X2T_VERSION "2.4.547.0"
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
18
X2tConverter/test/androidTest/.gitignore
vendored
Normal file
18
X2tConverter/test/androidTest/.gitignore
vendored
Normal 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
|
||||
3
X2tConverter/test/androidTest/README.md
Normal file
3
X2tConverter/test/androidTest/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# README #
|
||||
|
||||
New android Documents app...
|
||||
46
X2tConverter/test/androidTest/build.gradle
Normal file
46
X2tConverter/test/androidTest/build.gradle
Normal 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
|
||||
}
|
||||
1
X2tConverter/test/androidTest/core/.gitignore
vendored
Normal file
1
X2tConverter/test/androidTest/core/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
||||
892
X2tConverter/test/androidTest/core/build.gradle
Normal file
892
X2tConverter/test/androidTest/core/build.gradle
Normal 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
|
||||
21
X2tConverter/test/androidTest/core/proguard-rules.pro
vendored
Normal file
21
X2tConverter/test/androidTest/core/proguard-rules.pro
vendored
Normal 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
|
||||
@ -0,0 +1 @@
|
||||
<manifest package="com.onlyoffice.core" />
|
||||
414
X2tConverter/test/androidTest/core/src/main/cpp/CMakeLists.txt
Normal file
414
X2tConverter/test/androidTest/core/src/main/cpp/CMakeLists.txt
Normal 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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
|
||||
@ -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/
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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}
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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}
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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})
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
|
||||
@ -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}
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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}
|
||||
)
|
||||
@ -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}
|
||||
)
|
||||
@ -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}
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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}
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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
|
||||
)
|
||||
@ -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;
|
||||
}
|
||||
@ -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
|
||||
@ -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);
|
||||
}
|
||||
@ -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
|
||||
@ -0,0 +1,6 @@
|
||||
#include "pthread_setcanceltype.h"
|
||||
|
||||
int pthread_setcanceltype(int type, int *oldtype)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -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
|
||||
@ -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));
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user