mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Compare commits
20 Commits
v5.2.3.47
...
v5.2.99.87
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 "../../UnicodeConverter/UnicodeConverter.h"
|
||||
|
||||
@ -78,7 +78,14 @@ public:
|
||||
|
||||
return rdUShort;
|
||||
}
|
||||
|
||||
void WriteUInt16(unsigned short val)
|
||||
{
|
||||
if (m_Data)
|
||||
{
|
||||
((unsigned short *)(m_Data + m_Position))[0] = val;
|
||||
m_Position += sizeof(unsigned short);
|
||||
}
|
||||
}
|
||||
virtual short ReadInt16()
|
||||
{
|
||||
short rdShort = 0;
|
||||
@ -104,7 +111,14 @@ public:
|
||||
|
||||
return rdInt;
|
||||
}
|
||||
|
||||
void WriteInt32(_INT32 val)
|
||||
{
|
||||
if (m_Data)
|
||||
{
|
||||
((_INT32 *)(m_Data + m_Position))[0] = val;
|
||||
m_Position += sizeof(_INT32);
|
||||
}
|
||||
}
|
||||
virtual unsigned int ReadUInt32()
|
||||
{
|
||||
int rdUInt = 0;
|
||||
@ -117,7 +131,22 @@ public:
|
||||
|
||||
return rdUInt;
|
||||
}
|
||||
|
||||
void WriteByte(unsigned char val)
|
||||
{
|
||||
if (m_Data)
|
||||
{
|
||||
m_Data[m_Position] = val;
|
||||
m_Position += 1;
|
||||
}
|
||||
}
|
||||
void WriteUInt32(_UINT32 val)
|
||||
{
|
||||
if (m_Data)
|
||||
{
|
||||
((_UINT32 *)(m_Data + m_Position))[0] = val;
|
||||
m_Position += sizeof(_UINT32);
|
||||
}
|
||||
}
|
||||
virtual unsigned char ReadByte()
|
||||
{
|
||||
unsigned char rdByte = 0;
|
||||
@ -159,6 +188,14 @@ public:
|
||||
|
||||
return pBytes;
|
||||
}
|
||||
void WriteBytes(unsigned char* pData, int size)
|
||||
{
|
||||
if (m_Data)
|
||||
{
|
||||
memcpy(m_Data + m_Position, pData, size);
|
||||
m_Position += size;
|
||||
}
|
||||
}
|
||||
|
||||
virtual unsigned long GetPosition() const
|
||||
{
|
||||
@ -172,7 +209,7 @@ public:
|
||||
|
||||
virtual int Seek (int offset, int origin = 0/*STREAM_SEEK_SET*/)
|
||||
{
|
||||
if ( (m_Data != NULL) && (offset > 0) && ((unsigned int)offset < m_Size) )
|
||||
if ( (m_Data != NULL) && (offset >= 0) && ((unsigned int)offset < m_Size) )
|
||||
return m_Position = offset;
|
||||
|
||||
return 0;
|
||||
@ -180,7 +217,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
unsigned char* m_Data;
|
||||
unsigned char* m_Data;
|
||||
unsigned long m_Size;
|
||||
unsigned long m_Position;
|
||||
bool bMemoryCopy;
|
||||
|
||||
@ -335,10 +335,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)
|
||||
|
||||
@ -315,19 +315,19 @@ 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,
|
||||
|
||||
@ -53,6 +53,12 @@
|
||||
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 */; };
|
||||
8AC6D2052130146000D9C0F1 /* xmlutils.h in Headers */ = {isa = PBXBuildFile; fileRef = 8AC6D2042130146000D9C0F1 /* xmlutils.h */; };
|
||||
8AC6D2092130146800D9C0F1 /* xmllight_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 8AC6D2062130146800D9C0F1 /* xmllight_private.h */; };
|
||||
8AC6D20A2130146800D9C0F1 /* xmldom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AC6D2072130146800D9C0F1 /* xmldom.cpp */; };
|
||||
8AC6D20B2130146800D9C0F1 /* xmllight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AC6D2082130146800D9C0F1 /* xmllight.cpp */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@ -103,6 +109,12 @@
|
||||
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>"; };
|
||||
8AC6D2042130146000D9C0F1 /* xmlutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xmlutils.h; path = ../../../DesktopEditor/xml/include/xmlutils.h; sourceTree = "<group>"; };
|
||||
8AC6D2062130146800D9C0F1 /* xmllight_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xmllight_private.h; path = ../../../DesktopEditor/xml/src/xmllight_private.h; sourceTree = "<group>"; };
|
||||
8AC6D2072130146800D9C0F1 /* xmldom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = xmldom.cpp; path = ../../../DesktopEditor/xml/src/xmldom.cpp; sourceTree = "<group>"; };
|
||||
8AC6D2082130146800D9C0F1 /* xmllight.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = xmllight.cpp; path = ../../../DesktopEditor/xml/src/xmllight.cpp; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -135,6 +147,7 @@
|
||||
17E17EDE1AC453F800BEA2EA /* ASCOfficeDocxFile2Lib */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8AC6D2032130145600D9C0F1 /* XmlUtils */,
|
||||
17E17F4D1AC454E200BEA2EA /* Common */,
|
||||
17E17F1A1AC4549B00BEA2EA /* XlsxSerializerCom */,
|
||||
17E17F0D1AC4546100BEA2EA /* DocWrapper */,
|
||||
@ -149,6 +162,8 @@
|
||||
children = (
|
||||
17E17EEB1AC4544900BEA2EA /* ChartWriter.h */,
|
||||
17E17EEC1AC4544900BEA2EA /* CommentsWriter.h */,
|
||||
8AB24BFB213004E300E80DDD /* CustormXmlWriter.cpp */,
|
||||
8AB24BFC213004E300E80DDD /* CustormXmlWriter.h */,
|
||||
17A765271B0F3DC30046BC0B /* DefaultThemeWriter.h */,
|
||||
17E17EF01AC4544900BEA2EA /* DocumentRelsWriter.h */,
|
||||
17E17EF11AC4544900BEA2EA /* DocumentWriter.h */,
|
||||
@ -252,6 +267,17 @@
|
||||
name = BinWriter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8AC6D2032130145600D9C0F1 /* XmlUtils */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8AC6D2072130146800D9C0F1 /* xmldom.cpp */,
|
||||
8AC6D2062130146800D9C0F1 /* xmllight_private.h */,
|
||||
8AC6D2082130146800D9C0F1 /* xmllight.cpp */,
|
||||
8AC6D2042130146000D9C0F1 /* xmlutils.h */,
|
||||
);
|
||||
name = XmlUtils;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
@ -276,7 +302,9 @@
|
||||
17C1FEAD1ACC42C4006B99B3 /* ChartWriter.h in Headers */,
|
||||
17C1FEAE1ACC42C4006B99B3 /* DocumentRelsWriter.h in Headers */,
|
||||
17C1FEAF1ACC42C4006B99B3 /* CommentsWriter.h in Headers */,
|
||||
8AC6D2052130146000D9C0F1 /* xmlutils.h in Headers */,
|
||||
69F181AF1C77274E00B2952B /* FileDownloader.h in Headers */,
|
||||
8AC6D2092130146800D9C0F1 /* xmllight_private.h in Headers */,
|
||||
17C1FEB01ACC42C4006B99B3 /* BinaryCommonReader.h in Headers */,
|
||||
17C1FEB11ACC42C4006B99B3 /* Common.h in Headers */,
|
||||
8A404FD5208A01CE00F2D5CF /* FileDownloader_private.h in Headers */,
|
||||
@ -292,6 +320,7 @@
|
||||
17C1FEBC1ACC42C4006B99B3 /* DocxSerializer.h in Headers */,
|
||||
17C1FEBD1ACC42C4006B99B3 /* FileWriter.h in Headers */,
|
||||
17C1FEBE1ACC42C4006B99B3 /* CSVWriter.h in Headers */,
|
||||
8AB24BFE213004E400E80DDD /* CustormXmlWriter.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -346,17 +375,20 @@
|
||||
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 */,
|
||||
17C1FE991ACC42C4006B99B3 /* DocxSerializer.cpp in Sources */,
|
||||
17C1FE9A1ACC42C4006B99B3 /* CommonWriter.cpp in Sources */,
|
||||
8AC6D20B2130146800D9C0F1 /* xmllight.cpp in Sources */,
|
||||
17C1FE9B1ACC42C4006B99B3 /* CSVWriter.cpp in Sources */,
|
||||
69414A301CB51666003E771B /* ChartWriter.cpp in Sources */,
|
||||
6967917E1D9E8AEE002CA4BA /* BinWriters.cpp in Sources */,
|
||||
69BBDF251F0B8AAC00EB1BF7 /* FileDownloader_mac.mm in Sources */,
|
||||
17C1FE9C1ACC42C4006B99B3 /* XlsxSerializer.cpp in Sources */,
|
||||
690FE0851E9BBD68004B26D0 /* Readers.cpp in Sources */,
|
||||
8AC6D20A2130146800D9C0F1 /* xmldom.cpp in Sources */,
|
||||
17C1FE9D1ACC42C4006B99B3 /* FontProcessor.cpp in Sources */,
|
||||
8A404FD3208A01AF00F2D5CF /* FileDownloader.cpp in Sources */,
|
||||
);
|
||||
|
||||
@ -1410,7 +1410,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;
|
||||
@ -2385,6 +2409,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>";
|
||||
@ -2532,8 +2575,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);
|
||||
@ -4460,9 +4502,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")
|
||||
@ -4483,16 +4537,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())
|
||||
|
||||
@ -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 */,
|
||||
@ -587,8 +585,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",
|
||||
"$(PROJECT_DIR)/../../../DesktopEditor/freetype-2.5.2/include",
|
||||
@ -621,8 +618,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",
|
||||
"$(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;
|
||||
@ -316,8 +322,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",
|
||||
@ -347,8 +352,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",
|
||||
|
||||
@ -1245,7 +1245,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",
|
||||
@ -1287,7 +1287,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",
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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 */,
|
||||
@ -482,6 +488,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,
|
||||
@ -524,6 +531,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
|
||||
|
||||
@ -262,8 +262,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";
|
||||
@ -293,8 +292,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";
|
||||
|
||||
@ -21,6 +21,10 @@
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
{
|
||||
std::wstring password = L"password";
|
||||
ECMACryptFile crypt_file;
|
||||
bool result = false, bDataIntegrity = false;
|
||||
|
||||
std::wstring srcFileName = L"D:\\test\\_crypted\\test-111.docx";
|
||||
std::wstring dstFileName = srcFileName + L"-mycrypt.docx";
|
||||
std::wstring dstFileName2 = dstFileName + L".oox";
|
||||
@ -31,14 +35,10 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
//std::wstring srcFileName = L"D:\\test\\_crypted\\test.docx";
|
||||
//std::wstring dstFileName3 = srcFileName + L"-mycrypt1.docx";
|
||||
|
||||
std::wstring password = L"574446f1-6aa0-860a-0296-787a87a214bb";
|
||||
|
||||
ECMACryptFile crypt_file;
|
||||
bool result = false, bDataIntegrity = false;
|
||||
|
||||
//result = crypt_file.DecryptOfficeFile(srcFileName, dstFileName, password, bDataIntegrity);
|
||||
//result = crypt_file.EncryptOfficeFile(dstFileName, dstFileName2, password);
|
||||
|
||||
//std::wstring srcFileName1 = L"D:\\test\\_crypted\\test-111.docx-ms.docx";
|
||||
//std::wstring dstFileName1 = srcFileName1 + L".oox";
|
||||
//result = crypt_file.DecryptOfficeFile(srcFileName1, dstFileName1, password, bDataIntegrity);
|
||||
|
||||
result = crypt_file.EncryptOfficeFile(srcFileName, dstFileName, password, L"123456789");
|
||||
result = crypt_file.DecryptOfficeFile(dstFileName, dstFileName2, password, bDataIntegrity);
|
||||
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
|
||||
#include "../../Common/3dParty/cryptopp/modes.h"
|
||||
#include "../../Common/3dParty/cryptopp/aes.h"
|
||||
#include "../../Common/3dParty/cryptopp/des.h"
|
||||
#include "../../Common/3dParty/cryptopp/sha.h"
|
||||
#include "../../Common/3dParty/cryptopp/md5.h"
|
||||
#include "../../Common/3dParty/cryptopp/rsa.h"
|
||||
@ -62,6 +63,8 @@ static const unsigned char encrKeyValueBlockKey[8] = { 0x14, 0x6e, 0x0b, 0xe
|
||||
static const unsigned char encrDataIntegritySaltBlockKey[8] = { 0x5f, 0xb2, 0xad, 0x01, 0x0c, 0xb9, 0xe1, 0xf6 };
|
||||
static const unsigned char encrDataIntegrityHmacValueBlockKey[8] = { 0xa0, 0x67, 0x7f, 0x02, 0xb2, 0x2c, 0x84, 0x33 };
|
||||
|
||||
#define PADDING_SIZE 16
|
||||
|
||||
using namespace CryptoPP;
|
||||
|
||||
class _buf
|
||||
@ -280,6 +283,9 @@ _buf HashAppend(_buf & hashBuf, _buf & block, CRYPT_METHOD::_hashAlgorithm algo
|
||||
|
||||
_buf GenerateAgileKey(_buf & salt, _buf & password, _buf & blockKey, int hashSize, int spin, CRYPT_METHOD::_hashAlgorithm algorithm)
|
||||
{
|
||||
//if (hashSize < 8)
|
||||
// blockKey = 8;
|
||||
|
||||
_buf pHashBuf = HashAppend(salt, password, algorithm);
|
||||
|
||||
for (int i = 0; i < spin; i++)
|
||||
@ -308,7 +314,7 @@ _buf GenerateOdfKey(_buf & pSalt, _buf & pPassword, int keySize, int spin, CRYPT
|
||||
return _buf(pKey.ptr, pKey.size);
|
||||
}
|
||||
|
||||
_buf GenerateHashKey(_buf & salt, _buf & password, int hashSize, int spin, CRYPT_METHOD::_hashAlgorithm algorithm, int block_index = 0)
|
||||
_buf GenerateHashKey(_buf & salt, _buf & password, int hashSize, int keySize, int spin, CRYPT_METHOD::_hashAlgorithm algorithm, int block_index = 0)
|
||||
{
|
||||
_buf block ((unsigned char*)&block_index, 4, false);
|
||||
|
||||
@ -350,8 +356,15 @@ _buf GenerateHashKey(_buf & salt, _buf & password, int hashSize, int spin, CRYPT
|
||||
memcpy(pHashBuf3.ptr + 0, pHashBuf1.ptr, hashSize);
|
||||
memcpy(pHashBuf3.ptr + hashSize, pHashBuf2.ptr, hashSize);
|
||||
|
||||
CorrectHashSize(pHashBuf3, keySize, 0);
|
||||
|
||||
if (keySize == 5)
|
||||
CorrectHashSize(pHashBuf3, 16, 0); //40-bit crypt key !!!
|
||||
|
||||
return _buf(pHashBuf3.ptr, pHashBuf3.size);
|
||||
}
|
||||
ARC4::Decryption rc4Decryption; // todooo -> in impl
|
||||
ARC4::Encryption rc4Encryption;
|
||||
|
||||
bool EncryptCipher(_buf & key, _buf & iv, _buf & data_inp, _buf & data_out, CRYPT_METHOD::_cipherAlgorithm algorithm,
|
||||
StreamTransformationFilter::BlockPaddingScheme padding = StreamTransformationFilter::PKCS_PADDING)
|
||||
@ -362,10 +375,11 @@ bool EncryptCipher(_buf & key, _buf & iv, _buf & data_inp, _buf & data_out, CRYP
|
||||
}
|
||||
else if (algorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
data_out.ptr = new unsigned char[data_inp.size];
|
||||
data_out.size = data_inp.size;
|
||||
if (!data_out.ptr)
|
||||
{
|
||||
data_out = _buf(data_inp.size);
|
||||
}
|
||||
|
||||
ARC4::Encryption rc4Encryption(key.ptr, key.size);
|
||||
rc4Encryption.ProcessData(data_out.ptr, data_inp.ptr, data_inp.size);
|
||||
|
||||
}
|
||||
@ -374,6 +388,36 @@ bool EncryptCipher(_buf & key, _buf & iv, _buf & data_inp, _buf & data_out, CRYP
|
||||
CFB_Mode<Blowfish>::Encryption encryption(key.ptr, key.size, iv.ptr);
|
||||
encryption.ProcessData(data_out.ptr, data_inp.ptr, data_inp.size);
|
||||
}
|
||||
else if (algorithm == CRYPT_METHOD::DES_CBC)
|
||||
{
|
||||
DES::Encryption desEncryption(key.ptr, key.size == 7 ? 8 : key.size);
|
||||
StreamTransformation *modeEncryption = new CipherModeFinalTemplate_ExternalCipher<CBC_Encryption>(desEncryption, iv.ptr );
|
||||
if (!data_out.ptr)
|
||||
{
|
||||
data_out = _buf(data_inp.size);
|
||||
}
|
||||
StreamTransformationFilter stfEncryption(*modeEncryption, new ArraySink( data_out.ptr, data_out.size), padding);
|
||||
|
||||
stfEncryption.Put( data_inp.ptr, data_inp.size );
|
||||
stfEncryption.MessageEnd();
|
||||
|
||||
delete modeEncryption;
|
||||
}
|
||||
else if (algorithm == CRYPT_METHOD::DES_ECB)
|
||||
{
|
||||
DES::Encryption desEncryption(key.ptr, key.size == 7 ? 8 : key.size);
|
||||
StreamTransformation *modeEncryption = new CipherModeFinalTemplate_ExternalCipher<ECB_OneWay>(desEncryption, iv.ptr );
|
||||
if (!data_out.ptr)
|
||||
{
|
||||
data_out = _buf(data_inp.size);
|
||||
}
|
||||
StreamTransformationFilter stfEncryption(*modeEncryption, new ArraySink( data_out.ptr, data_out.size), padding);
|
||||
|
||||
stfEncryption.Put( data_inp.ptr, data_inp.size );
|
||||
stfEncryption.MessageEnd();
|
||||
|
||||
delete modeEncryption;
|
||||
}
|
||||
else //AES
|
||||
{
|
||||
StreamTransformation *modeEncryption = NULL;
|
||||
@ -413,8 +457,6 @@ bool EncryptCipher(_buf & key, _buf & iv, _buf & data_inp, _buf & data_out, CRYP
|
||||
return true;
|
||||
}
|
||||
|
||||
ARC4::Decryption rc4Decryption; // todooo -> in impl
|
||||
|
||||
bool DecryptCipher(_buf & key, _buf & iv, _buf & data_inp, _buf & data_out, CRYPT_METHOD::_cipherAlgorithm algorithm,
|
||||
StreamTransformationFilter::BlockPaddingScheme padding = StreamTransformationFilter::NO_PADDING)
|
||||
{
|
||||
@ -436,6 +478,28 @@ bool DecryptCipher(_buf & key, _buf & iv, _buf & data_inp, _buf & data_out, CRY
|
||||
CFB_Mode<Blowfish>::Decryption decryption(key.ptr, key.size, iv.ptr);
|
||||
decryption.ProcessData(data_out.ptr, data_inp.ptr, data_inp.size);
|
||||
}
|
||||
else if (algorithm == CRYPT_METHOD::DES_CBC)
|
||||
{
|
||||
DES::Decryption desDecryption(key.ptr, key.size == 7 ? 8 : key.size);
|
||||
StreamTransformation *modeDecryption = new CipherModeFinalTemplate_ExternalCipher<CBC_Decryption>(desDecryption, iv.ptr );
|
||||
StreamTransformationFilter stfDecryptor(*modeDecryption, new ArraySink( data_out.ptr, data_out.size), padding);
|
||||
|
||||
stfDecryptor.Put( data_inp.ptr, data_inp.size );
|
||||
stfDecryptor.MessageEnd();
|
||||
|
||||
delete modeDecryption;
|
||||
}
|
||||
else if (algorithm == CRYPT_METHOD::DES_ECB)
|
||||
{
|
||||
DES::Decryption desDecryption(key.ptr, key.size == 7 ? 8 : key.size);
|
||||
StreamTransformation *modeDecryption = new CipherModeFinalTemplate_ExternalCipher<ECB_OneWay>(desDecryption, iv.ptr );
|
||||
StreamTransformationFilter stfDecryptor(*modeDecryption, new ArraySink( data_out.ptr, data_out.size), padding);
|
||||
|
||||
stfDecryptor.Put( data_inp.ptr, data_inp.size );
|
||||
stfDecryptor.MessageEnd();
|
||||
|
||||
delete modeDecryption;
|
||||
}
|
||||
else //AES
|
||||
{
|
||||
StreamTransformation *modeDecryption = NULL;
|
||||
@ -504,13 +568,20 @@ bool ECMADecryptor::SetPassword(std::wstring _password)
|
||||
_buf verifierInputKey = GenerateAgileKey( pSalt, pPassword, pInputBlockKey, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm );
|
||||
_buf verifierHashKey = GenerateAgileKey( pSalt, pPassword, pValueBlockKey, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm );
|
||||
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
rc4Decryption.SetKey(verifierInputKey.ptr, verifierInputKey.size);
|
||||
}
|
||||
//--------------------------------------------
|
||||
_buf decryptedVerifierHashInputBytes;
|
||||
DecryptCipher(verifierInputKey, pSalt, pEncVerInput, decryptedVerifierHashInputBytes, cryptData.cipherAlgorithm);
|
||||
//--------------------------------------------
|
||||
_buf hashBuf = HashAppend(decryptedVerifierHashInputBytes, empty, cryptData.hashAlgorithm);
|
||||
//--------------------------------------------
|
||||
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
rc4Decryption.SetKey(verifierHashKey.ptr, verifierHashKey.size);
|
||||
}
|
||||
_buf decryptedVerifierHashBytes;
|
||||
DecryptCipher(verifierHashKey, pSalt, pEncVerValue, decryptedVerifierHashBytes, cryptData.cipherAlgorithm);
|
||||
//--------------------------------------------
|
||||
@ -518,10 +589,7 @@ bool ECMADecryptor::SetPassword(std::wstring _password)
|
||||
}
|
||||
else
|
||||
{
|
||||
_buf verifierKey = GenerateHashKey(pSalt, pPassword, cryptData.hashSize, cryptData.spinCount, cryptData.hashAlgorithm);
|
||||
CorrectHashSize(verifierKey, cryptData.keySize, 0);
|
||||
if (cryptData.keySize == 5)
|
||||
CorrectHashSize(verifierKey, 16, 0); //40-bit crypt key !!!
|
||||
_buf verifierKey = GenerateHashKey(pSalt, pPassword, cryptData.hashSize, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm);
|
||||
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
@ -538,7 +606,7 @@ bool ECMADecryptor::SetPassword(std::wstring _password)
|
||||
_buf decryptedVerifierHashBytes;
|
||||
DecryptCipher(verifierKey, pSalt, pEncVerValue, decryptedVerifierHashBytes, cryptData.cipherAlgorithm);
|
||||
|
||||
bVerify = (decryptedVerifierHashBytes==hashBuf);
|
||||
bVerify = (decryptedVerifierHashBytes == hashBuf);
|
||||
}
|
||||
return bVerify;
|
||||
}
|
||||
@ -587,11 +655,8 @@ void ECMADecryptor::Decrypt(char* data , const size_t size, const unsigned long
|
||||
_buf pPassword (password);
|
||||
_buf pSalt (cryptData.saltValue);
|
||||
|
||||
_buf hashKey = GenerateHashKey(pSalt, pPassword, cryptData.hashSize, cryptData.spinCount, cryptData.hashAlgorithm, block_index);
|
||||
CorrectHashSize(hashKey, cryptData.keySize, 0);
|
||||
_buf hashKey = GenerateHashKey(pSalt, pPassword, cryptData.hashSize, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm, block_index);
|
||||
|
||||
if (cryptData.keySize == 5) CorrectHashSize(hashKey, 16, 0); //40-bit crypt key !!!
|
||||
|
||||
rc4Decryption.SetKey(hashKey.ptr, hashKey.size);
|
||||
}
|
||||
|
||||
@ -681,6 +746,10 @@ void ECMADecryptor::Decrypt(unsigned char* data_inp, int size, unsigned char*&
|
||||
|
||||
_buf agileKey = GenerateAgileKey( pSalt, pPassword, pBlockKey, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm);
|
||||
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
rc4Decryption.SetKey(agileKey.ptr, agileKey.size);
|
||||
}
|
||||
_buf pDecryptedKey;
|
||||
DecryptCipher( agileKey, pSalt, pKeyValue, pDecryptedKey, cryptData.cipherAlgorithm);
|
||||
|
||||
@ -688,6 +757,10 @@ void ECMADecryptor::Decrypt(unsigned char* data_inp, int size, unsigned char*&
|
||||
|
||||
int i = start_iv_block, sz = 4096, pos = 0;//aes block size = 4096
|
||||
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
rc4Decryption.SetKey(pDecryptedKey.ptr, pDecryptedKey.size);
|
||||
}
|
||||
while (pos < size)
|
||||
{
|
||||
if (pos + sz > size)
|
||||
@ -708,14 +781,10 @@ void ECMADecryptor::Decrypt(unsigned char* data_inp, int size, unsigned char*&
|
||||
}
|
||||
else
|
||||
{
|
||||
_buf hashKey = GenerateHashKey(pSalt, pPassword, cryptData.hashSize, cryptData.spinCount, cryptData.hashAlgorithm, start_iv_block);
|
||||
CorrectHashSize(hashKey, cryptData.keySize, 0);
|
||||
_buf hashKey = GenerateHashKey(pSalt, pPassword, cryptData.hashSize, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm, start_iv_block);
|
||||
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
if (cryptData.keySize == 5)
|
||||
CorrectHashSize(hashKey, 16, 0); //40-bit crypt key !!!
|
||||
|
||||
{
|
||||
rc4Decryption.SetKey(hashKey.ptr, hashKey.size);
|
||||
}
|
||||
|
||||
@ -759,40 +828,85 @@ void ECMAEncryptor::SetPassword(std::wstring _password)
|
||||
//---------
|
||||
_buf pPassword (password);
|
||||
_buf empty (NULL, 0, false);
|
||||
|
||||
_buf pBlockKey ((unsigned char*)encrKeyValueBlockKey, 8);
|
||||
_buf pInputBlockKey ((unsigned char*)encrVerifierHashInputBlockKey, 8);
|
||||
_buf pValueBlockKey ((unsigned char*)encrVerifierHashValueBlockKey, 8);
|
||||
|
||||
|
||||
_buf pSalt (seed_salt.data(), seed_salt.size());
|
||||
_buf pDataSalt (seed_datasalt.data(), seed_datasalt.size());
|
||||
_buf pDecryptedKey (seed_key.data(), seed_key.size());
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
_buf agileKey = GenerateAgileKey( pSalt, pPassword, pBlockKey, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm);
|
||||
if (cryptData.bAgile == true)
|
||||
{
|
||||
_buf pBlockKey ((unsigned char*)encrKeyValueBlockKey, 8);
|
||||
_buf pInputBlockKey ((unsigned char*)encrVerifierHashInputBlockKey, 8);
|
||||
_buf pValueBlockKey ((unsigned char*)encrVerifierHashValueBlockKey, 8);
|
||||
|
||||
_buf agileKey = GenerateAgileKey( pSalt, pPassword, pBlockKey, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm);
|
||||
|
||||
_buf pKeyValue;
|
||||
EncryptCipher( agileKey, pSalt, pDecryptedKey, pKeyValue, cryptData.cipherAlgorithm);
|
||||
|
||||
//--------------------------------------------
|
||||
_buf decryptedVerifierHashInputBytes(seed_verify.data(), seed_verify.size());
|
||||
_buf verifierInputKey = GenerateAgileKey( pSalt, pPassword, pInputBlockKey, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm );
|
||||
|
||||
_buf pEncVerInput;
|
||||
EncryptCipher( verifierInputKey, pSalt, decryptedVerifierHashInputBytes, pEncVerInput, cryptData.cipherAlgorithm);
|
||||
//--------------------------------------------
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
rc4Encryption.SetKey(agileKey.ptr, agileKey.size);
|
||||
}
|
||||
_buf pKeyValue;
|
||||
EncryptCipher( agileKey, pSalt, pDecryptedKey, pKeyValue, cryptData.cipherAlgorithm);
|
||||
|
||||
//--------------------------------------------
|
||||
_buf decryptedVerifierHashInputBytes(seed_verify.data(), seed_verify.size());
|
||||
_buf verifierInputKey = GenerateAgileKey( pSalt, pPassword, pInputBlockKey, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm );
|
||||
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
rc4Encryption.SetKey(verifierInputKey.ptr, verifierInputKey.size);
|
||||
}
|
||||
_buf pEncVerInput;
|
||||
EncryptCipher( verifierInputKey, pSalt, decryptedVerifierHashInputBytes, pEncVerInput, cryptData.cipherAlgorithm);
|
||||
//--------------------------------------------
|
||||
|
||||
_buf decryptedVerifierHashBytes = HashAppend(decryptedVerifierHashInputBytes, empty, cryptData.hashAlgorithm);
|
||||
_buf verifierHashKey = GenerateAgileKey(pSalt, pPassword, pValueBlockKey, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm);
|
||||
|
||||
_buf pEncVerValue;
|
||||
EncryptCipher( verifierHashKey, pSalt, decryptedVerifierHashBytes, pEncVerValue, cryptData.cipherAlgorithm);
|
||||
_buf decryptedVerifierHashBytes = HashAppend(decryptedVerifierHashInputBytes, empty, cryptData.hashAlgorithm);
|
||||
_buf verifierHashKey = GenerateAgileKey(pSalt, pPassword, pValueBlockKey, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm);
|
||||
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
rc4Encryption.SetKey(verifierHashKey.ptr, verifierHashKey.size);
|
||||
}
|
||||
else if (decryptedVerifierHashBytes.size % PADDING_SIZE != 0)
|
||||
{
|
||||
CorrectHashSize(decryptedVerifierHashBytes, (decryptedVerifierHashBytes.size / PADDING_SIZE + 1) * PADDING_SIZE, 0);
|
||||
}
|
||||
_buf pEncVerValue;
|
||||
EncryptCipher( verifierHashKey, pSalt, decryptedVerifierHashBytes, pEncVerValue, cryptData.cipherAlgorithm);
|
||||
|
||||
cryptData.saltValue = std::string((char*)pSalt.ptr, pSalt.size);
|
||||
cryptData.dataSaltValue = std::string((char*)pDataSalt.ptr, pDataSalt.size);
|
||||
cryptData.encryptedKeyValue = std::string((char*)pKeyValue.ptr, pKeyValue.size);
|
||||
cryptData.encryptedVerifierInput = std::string((char*)pEncVerInput.ptr, pEncVerInput.size);
|
||||
cryptData.encryptedVerifierValue = std::string((char*)pEncVerValue.ptr, pEncVerValue.size);
|
||||
cryptData.saltValue = std::string((char*)pSalt.ptr, pSalt.size);
|
||||
cryptData.dataSaltValue = std::string((char*)pDataSalt.ptr, pDataSalt.size);
|
||||
cryptData.encryptedKeyValue = std::string((char*)pKeyValue.ptr, pKeyValue.size);
|
||||
cryptData.encryptedVerifierInput = std::string((char*)pEncVerInput.ptr, pEncVerInput.size);
|
||||
cryptData.encryptedVerifierValue = std::string((char*)pEncVerValue.ptr, pEncVerValue.size);
|
||||
}
|
||||
else
|
||||
{
|
||||
_buf verifierKey = GenerateHashKey(pSalt, pPassword, cryptData.hashSize, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm);
|
||||
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
rc4Encryption.SetKey(verifierKey.ptr, verifierKey.size);
|
||||
}
|
||||
_buf decryptedVerInput(seed_verify.data(), seed_verify.size());
|
||||
|
||||
_buf pEncVerInput;
|
||||
EncryptCipher( verifierKey, pSalt, decryptedVerInput, pEncVerInput, cryptData.cipherAlgorithm);
|
||||
|
||||
_buf hashBuf = HashAppend(decryptedVerInput, empty, cryptData.hashAlgorithm);
|
||||
if (cryptData.cipherAlgorithm != CRYPT_METHOD::RC4 && hashBuf.size % PADDING_SIZE != 0)
|
||||
{
|
||||
CorrectHashSize(hashBuf, (hashBuf.size / PADDING_SIZE + 1) * PADDING_SIZE, 0);
|
||||
}
|
||||
|
||||
_buf pEncVerValue;
|
||||
EncryptCipher( verifierKey, pSalt, hashBuf, pEncVerValue, cryptData.cipherAlgorithm);
|
||||
|
||||
cryptData.saltValue = std::string((char*)pSalt.ptr, pSalt.size);
|
||||
cryptData.encryptedVerifierInput = std::string((char*)pEncVerInput.ptr, pEncVerInput.size);
|
||||
cryptData.encryptedVerifierValue = std::string((char*)pEncVerValue.ptr, pEncVerValue.size);
|
||||
}
|
||||
}
|
||||
|
||||
void ECMAEncryptor::SetCryptData(_ecmaCryptData & data)
|
||||
@ -823,6 +937,11 @@ void ECMAEncryptor::UpdateDataIntegrity(unsigned char* data, int size)
|
||||
//----
|
||||
_buf agileKey = GenerateAgileKey( pSalt, pPassword, pBlockKey, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm);
|
||||
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
rc4Encryption.SetKey(agileKey.ptr, agileKey.size);
|
||||
}
|
||||
|
||||
_buf secretKey;
|
||||
DecryptCipher( agileKey, pSalt, pKeyValue, secretKey, cryptData.cipherAlgorithm);
|
||||
|
||||
@ -844,16 +963,28 @@ void ECMAEncryptor::UpdateDataIntegrity(unsigned char* data, int size)
|
||||
std::string sData((char*)data, size);
|
||||
_buf hmac = Hmac(pSaltHmac, cryptData.hashAlgorithm, sData);
|
||||
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
rc4Encryption.SetKey(secretKey.ptr, secretKey.size);
|
||||
}
|
||||
if (pSaltHmac.size % PADDING_SIZE != 0)
|
||||
{
|
||||
CorrectHashSize(pSaltHmac, (pSaltHmac.size / PADDING_SIZE + 1) * PADDING_SIZE, 0);
|
||||
}
|
||||
_buf pEncHmacKey;
|
||||
EncryptCipher(secretKey, iv1, pSaltHmac, pEncHmacKey, cryptData.cipherAlgorithm);
|
||||
|
||||
if (hmac.size % PADDING_SIZE != 0)
|
||||
{
|
||||
CorrectHashSize(hmac, (hmac.size / PADDING_SIZE + 1) * PADDING_SIZE, 0);
|
||||
}
|
||||
_buf pEncHmacValue;
|
||||
EncryptCipher(secretKey, iv2, hmac, pEncHmacValue, cryptData.cipherAlgorithm);
|
||||
|
||||
cryptData.encryptedHmacKey = std::string((char*)pEncHmacKey.ptr, pEncHmacKey.size);
|
||||
cryptData.encryptedHmacValue = std::string((char*)pEncHmacValue.ptr, pEncHmacValue.size);
|
||||
}
|
||||
#define PADDING_SIZE 16 // 8
|
||||
|
||||
int ECMAEncryptor::Encrypt(unsigned char* data_inp_ptr, int size, unsigned char*& data_out_ptr)
|
||||
{
|
||||
data_out_ptr = NULL;
|
||||
@ -863,7 +994,8 @@ int ECMAEncryptor::Encrypt(unsigned char* data_inp_ptr, int size, unsigned char*
|
||||
_buf empty (NULL, 0, false);
|
||||
|
||||
int size_out = size;
|
||||
if (size_out % PADDING_SIZE != 0)
|
||||
|
||||
if (cryptData.cipherAlgorithm != CRYPT_METHOD::RC4 && size_out % PADDING_SIZE != 0)
|
||||
size_out = (size_out / PADDING_SIZE + 1) * PADDING_SIZE;
|
||||
|
||||
data_out_ptr = new unsigned char[size_out + PADDING_SIZE]; // real size + padding + size for realsize
|
||||
@ -873,63 +1005,90 @@ int ECMAEncryptor::Encrypt(unsigned char* data_inp_ptr, int size, unsigned char*
|
||||
|
||||
unsigned char* data_inp = data_inp_ptr;
|
||||
unsigned char* data_out = data_out_ptr + 8;
|
||||
|
||||
_buf pBlockKey ((unsigned char*)encrKeyValueBlockKey, 8);
|
||||
_buf pDataSalt (cryptData.dataSaltValue);
|
||||
_buf pKeyValue (cryptData.encryptedKeyValue);
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
_buf agileKey = GenerateAgileKey( pSalt, pPassword, pBlockKey, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm);
|
||||
|
||||
_buf pDecryptedKey;
|
||||
DecryptCipher( agileKey, pSalt, pKeyValue, pDecryptedKey, cryptData.cipherAlgorithm);
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
_buf iv(cryptData.blockSize, true);
|
||||
|
||||
int i = 0, sz = 4096, enc_size = 0;
|
||||
|
||||
while (enc_size < size)
|
||||
{
|
||||
if (enc_size + sz > size)
|
||||
{
|
||||
sz = size - enc_size;
|
||||
}
|
||||
if (cryptData.bAgile)
|
||||
{
|
||||
_buf pBlockKey ((unsigned char*)encrKeyValueBlockKey, 8);
|
||||
_buf pDataSalt (cryptData.dataSaltValue);
|
||||
_buf pKeyValue (cryptData.encryptedKeyValue);
|
||||
|
||||
_buf pIndex((unsigned char*)&i, 4);
|
||||
iv = HashAppend(pDataSalt, pIndex, cryptData.hashAlgorithm);
|
||||
//------------------------------------------------------------------------------------------------
|
||||
_buf agileKey = GenerateAgileKey( pSalt, pPassword, pBlockKey, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm);
|
||||
|
||||
CorrectHashSize(iv, cryptData.blockSize, 0x36);
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
rc4Decryption.SetKey(agileKey.ptr, agileKey.size);
|
||||
}
|
||||
_buf pDecryptedKey;
|
||||
DecryptCipher( agileKey, pSalt, pKeyValue, pDecryptedKey, cryptData.cipherAlgorithm);
|
||||
|
||||
if (sz < 4096)
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
_buf pInp(4096);
|
||||
memcpy(pInp.ptr, data_inp, sz );
|
||||
pInp.size = sz;
|
||||
_buf pOut(4096);
|
||||
|
||||
EncryptCipher(pDecryptedKey, iv, pInp, pOut, cryptData.cipherAlgorithm);
|
||||
|
||||
if (sz % PADDING_SIZE != 0)
|
||||
sz = (sz / PADDING_SIZE + 1) * PADDING_SIZE;
|
||||
|
||||
memcpy(data_out, pOut.ptr, sz);
|
||||
|
||||
rc4Encryption.SetKey(pDecryptedKey.ptr, agileKey.size);
|
||||
}
|
||||
else
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
_buf iv(cryptData.blockSize, true);
|
||||
|
||||
int i = 0, sz = 4096, enc_size = 0;
|
||||
|
||||
while (enc_size < size)
|
||||
{
|
||||
_buf pInp(data_inp, sz, false);
|
||||
_buf pOut(data_out, sz, false);
|
||||
if (enc_size + sz > size)
|
||||
{
|
||||
sz = size - enc_size;
|
||||
}
|
||||
|
||||
EncryptCipher(pDecryptedKey, iv, pInp, pOut, cryptData.cipherAlgorithm);
|
||||
}
|
||||
data_inp += sz;
|
||||
data_out += sz;
|
||||
_buf pIndex((unsigned char*)&i, 4);
|
||||
iv = HashAppend(pDataSalt, pIndex, cryptData.hashAlgorithm);
|
||||
|
||||
enc_size += sz; i++;
|
||||
CorrectHashSize(iv, cryptData.blockSize, 0x36);
|
||||
|
||||
if (sz < 4096)
|
||||
{
|
||||
_buf pInp(4096);
|
||||
memcpy(pInp.ptr, data_inp, sz );
|
||||
pInp.size = sz;
|
||||
_buf pOut(4096);
|
||||
|
||||
EncryptCipher(pDecryptedKey, iv, pInp, pOut, cryptData.cipherAlgorithm);
|
||||
|
||||
if (sz % PADDING_SIZE != 0)
|
||||
sz = (sz / PADDING_SIZE + 1) * PADDING_SIZE;
|
||||
|
||||
memcpy(data_out, pOut.ptr, sz);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
_buf pInp(data_inp, sz, false);
|
||||
_buf pOut(data_out, sz, false);
|
||||
|
||||
EncryptCipher(pDecryptedKey, iv, pInp, pOut, cryptData.cipherAlgorithm);
|
||||
}
|
||||
data_inp += sz;
|
||||
data_out += sz;
|
||||
|
||||
enc_size += sz; i++;
|
||||
}
|
||||
return enc_size + 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
_buf hashKey = GenerateHashKey(pSalt, pPassword, cryptData.hashSize, cryptData.keySize, cryptData.spinCount, cryptData.hashAlgorithm);
|
||||
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::RC4)
|
||||
{
|
||||
rc4Decryption.SetKey(hashKey.ptr, hashKey.size);
|
||||
rc4Encryption.SetKey(hashKey.ptr, hashKey.size);
|
||||
}
|
||||
|
||||
_buf pInp(data_inp, size, false);
|
||||
_buf pOut(data_out, size_out, false);
|
||||
|
||||
return enc_size + 8;
|
||||
EncryptCipher(hashKey, empty, pInp, pOut, cryptData.cipherAlgorithm/*, StreamTransformationFilter::ZEROS_PADDING*/);
|
||||
|
||||
return size_out + 8;
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
ODFDecryptor::ODFDecryptor()
|
||||
|
||||
@ -55,7 +55,9 @@ namespace CRYPT_METHOD
|
||||
AES_CBC,
|
||||
AES_CFB,
|
||||
AES_ECB,
|
||||
Blowfish_CFB
|
||||
Blowfish_CFB,
|
||||
DES_CBC,
|
||||
DES_ECB
|
||||
};
|
||||
}
|
||||
namespace CRYPT
|
||||
|
||||
@ -46,7 +46,8 @@
|
||||
|
||||
using namespace CRYPT;
|
||||
|
||||
#define GETBIT(from, num) ((from & (1 << num)) != 0)
|
||||
#define GETBIT(from, num) ((from & (1 << num)) != 0)
|
||||
#define SETBIT(to, num, setorclear) {setorclear ? to |= (1 << num) : to &= ~(1 << num);}
|
||||
|
||||
#define WritingElement_ReadAttributes_Start(Reader) \
|
||||
if ( Reader.GetAttributesCount() <= 0 )\
|
||||
@ -291,7 +292,14 @@ bool ReadXmlEncryptionInfo(const std::string & xml_string, _ecmaCryptData & cryp
|
||||
if (keyData.cipherChaining == "ChainingModeCBC") cryptData.cipherAlgorithm = CRYPT_METHOD::AES_CBC;
|
||||
if (keyData.cipherChaining == "ChainingModeCFB") cryptData.cipherAlgorithm = CRYPT_METHOD::AES_CFB;
|
||||
}
|
||||
|
||||
else if (keyData.cipherAlgorithm == "RC4")
|
||||
{
|
||||
cryptData.cipherAlgorithm = CRYPT_METHOD::RC4;
|
||||
}
|
||||
else if (keyData.cipherAlgorithm == "DES")
|
||||
{
|
||||
cryptData.cipherAlgorithm = CRYPT_METHOD::DES_ECB;
|
||||
}
|
||||
if (keyData.hashAlgorithm == "SHA1") cryptData.hashAlgorithm = CRYPT_METHOD::SHA1;
|
||||
if (keyData.hashAlgorithm == "SHA224") cryptData.hashAlgorithm = CRYPT_METHOD::SHA224;
|
||||
if (keyData.hashAlgorithm == "SHA256") cryptData.hashAlgorithm = CRYPT_METHOD::SHA256;
|
||||
@ -315,12 +323,33 @@ bool WriteXmlEncryptionInfo(const _ecmaCryptData & cryptData, std::string & xml_
|
||||
keyData.keyBits = std::to_string(cryptData.keySize * 8);
|
||||
keyData.saltValue = EncodeBase64(cryptData.dataSaltValue);
|
||||
|
||||
keyData.cipherAlgorithm = "AES";
|
||||
|
||||
if (keyData.cipherAlgorithm == "AES")
|
||||
switch(cryptData.cipherAlgorithm)
|
||||
{
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::AES_CBC) keyData.cipherChaining = "ChainingModeCBC";
|
||||
if (cryptData.cipherAlgorithm == CRYPT_METHOD::AES_CFB) keyData.cipherChaining = "ChainingModeCFB";
|
||||
case CRYPT_METHOD::RC4:
|
||||
keyData.cipherAlgorithm = "RC4";
|
||||
break;
|
||||
case CRYPT_METHOD::AES_CBC:
|
||||
keyData.cipherAlgorithm = "AES";
|
||||
keyData.cipherChaining = "ChainingModeCBC";
|
||||
break;
|
||||
case CRYPT_METHOD::AES_ECB:
|
||||
keyData.cipherAlgorithm = "AES";
|
||||
keyData.cipherChaining = "ChainingModeECB";
|
||||
break;
|
||||
case CRYPT_METHOD::AES_CFB:
|
||||
keyData.cipherAlgorithm = "AES";
|
||||
keyData.cipherChaining = "ChainingModeCFB";
|
||||
break;
|
||||
case CRYPT_METHOD::DES_CBC:
|
||||
keyData.cipherAlgorithm = "DES";
|
||||
keyData.cipherChaining = "ChainingModeCBC";
|
||||
break;
|
||||
case CRYPT_METHOD::DES_ECB:
|
||||
keyData.cipherAlgorithm = "DES";
|
||||
keyData.cipherChaining = "ChainingModeECB";
|
||||
break;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
switch(cryptData.hashAlgorithm)
|
||||
@ -360,7 +389,12 @@ bool WriteXmlEncryptionInfo(const _ecmaCryptData & cryptData, std::string & xml_
|
||||
CP_XML_ATTR("keyBits", keyData.keyBits);
|
||||
CP_XML_ATTR("hashSize", keyData.hashSize);
|
||||
CP_XML_ATTR("cipherAlgorithm", keyData.cipherAlgorithm);
|
||||
CP_XML_ATTR("cipherChaining", keyData.cipherChaining);
|
||||
|
||||
if (false == keyData.cipherChaining.empty())
|
||||
{
|
||||
CP_XML_ATTR("cipherChaining", keyData.cipherChaining);
|
||||
}
|
||||
|
||||
CP_XML_ATTR("hashAlgorithm", keyData.hashAlgorithm);
|
||||
CP_XML_ATTR("saltValue", keyData.saltValue);
|
||||
}
|
||||
@ -400,7 +434,90 @@ bool WriteXmlEncryptionInfo(const _ecmaCryptData & cryptData, std::string & xml_
|
||||
|
||||
return true;
|
||||
}
|
||||
bool WriteStandartEncryptionInfo(unsigned char* data, int &size, _ecmaCryptData & cryptData)
|
||||
{
|
||||
if (!data || size < 1) return false;
|
||||
MemoryStream mem_stream(data, size, false);
|
||||
|
||||
_UINT32 SizeHeader = 0, Flags = 0, SizeExtra = 0, AlgID = 0, AlgIDHash = 0, KeySize = 0, ProviderType = 0, Reserved1 = 0, Reserved2 = 0;
|
||||
|
||||
bool fCryptoAPI = true, fDocProps = false, fExternal = false, fAES = cryptData.cipherAlgorithm != CRYPT_METHOD::RC4;
|
||||
|
||||
SETBIT(Flags, 2, fCryptoAPI);
|
||||
SETBIT(Flags, 3, fDocProps);
|
||||
SETBIT(Flags, 4, fExternal);
|
||||
SETBIT(Flags, 5, fAES);
|
||||
|
||||
mem_stream.WriteUInt32(SizeHeader);
|
||||
|
||||
KeySize = (cryptData.keySize == 5) ? 0 : cryptData.keySize * 8;
|
||||
|
||||
switch(cryptData.cipherAlgorithm)
|
||||
{
|
||||
case CRYPT_METHOD::RC4:
|
||||
{
|
||||
ProviderType = 0x0001;
|
||||
AlgID = 0x6801;
|
||||
}break;
|
||||
case CRYPT_METHOD::AES_ECB:
|
||||
case CRYPT_METHOD::AES_CBC:
|
||||
{
|
||||
ProviderType = 0x0018;
|
||||
switch(KeySize)
|
||||
{
|
||||
case 128: AlgID = 0x660E; break;
|
||||
case 192: AlgID = 0x660F; break;
|
||||
case 256: AlgID = 0x6610; break;
|
||||
}
|
||||
break;
|
||||
}break;
|
||||
}
|
||||
switch(cryptData.hashAlgorithm)
|
||||
{
|
||||
case CRYPT_METHOD::MD5: AlgIDHash = 0x8003; break;
|
||||
case CRYPT_METHOD::SHA1: AlgIDHash = 0x8004; break;
|
||||
}
|
||||
|
||||
mem_stream.WriteUInt32(Flags);
|
||||
mem_stream.WriteUInt32(SizeExtra);
|
||||
mem_stream.WriteUInt32(AlgID);
|
||||
mem_stream.WriteUInt32(AlgIDHash);
|
||||
mem_stream.WriteUInt32(KeySize);
|
||||
mem_stream.WriteUInt32(ProviderType);
|
||||
mem_stream.WriteUInt32(Reserved1);
|
||||
mem_stream.WriteUInt32(Reserved2);
|
||||
|
||||
std::string provider = "Microsoft Enhanced RSA and AES Cryptographic Provider";// to utf16
|
||||
|
||||
for (size_t i = 0; i < provider.length(); ++i)
|
||||
{
|
||||
mem_stream.WriteByte((unsigned char)provider[i]);
|
||||
mem_stream.WriteByte((unsigned char)0);
|
||||
}
|
||||
mem_stream.WriteByte((unsigned char)0); //null terminate
|
||||
mem_stream.WriteByte((unsigned char)0);
|
||||
|
||||
SizeHeader = mem_stream.GetPosition() - 4;
|
||||
|
||||
//EncryptionVerifier
|
||||
mem_stream.WriteUInt32((_UINT32)cryptData.saltSize);
|
||||
|
||||
mem_stream.WriteBytes((unsigned char*)cryptData.saltValue.c_str(), cryptData.saltSize);
|
||||
|
||||
mem_stream.WriteBytes((unsigned char*)cryptData.encryptedVerifierInput.c_str(), 0x10);
|
||||
|
||||
mem_stream.WriteUInt32((_UINT32)cryptData.hashSize);
|
||||
|
||||
int szEncryptedVerifierHash = (ProviderType == 0x0001) ? 0x14 : 0x20; //RC4 | AES
|
||||
mem_stream.WriteBytes((unsigned char*)cryptData.encryptedVerifierValue.c_str(), szEncryptedVerifierHash);
|
||||
|
||||
size = mem_stream.GetPosition();
|
||||
|
||||
mem_stream.Seek(0);
|
||||
mem_stream.WriteUInt32(SizeHeader);
|
||||
|
||||
return true;
|
||||
}
|
||||
bool ReadStandartEncryptionInfo(unsigned char* data, int size, _ecmaCryptData & cryptData)
|
||||
{
|
||||
if (!data || size < 1) return false;
|
||||
@ -445,21 +562,29 @@ bool ReadStandartEncryptionInfo(unsigned char* data, int size, _ecmaCryptData &
|
||||
|
||||
cryptData.hashSize = mem_stream.ReadUInt32();
|
||||
|
||||
int szEncryptedVerifierHash = (ProviderType == 0x0001) ? 0x14 : 0x20;
|
||||
int szEncryptedVerifierHash = (ProviderType == 0x0001) ? 0x14 : 0x20; // RC4 | AES
|
||||
cryptData.encryptedVerifierValue = std::string((char*)data + mem_stream.GetPosition(), szEncryptedVerifierHash);
|
||||
mem_stream.ReadBytes(szEncryptedVerifierHash, false);
|
||||
|
||||
pos = mem_stream.GetPosition();
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
cryptData.hashAlgorithm = CRYPT_METHOD::SHA1; //by AlgIDHash -> 0x0000 || 0x8004
|
||||
cryptData.spinCount = 50000;
|
||||
switch(AlgIDHash)
|
||||
{
|
||||
case 0x8003:
|
||||
cryptData.hashAlgorithm = CRYPT_METHOD::MD5; break;
|
||||
case 0x0000:
|
||||
case 0x8004:
|
||||
cryptData.hashAlgorithm = CRYPT_METHOD::SHA1; break;
|
||||
}
|
||||
cryptData.spinCount = 50000;
|
||||
|
||||
switch(AlgID)
|
||||
{
|
||||
case 0x6801:
|
||||
cryptData.cipherAlgorithm = CRYPT_METHOD::RC4;
|
||||
cryptData.keySize = KeySize / 8;
|
||||
if (KeySize == 0) cryptData.keySize = 5; //40 bit
|
||||
else cryptData.keySize = KeySize / 8;
|
||||
break;
|
||||
case 0x660E:
|
||||
cryptData.cipherAlgorithm = CRYPT_METHOD::AES_ECB;
|
||||
@ -488,12 +613,44 @@ bool ECMACryptFile::EncryptOfficeFile(const std::wstring &file_name_inp, const s
|
||||
{
|
||||
_ecmaCryptData cryptData;
|
||||
|
||||
cryptData.bAgile = true;
|
||||
cryptData.hashAlgorithm = CRYPT_METHOD::SHA512;
|
||||
cryptData.keySize = 0x20;
|
||||
cryptData.hashSize = 0x40;
|
||||
cryptData.blockSize = 0x10;
|
||||
cryptData.saltSize = 0x10;
|
||||
//cryptData.bAgile = true;
|
||||
//cryptData.cipherAlgorithm = CRYPT_METHOD::DES_ECB;
|
||||
//cryptData.hashAlgorithm = CRYPT_METHOD::SHA512;
|
||||
//cryptData.keySize = 0x08;
|
||||
//cryptData.hashSize = 0x40;
|
||||
//cryptData.blockSize = 0x10;
|
||||
//cryptData.saltSize = 0x10;
|
||||
//cryptData.hashAlgorithm = CRYPT_METHOD::SHA1;
|
||||
//cryptData.keySize = 0x08;
|
||||
//cryptData.hashSize = 0x14;
|
||||
//cryptData.blockSize = 0x10;
|
||||
//cryptData.saltSize = 0x10;
|
||||
|
||||
cryptData.bAgile = true;
|
||||
cryptData.cipherAlgorithm = CRYPT_METHOD::AES_CBC;
|
||||
cryptData.hashAlgorithm = CRYPT_METHOD::SHA512;
|
||||
cryptData.keySize = 0x20;
|
||||
cryptData.hashSize = 0x40;
|
||||
cryptData.blockSize = 0x10;
|
||||
cryptData.saltSize = 0x10;
|
||||
|
||||
//cryptData.bAgile = false;
|
||||
//cryptData.cipherAlgorithm = CRYPT_METHOD::AES_ECB;
|
||||
//cryptData.hashAlgorithm = CRYPT_METHOD::SHA1;
|
||||
//cryptData.keySize = 0x10;
|
||||
//cryptData.hashSize = 0x14;
|
||||
//cryptData.blockSize = 0x10;
|
||||
//cryptData.saltSize = 0x10;
|
||||
//cryptData.spinCount = 50000;
|
||||
|
||||
//cryptData.bAgile = false;
|
||||
//cryptData.cipherAlgorithm = CRYPT_METHOD::RC4;
|
||||
//cryptData.hashAlgorithm = CRYPT_METHOD::SHA1;
|
||||
//cryptData.keySize = 7;
|
||||
//cryptData.hashSize = 0x14;
|
||||
//cryptData.blockSize = 0x10;
|
||||
//cryptData.saltSize = 0x10;
|
||||
//cryptData.spinCount = 50000;
|
||||
|
||||
ECMAEncryptor cryptor;
|
||||
|
||||
@ -539,22 +696,53 @@ bool ECMACryptFile::EncryptOfficeFile(const std::wstring &file_name_inp, const s
|
||||
|
||||
cryptor.GetCryptData(cryptData);
|
||||
|
||||
std::string strXml;
|
||||
WriteXmlEncryptionInfo(cryptData, strXml);
|
||||
if (cryptData.bAgile)
|
||||
{
|
||||
_UINT16 VersionInfoMajor = 0x0004, VersionInfoMinor = 0x0004; //agile
|
||||
|
||||
pStream->write((unsigned char*)&VersionInfoMajor, 2);
|
||||
pStream->write((unsigned char*)&VersionInfoMinor, 2);
|
||||
|
||||
_UINT16 VersionInfoMajor = 0x0004, VersionInfoMinor = 0x0004; //agile standart
|
||||
_UINT32 nEncryptionInfoFlags = 64;
|
||||
pStream->write((unsigned char*)&nEncryptionInfoFlags, 4);
|
||||
|
||||
std::string strXml;
|
||||
WriteXmlEncryptionInfo(cryptData, strXml);
|
||||
|
||||
pStream->write((unsigned char*)strXml.c_str(), strXml.length());
|
||||
|
||||
pStream->flush();
|
||||
delete pStream;
|
||||
}
|
||||
else
|
||||
{
|
||||
_UINT16 VersionInfoMajor = 0x0004, VersionInfoMinor = 0x0002; // standart
|
||||
|
||||
pStream->write((unsigned char*)&VersionInfoMajor, 2);
|
||||
pStream->write((unsigned char*)&VersionInfoMinor, 2);
|
||||
pStream->write((unsigned char*)&VersionInfoMajor, 2);
|
||||
pStream->write((unsigned char*)&VersionInfoMinor, 2);
|
||||
|
||||
_UINT32 nEncryptionInfoFlags = 64;
|
||||
pStream->write((unsigned char*)&nEncryptionInfoFlags, 4);
|
||||
|
||||
pStream->write((unsigned char*)strXml.c_str(), strXml.length());
|
||||
|
||||
pStream->flush();
|
||||
delete pStream;
|
||||
//-------------------------------------------------------------------
|
||||
_UINT32 nEncryptionInfoFlags = 0;
|
||||
bool fCryptoAPI = true, fDocProps = false, fExternal = false, fAES = cryptData.cipherAlgorithm != CRYPT_METHOD::RC4;
|
||||
|
||||
SETBIT(nEncryptionInfoFlags, 2, fCryptoAPI);
|
||||
SETBIT(nEncryptionInfoFlags, 3, fDocProps);
|
||||
SETBIT(nEncryptionInfoFlags, 4, fExternal);
|
||||
SETBIT(nEncryptionInfoFlags, 5, fAES);
|
||||
|
||||
pStream->write((unsigned char*)&nEncryptionInfoFlags, 4);
|
||||
|
||||
int nEncryptionInfoSize = 4096;
|
||||
unsigned char* byteEncryptionInfo = new unsigned char[nEncryptionInfoSize];
|
||||
|
||||
WriteStandartEncryptionInfo(byteEncryptionInfo, nEncryptionInfoSize, cryptData);
|
||||
|
||||
pStream->write(byteEncryptionInfo, nEncryptionInfoSize);
|
||||
delete []byteEncryptionInfo;
|
||||
|
||||
pStream->flush();
|
||||
delete pStream;
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
pStream = new POLE::Stream(pStorage, L"EncryptedPackage", true, lengthData);
|
||||
|
||||
pStream->write(data_out, lengthData);
|
||||
@ -651,10 +839,10 @@ bool ECMACryptFile::DecryptOfficeFile(const std::wstring &file_name_inp, const s
|
||||
else
|
||||
{
|
||||
cryptData.bAgile = false;
|
||||
bool fCryptoAPI = GETBIT(nEncryptionInfoFlags, 1);
|
||||
bool fDocProps = GETBIT(nEncryptionInfoFlags, 2);
|
||||
bool fExternal = GETBIT(nEncryptionInfoFlags, 3);
|
||||
bool fAES = GETBIT(nEncryptionInfoFlags, 4);
|
||||
bool fCryptoAPI = GETBIT(nEncryptionInfoFlags, 2);
|
||||
bool fDocProps = GETBIT(nEncryptionInfoFlags, 3);
|
||||
bool fExternal = GETBIT(nEncryptionInfoFlags, 4);
|
||||
bool fAES = GETBIT(nEncryptionInfoFlags, 5);
|
||||
|
||||
if ((VersionInfoMajor == 0x0003 || VersionInfoMajor == 0x0004) && VersionInfoMinor == 0x0003) //extensible info
|
||||
{
|
||||
@ -676,28 +864,6 @@ bool ECMACryptFile::DecryptOfficeFile(const std::wstring &file_name_inp, const s
|
||||
delete pStorage;
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
//pStream = new POLE::Stream(pStorage, "DataSpaces/DataSpaceMap");
|
||||
//if (pStream)
|
||||
//{
|
||||
// delete pStream;
|
||||
// pStorage->deleteByName("DataSpaces");
|
||||
|
||||
// //_UINT32 size = 0;
|
||||
// //_UINT32 count = 0;
|
||||
// //
|
||||
// //pStream->read((unsigned char*)&size, 4);
|
||||
// //pStream->read((unsigned char*)&count, 4);
|
||||
|
||||
// //for (int i = 0 ; i < count; i++)
|
||||
// //{
|
||||
// // _mapEntry m;
|
||||
// // ReadMapEntry(pStream, m);
|
||||
|
||||
// // mapEntries.push_back(m);
|
||||
// //}
|
||||
// //delete pStream;
|
||||
//}
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
ECMADecryptor decryptor;
|
||||
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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 */; };
|
||||
@ -75,20 +74,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 +432,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>"; };
|
||||
@ -490,7 +474,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 +509,6 @@
|
||||
children = (
|
||||
8A9FAC22207772CC007787F6 /* icu.xcodeproj */,
|
||||
696DD7C91F5D981A0021D0F3 /* OfficeCryptReader.xcodeproj */,
|
||||
691A8BCB1E2FA67E00DCB54A /* libxml2.xcodeproj */,
|
||||
6967B1C91E27B9C400A129E2 /* RtfFormatLib.xcodeproj */,
|
||||
6967B1031E27A41300A129E2 /* PdfWriter.xcodeproj */,
|
||||
6967B0CC1E27A35E00A129E2 /* HtmlFile.xcodeproj */,
|
||||
@ -585,14 +567,6 @@
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
691A8BCC1E2FA67E00DCB54A /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
691A8BD01E2FA67E00DCB54A /* liblibxml2.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
69415F201CB51C29003E771B /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -856,7 +830,6 @@
|
||||
dependencies = (
|
||||
8A9FAC2A207772D9007787F6 /* PBXTargetDependency */,
|
||||
696DD7D11F5D98270021D0F3 /* PBXTargetDependency */,
|
||||
691A8BD21E2FA68900DCB54A /* PBXTargetDependency */,
|
||||
6967B1D01E27B9D000A129E2 /* PBXTargetDependency */,
|
||||
6967B10C1E27A42500A129E2 /* PBXTargetDependency */,
|
||||
6967B0D31E27A36800A129E2 /* PBXTargetDependency */,
|
||||
@ -959,10 +932,6 @@
|
||||
ProductGroup = 69415FBB1CB5243F003E771B /* Products */;
|
||||
ProjectRef = 69415FBA1CB5243F003E771B /* libpsd.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 691A8BCC1E2FA67E00DCB54A /* Products */;
|
||||
ProjectRef = 691A8BCB1E2FA67E00DCB54A /* libxml2.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 69DA322D1CEE08DC00E10AF0 /* Products */;
|
||||
ProjectRef = 69DA322C1CEE08DC00E10AF0 /* metafile.xcodeproj */;
|
||||
@ -1032,13 +1001,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;
|
||||
@ -1265,11 +1227,6 @@
|
||||
name = ASCOfficeDocxFile2Lib_ios;
|
||||
targetProxy = 17C8DEDB1ACD6A3900902C85 /* PBXContainerItemProxy */;
|
||||
};
|
||||
691A8BD21E2FA68900DCB54A /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = libxml2;
|
||||
targetProxy = 691A8BD11E2FA68900DCB54A /* PBXContainerItemProxy */;
|
||||
};
|
||||
69415F261CB51C32003E771B /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = OfficeUtils;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#ifndef X2T_VERSION_H
|
||||
#define X2T_VERSION_H
|
||||
|
||||
#define X2T_VERSION "2.4.539.0"
|
||||
#define X2T_VERSION "2.4.545.0"
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user