Compare commits

...

178 Commits

Author SHA1 Message Date
c75aacaed8 Add cryptopp project 2018-05-10 12:04:44 +03:00
a4445cacaa PdfReader builds (windows) 2018-05-10 09:43:34 +03:00
d6ad9e84e2 Export CorrentPathW function in kernel library 2018-05-10 09:11:23 +03:00
d9687387f9 PdfReader - decrypt files (up to rev.5) 2018-05-08 18:44:57 +03:00
eaa01c7995 Merge remote-tracking branch 'origin/feature/static-libcurl' into develop 2018-05-08 13:00:39 +03:00
597f360336 . 2018-05-08 13:00:17 +03:00
d502206726 Add static libcurl 2018-05-08 12:18:15 +03:00
d0d90c641c Add building static libcurl 2018-05-08 10:59:50 +03:00
14fa14de3f RtfFormatReader - fix bug 37500 2018-05-07 19:26:38 +03:00
cced8f4912 x2t - fix bug 37670 2018-05-07 17:32:35 +03:00
2e40b96ed9 . 2018-05-05 13:17:39 +03:00
50ee7d7cc1 x2t - fix linux build 2018-05-04 17:44:23 +03:00
f9b54bffd4 Merge remote-tracking branch 'origin/hotfix/v5.1.4' into develop
# Conflicts:
#	DesktopEditor/common/Directory.h
#	DesktopEditor/common/File.h
2018-05-04 16:12:30 +03:00
a52a8e982e Merge pull request #80 from ONLYOFFICE/feature/desktop(5.1.3+)
Feature/desktop(5.1.3+)
2018-05-04 13:53:59 +03:00
128529ba80 x2t - from https://github.com/ONLYOFFICE/core/pull/65. 2018-05-03 19:44:09 +03:00
a571c88798 PdfReader - test project, fix image renderer 2018-05-03 18:12:51 +03:00
34bb84a792 [ios][x2t] fixed build 2018-05-03 16:50:50 +03:00
92d0d0d7ea . 2018-05-03 16:39:24 +03:00
449e3fc131 . 2018-05-03 16:18:33 +03:00
ce9fdb33b5 OdfFormatWriter - encrypted 2018-05-03 16:11:49 +03:00
2591f0a202 x2t - update crypto++ 2018-05-03 12:36:33 +03:00
6bc04fc06f . 2018-04-30 15:33:58 +03:00
047850dbd6 OdfFormatWriter - encryption 2018-04-29 17:22:44 +03:00
465b903ec5 Remove inline methods 2018-04-28 17:48:38 +03:00
6afa54ebef x2t - fix users files 2018-04-28 17:04:49 +03:00
27a0e77ef1 [bugs] Crypto bugs 2018-04-28 15:08:38 +03:00
c7b45910f8 . 2018-04-28 13:31:44 +03:00
ab1abb96fe [ios][x2t] fixed build 2018-04-28 12:09:15 +03:00
566d9e68e4 OdfFormatReader - decrypt 2018-04-27 20:23:32 +03:00
243b8eccdd [ios][x2t] fixed build 2018-04-27 19:55:37 +03:00
76b682063e x2t - save comments for presentation (undelete ms office) 2018-04-27 19:11:58 +03:00
effdab1ff4 Add not sha1 algorithms to sign/verify providers 2018-04-27 19:01:51 +03:00
658040f77b [ios][x2t] up test project 2018-04-27 18:01:47 +03:00
48aa99af83 Merge pull request #79 from ONLYOFFICE/feature/konovalovsergey-patch-1
[x2t] Bump compatibilityMode setting
2018-04-27 17:42:09 +03:00
a1b738fc42 Merge remote-tracking branch 'origin/hotfix/v5.1.4' into develop 2018-04-27 16:28:03 +03:00
00e9ce56df x2t - fix bug 37579 & bug 37589 2018-04-27 16:00:25 +03:00
2a4ce1f93f x2t - decrtypt Open Office Document 2018-04-27 15:42:25 +03:00
261e48227d Bugs 2018-04-26 18:29:39 +03:00
29e3f90ebf v5.1.3 2018-04-26 18:23:51 +03:00
d4a70d306f x2t - fix bug 37589 2018-04-26 18:15:11 +03:00
b9b843f25d Windows: add long file names support (x2t) 2018-04-26 13:45:02 +03:00
d7e2bedc6b Openssl errors 2018-04-25 16:51:10 +03:00
234459f37c x2t - fix bug 37579 2018-04-25 12:21:46 +03:00
58cd45f4ee [x2t] Bump compatibilityMode setting
Prevent opening files in compatibility mode in Word 2016.
2018-04-24 18:52:25 +03:00
33f7ee49df Bugs 2018-04-24 17:45:58 +03:00
e7ed48af49 . 2018-04-24 13:02:29 +03:00
cbd79c902e Merge branch 'origin/hotfix/v5.1.3' into develop 2018-04-24 12:03:39 +03:00
40c24b1577 . 2018-04-24 11:48:35 +03:00
95a49140cb Windows: add long file names support 2018-04-23 17:17:19 +03:00
aad12cf471 New scheme for openssl certificate selection 2018-04-23 17:17:19 +03:00
f0ffb7f14c x2t fix after testing (#76) 2018-04-20 18:46:45 +03:00
da329135e1 . 2018-04-20 16:40:19 +03:00
60ca9a2347 [ios][x2t] fixed build 2018-04-20 16:24:24 +03:00
5fdace28d2 Merge remote-tracking branch 'origin/hotfix/v5.1.3' into develop 2018-04-20 13:38:36 +03:00
85549c5b20 . 2018-04-20 13:35:30 +03:00
4c8bc2227a x2t - fix after testing (#75) 2018-04-20 12:05:39 +03:00
23ca735f23 Add not used String::format 2018-04-20 11:19:07 +03:00
4acefb020f Remove not required defines 2018-04-19 17:50:31 +03:00
684d697cae Remove xml2, agg, freestyle include folders from projects 2018-04-19 16:37:04 +03:00
1aa604c584 Remove dll-based projects from solution 2018-04-19 16:21:11 +03:00
51569b626f Fix build on macOS 2018-04-19 16:10:29 +03:00
89d7eb559d Switch to X2tSLN dependency 2018-04-19 15:30:06 +03:00
f6b3a78fe8 . 2018-04-19 15:16:16 +03:00
1900e2f0a0 . 2018-04-19 15:08:19 +03:00
d0e1785086 . 2018-04-19 14:47:58 +03:00
221d1ecbb5 x2t - fix test projects 2018-04-19 14:20:49 +03:00
2fc3b140d0 Fix build on macOS 2018-04-19 14:02:40 +03:00
bdb2ca8241 Merge remote-tracking branch 'origin/feature/core_dll' into develop 2018-04-19 13:20:07 +03:00
4055201322 . 2018-04-19 13:17:24 +03:00
5b305ec75d Correct previous commit 2018-04-19 12:00:24 +03:00
433686c01f Fix linux builds error 2018-04-19 11:59:40 +03:00
ccfc921883 x2t linux build 2018-04-19 10:08:08 +03:00
6b0d6fe890 AllFontsGen builds 2018-04-18 18:39:00 +03:00
5ae20c58ed Remove unused project 2018-04-18 18:16:33 +03:00
7b45fb8931 x2t worked version 2018-04-18 18:05:59 +03:00
d0ffc6f555 x2t 2018-04-18 17:39:28 +03:00
54e5bb8419 Remove OfficeUtils project 2018-04-18 17:28:01 +03:00
f7bb1766c0 Update project dependency 2018-04-18 17:02:08 +03:00
f0bb87ba14 . 2018-04-18 13:40:13 +03:00
a484dc1fd7 . 2018-04-18 13:27:33 +03:00
19cc78060c x2t builds 2018-04-18 13:16:10 +03:00
2682eda9c6 x2t builds (not complete) 2018-04-18 12:42:54 +03:00
8d750adb7b x2t (not complete) 2018-04-17 19:10:48 +03:00
c517b3ac19 fix 5.1.3 after used icu6 (#73) 2018-04-17 13:59:21 +03:00
f57b28cd24 PdfReader builds 2018-04-17 13:40:11 +03:00
b8215e9e82 Merge remote-tracking branch 'origin/hotfix/v5.1.3' into develop 2018-04-17 13:09:27 +03:00
f6305fca21 DocFormatReader - fix user file (table in table) 2018-04-17 12:50:15 +03:00
4cb984684d HtmlFile builds 2018-04-17 12:06:02 +03:00
903d903aad doctrenderer builds 2018-04-17 11:59:12 +03:00
fe53ae9b11 XpsFile builds 2018-04-17 11:27:14 +03:00
8ca218d600 PdfWriter & DjvuFile builds 2018-04-17 11:00:32 +03:00
87a9542fc7 [ios][x2t] support csv 2018-04-16 18:45:21 +03:00
48a1f01220 DocFormatReader- fix users file (table) (#71) 2018-04-16 17:59:44 +03:00
8a2923e534 Use only major version for icu numbering 2018-04-16 17:10:55 +03:00
0ab7e55add Recover icu paths for windows 2018-04-16 17:10:55 +03:00
cb1cb43a0b Fix the target chosing 2018-04-16 17:10:55 +03:00
0ca3432d05 Add icu installation to local folder on linux 2018-04-16 17:10:55 +03:00
50208be48d Add icu building from source on linux 2018-04-16 17:10:55 +03:00
c796f4a0f6 . 2018-04-16 17:10:55 +03:00
618da3c8cc UnicodeConverter - fix build with icu 6.0 win32&win64 2018-04-16 17:10:55 +03:00
9b4568e81a Restore icu version 2018-04-16 17:10:55 +03:00
752acf1e46 Refactore fetching icu 2018-04-16 17:10:55 +03:00
d9afc49bb3 Change devenv to msbuild 2018-04-16 17:10:55 +03:00
4c6ba8ed41 Add icu building from source code on windows 2018-04-16 17:10:55 +03:00
a0b32c1523 21 2018-04-16 16:49:30 +03:00
a2cc70233e remove cximage from PdfWriter 2018-04-16 16:43:34 +03:00
42c35a9803 20 2018-04-16 15:02:52 +03:00
a395420d59 DocFormatReader - fix user file(table) 2018-04-16 14:50:51 +03:00
c4ca4b5613 x2t - fix linux build 2018-04-16 14:46:22 +03:00
8100a2860f 19 2018-04-16 14:14:31 +03:00
dd83971001 Use only major version for icu numbering (#69) 2018-04-16 12:43:07 +03:00
c4abf6d149 18 2018-04-16 12:32:59 +03:00
c749cbf081 17 2018-04-16 10:14:24 +03:00
c7accf4370 16 2018-04-16 09:26:46 +03:00
b49e43c4cb [x2t] Fix bug 37146 2018-04-13 20:17:13 +03:00
322bc72ad1 15 2018-04-13 19:00:52 +03:00
33bf2df39d 14 2018-04-13 18:32:17 +03:00
aa344408b0 14 2018-04-13 18:25:55 +03:00
2a5d29c874 13 2018-04-13 18:09:02 +03:00
50ae01723c OdfFormatWriter - fix paragraph shading 2018-04-13 18:08:24 +03:00
c05ea1bd21 Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop 2018-04-13 10:26:37 +03:00
887905570a OdfFormatReader - read crypted files and decrypt it (template only) 2018-04-13 10:26:13 +03:00
ce76a7b075 [ios][x3t] support csv 2018-04-12 17:12:02 +03:00
6dda731502 PptFormatReader - fix after testing 2018-04-12 13:05:42 +03:00
3e9e70655c 12 2018-04-12 11:59:58 +03:00
ed9a6e7e5c 13 2018-04-11 18:53:29 +03:00
284b04574a 12 2018-04-11 18:21:02 +03:00
67eb5ac139 11 2018-04-11 17:41:48 +03:00
563014f8d7 10 2018-04-11 17:29:54 +03:00
290d845d7a 9 2018-04-11 17:20:13 +03:00
935e9396af 8 2018-04-11 15:17:28 +03:00
4de2649dcd 8 2018-04-11 15:07:12 +03:00
a8bcd38bce v5.1.2 2018-04-11 14:26:30 +03:00
46bc4e5e96 7 2018-04-11 14:26:29 +03:00
56475b7e8a 6 2018-04-11 14:14:02 +03:00
69a69d9fc2 5 2018-04-11 14:06:59 +03:00
b470120075 x2t version 2.4.531 2018-04-11 11:59:36 +03:00
7d2f96d284 4 2018-04-11 11:51:43 +03:00
0de5fb6bfc x2t - extended convert by UnicodeConverter 2018-04-10 19:58:48 +03:00
e753476826 3 2018-04-10 19:01:28 +03:00
983873d010 2 2018-04-10 18:53:17 +03:00
af037642dd 1 2018-04-10 18:24:49 +03:00
68122490bf . 2018-04-10 16:28:14 +03:00
4833c652d8 x2t version 2.4.520 2018-04-10 16:01:13 +03:00
af0e9be136 PptFormatReader - new converting group shapes 2018-04-10 15:02:31 +03:00
d987233335 Merge pull request #67 from ONLYOFFICE/feature/icu60
Feature/icu60
2018-04-09 18:38:50 +03:00
5f100d4ea0 [ios][x2t] icu fixed 2018-04-09 17:49:56 +03:00
d4e34e244f [ios][x2t] remove warnings 2018-04-09 14:20:56 +03:00
4b8bc2c8e7 OoxmlFormat - convert border in vml shape 2018-04-06 14:19:58 +03:00
b04f44ee2c [ios][x2t] icu fixed 2018-04-06 13:24:37 +03:00
fb3b6aff47 . 2018-04-06 12:59:54 +03:00
531460e37d Merge remote-tracking branch 'origin/hotfix/v5.1.2' into develop 2018-04-06 11:47:42 +03:00
09407b08ba UnicodeConverter - restore icu 55.1 builds for iMac 2018-04-06 11:40:57 +03:00
83bc1b18b6 fix RtfFileReader for iMac 2018-04-05 19:49:20 +03:00
56279f7465 Merge remote-tracking branch 'origin/hotfix/v5.1.2' into develop 2018-04-05 19:05:56 +03:00
566eeb06ae x2t version 2.4.526 2018-04-05 19:03:28 +03:00
7dc6d70b8a Merge remote-tracking branch 'origin/hotfix/v5.1.2' into develop 2018-04-05 18:28:00 +03:00
f5c359650f x2t - fix build 2018-04-05 18:23:06 +03:00
d665d9449e Merge remote-tracking branch 'origin/hotfix/v5.1.2' into develop 2018-04-05 17:50:30 +03:00
3c93563027 . 2018-04-05 17:43:59 +03:00
b525e1deb4 Merge commit '992e62b8c8efa40aede48e3e6732fe6da38171fe' into develop 2018-04-05 17:39:21 +03:00
d5b80e2fa3 x2t - fix https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/87#issuecomment-374490389 2018-04-05 17:34:39 +03:00
2bc2039c01 . 2018-04-05 17:28:17 +03:00
a0fdb1cbcc PptFormatReader - fix shape geometry in files from newest ms office 2018-04-05 17:27:02 +03:00
664007983d x2t fix mac build 2018-04-05 17:14:05 +03:00
a15aee3244 v5.1.1 2018-04-05 15:55:18 +03:00
5e034e2877 Recover icu paths for windows 2018-04-05 12:43:57 +03:00
8d77cdaf24 Merge branch 'feature/icu55-build' into feature/icu60 2018-04-04 18:24:19 +03:00
e73b5c29b2 Fix the target chosing 2018-04-04 18:23:17 +03:00
6a3b4d12a5 Add icu installation to local folder on linux 2018-04-04 16:36:25 +03:00
992e62b8c8 Add icu building from source on linux 2018-04-04 14:25:53 +03:00
021e01af4e . 2018-04-04 14:05:25 +03:00
55a1a2ca59 Merge branch 'feature/icu60' of https://github.com/ONLYOFFICE/core into feature/icu60 2018-04-04 13:15:10 +03:00
e644ef4062 UnicodeConverter - fix build with icu 6.0 win32&win64 2018-04-04 13:14:34 +03:00
45d51a0002 Restore icu version 2018-04-04 12:15:26 +03:00
247f0a7d89 Refactore fetching icu 2018-04-04 12:09:58 +03:00
7c621a4a81 Change devenv to msbuild 2018-04-03 19:57:02 +03:00
62ba68aaa8 Add icu building from source code on windows 2018-04-03 18:25:01 +03:00
2636 changed files with 84112 additions and 379278 deletions

View File

@ -58,6 +58,9 @@
#include <boost/format.hpp>
#define GETBITS(from, numL, numH) ((from & (((1 << (numH - numL + 1)) - 1) << numL)) >> numL)
#define GETBIT(from, num) ((from & (1 << num)) != 0)
namespace DocFileFormat
{
typedef unsigned char Bool8;
@ -638,14 +641,12 @@ namespace DocFileFormat
else
{
std::string sCodePage;
for (int i = 0; i < UNICODE_CONVERTER_ENCODINGS_COUNT; ++i)
std::map<int, std::string>::const_iterator pFind = NSUnicodeConverter::mapEncodingsICU.find(code_page);
if (pFind != NSUnicodeConverter::mapEncodingsICU.end())
{
if (code_page == NSUnicodeConverter::Encodings[i].WindowsCodePage)
{
sCodePage = NSUnicodeConverter::Encodings[i].Name;
break;
}
sCodePage = pFind->second;
}
if (sCodePage.empty())
sCodePage = "CP1250"/* + std::to_string(code_page)*/;

View File

@ -72,10 +72,14 @@ namespace DocFileFormat
{
AnnotationReferenceDescriptor* atrdPre10 = static_cast<AnnotationReferenceDescriptor*>(m_document->AnnotationsReferencePlex->Elements[index]);
unsigned short index_author = atrdPre10->GetAuthorIndex();
m_pXmlWriter->WriteNodeBegin( L"w:comment", TRUE );
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( index + 1 ));
m_pXmlWriter->WriteAttribute( L"w:author",
FormatUtils::XmlEncode(m_document->AnnotationOwners->at( atrdPre10->GetAuthorIndex() ) ));
if (index_author < m_document->AnnotationOwners->size()) //conv_253l2H1CehgKwsxCtNk__docx.doc
{
m_pXmlWriter->WriteAttribute( L"w:author",
FormatUtils::XmlEncode(m_document->AnnotationOwners->at( index_author ) ));
}
m_pXmlWriter->WriteAttribute( L"w:initials", atrdPre10->GetUserInitials());
//!!!TODO!!!

View File

@ -163,6 +163,7 @@ namespace OpenXmlRelationshipTypes
static const wchar_t* GlossaryDocument = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument";
static const wchar_t* Package = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package";
static const wchar_t* VbaProject = L"http://schemas.microsoft.com/office/2006/relationships/vbaProject";
static const wchar_t* Hyperlink = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink";
}
namespace MicrosoftWordRelationshipTypes

View File

@ -685,9 +685,9 @@ namespace DocFileFormat
if ( _bContentWrite )
{
m_pXmlWriter->WriteNodeBegin( L"w:fldChar", true );
m_pXmlWriter->WriteAttribute( L"w:fldCharType", L"begin" );
m_pXmlWriter->WriteNodeEnd( L"", true );
m_pXmlWriter->WriteNodeBegin( L"w:fldChar", true );
m_pXmlWriter->WriteAttribute( L"w:fldCharType", L"begin" );
m_pXmlWriter->WriteNodeEnd( L"", true );
_fieldLevels.back().bBegin = true;
}
@ -702,12 +702,12 @@ namespace DocFileFormat
{
_writeWebHidden = true;
std::wstring _writeTocLink =f1.substr(d + 9);
d = (int)_writeTocLink.find(L" ");
d = (int)_writeTocLink.find(L" ");
_writeTocLink = _writeTocLink.substr(0, d);
_writeAfterRun = std::wstring (L"<w:hyperlink w:anchor = \"");
_writeAfterRun = std::wstring (L"<w:hyperlink w:anchor = \"");
_writeAfterRun += _writeTocLink;
_writeAfterRun += std::wstring (L"\" w:history=\"1\">");
_writeAfterRun += std::wstring (L"\" w:history=\"1\">");
break;
//cp = cpFieldSep1;
@ -717,7 +717,28 @@ namespace DocFileFormat
_skipRuns = 5; //with separator
}
}
else if ( bEMBED || bLINK || bQUOTE)
//else if ( bHYPERLINK )
//{//todooo - выделение гиперссылки отдельно
// std::vector<std::wstring> arRefs;
// boost::algorithm::split(arRefs, f, boost::algorithm::is_any_of(L" "), boost::algorithm::token_compress_on);
//
// std::wstring sLink = arRefs[2];
// m_pXmlWriter->WriteNodeBegin( L"w:hyperlink", true );
// int relID = m_context->_docx->RegisterHyperlink(_caller, sLink);
// m_pXmlWriter->WriteAttribute( L"r:id", L"rId"+ FormatUtils::IntToWideString( relID ) );
// m_pXmlWriter->WriteAttribute( L"w:history", 1 );
// m_pXmlWriter->WriteNodeEnd( L"", true, false );
// if (arRefs.size() > 2)
// {
// writeTextElement(arRefs[3].substr(1, arRefs[3].length() - 2), textType);
// }
// m_pXmlWriter->WriteNodeEnd( L"w:hyperlink", false, true );
// _skipRuns = 1;
//}
else if ( bEMBED || (bLINK && !bHYPERLINK)|| bQUOTE)
{
int cpPic = searchNextTextMark(m_document->Text, cpFieldStart, TextMark::Picture);
int cpFieldSep = searchNextTextMark(m_document->Text, cpFieldStart, TextMark::FieldSeparator);
@ -840,19 +861,21 @@ namespace DocFileFormat
else if (TextMark::FieldEndMark == code)
{
if (!_fieldLevels.empty())
{
_fieldLevels.back().bEnd = true;
if (_fieldLevels.back().bBegin == true && !text.empty())
{
if (!text.empty())
{
writeTextElement(text, textType);
text.clear();
}
}
if (_fieldLevels.back().bBegin)
{
_fieldLevels.back().bEnd = true;
XMLTools::XMLElement elem( L"w:fldChar" );
elem.AppendAttribute( L"w:fldCharType", L"end" );
XMLTools::XMLElement elem( L"w:fldChar" );
elem.AppendAttribute( L"w:fldCharType", L"end" );
m_pXmlWriter->WriteString( elem.GetXMLString());
m_pXmlWriter->WriteString( elem.GetXMLString());
}
_fieldLevels.pop_back();
}
@ -1151,20 +1174,7 @@ namespace DocFileFormat
if ( fc >= nMinVal )
{
ret = m_document->AllPapx->find(nMinVal)->second;
//? if (!ret && m_document->AllPapx->size() > 0)
//? {
//? map<int, ParagraphPropertyExceptions*>::iterator it = m_document->AllPapx->end();
//? it--;
//? do
//? {
//? if (it->first < nMinVal && it->second)
//? break;
//? it--;
//? }
//? while(it != m_document->AllPapx->begin());
//?
//? ret = it->second;
//? }
_lastValidPapx = ret;
}
}
@ -1215,8 +1225,8 @@ namespace DocFileFormat
TableInfo tai( papx, m_document->nWordVersion );
//build the table grid
std::vector<short> grid, grid_write;
buildTableGrid( cp, nestingLevel, grid, grid_write );
std::vector<short> grid;
buildTableGrid( cp, nestingLevel, grid);
//find first row end
int fcRowEnd = findRowEndFc( cp, nestingLevel );
@ -1227,7 +1237,7 @@ namespace DocFileFormat
m_pXmlWriter->WriteNodeBegin( L"w:tbl" );
//Convert it
TablePropertiesMapping *tpMapping = new TablePropertiesMapping( m_pXmlWriter, m_document->Styles, &grid, &grid_write );
TablePropertiesMapping *tpMapping = new TablePropertiesMapping( m_pXmlWriter, m_document->Styles, &grid);
row1Tapx.Convert( tpMapping );
@ -1240,7 +1250,7 @@ namespace DocFileFormat
//only convert the cells with the given nesting level
while ( tai.iTap == nestingLevel )
{
cp = writeTableRow( cp, &grid, &grid_write, nestingLevel );
cp = writeTableRow( cp, &grid, nestingLevel );
//?fc = m_document->FindFileCharPos(cp );
fc = m_document->m_PieceTable->FileCharacterPositions->operator []( cp );
papx = findValidPapx( fc );
@ -1253,7 +1263,7 @@ namespace DocFileFormat
//convert until the end of table is reached
while ( tai.fInTable )
{
cp = writeTableRow( cp, &grid, &grid_write, nestingLevel );
cp = writeTableRow( cp, &grid, nestingLevel );
fc = m_document->FindFileCharPos( cp );
papx = findValidPapx( fc );
@ -1268,12 +1278,11 @@ namespace DocFileFormat
}
// Builds a list that contains the width of the several columns of the table.
bool DocumentMapping::buildTableGrid(int initialCp, unsigned int nestingLevel, std::vector<short>& grid, std::vector<short>& grid_write)
bool DocumentMapping::buildTableGrid(int initialCp, unsigned int nestingLevel, std::vector<short>& grid)
{
ParagraphPropertyExceptions* backup = _lastValidPapx;
std::vector<short> boundaries;
std::vector<short> boundaries_all;
std::map<short, short> boundaries;
int cp = initialCp;
int fc = m_document->FindFileCharPos( cp );
@ -1284,53 +1293,66 @@ namespace DocFileFormat
int fcRowEnd = findRowEndFc( cp, cp, nestingLevel );
ParagraphPropertyExceptions* papx_prev = NULL;
short max_boundary = -1;
bool fEndNestingLevel = false;
unsigned int iTap_current = 1;
while ( tai.fInTable )
{
//check all SPRMs of this TAPX
iTap_current = 1;
for ( std::list<SinglePropertyModifier>::iterator iter = papx->grpprl->begin(); iter != papx->grpprl->end(); iter++ )
{
//find the tDef SPRM
DWORD code = iter->OpCode;
switch(iter->OpCode)
{
case sprmTDefTable:
case sprmOldTDefTable:
{
unsigned char itcMac = iter->Arguments[0];
while(boundaries.size() < itcMac + 1)
boundaries.push_back(-0x7fff);
short boundary0 = -0x7fff;
for (unsigned char i = 0; i < itcMac; i++)
case sprmPFInnerTableCell:
case sprmPFInnerTtp:
{
short boundary1 = FormatUtils::BytesToInt16( iter->Arguments, 1 + ( i * 2 ), iter->argumentsSize );
short boundary2 = FormatUtils::BytesToInt16( iter->Arguments, 1 + ( ( i + 1 ) * 2 ), iter->argumentsSize );
fEndNestingLevel = ( iter->Arguments[0] == 1 ) ? (true) : (false);
}break;
if (boundary2 - boundary1 > 1 && boundary1 - boundary0 > 1)
case sprmPItap:
{
iTap_current = FormatUtils::BytesToUInt32( iter->Arguments, 0, iter->argumentsSize );
}break;
}
}
if (nestingLevel == iTap_current)
{
for ( std::list<SinglePropertyModifier>::iterator iter = papx->grpprl->begin(); iter != papx->grpprl->end(); iter++ )
{
//find the tDef SPRM
DWORD code = iter->OpCode;
switch(iter->OpCode)
{
case sprmTDefTable:
case sprmOldTDefTable:
{
if ( boundaries[i] == -0x7fff || boundaries[i+1] == -0x7fff)
{
boundaries[i] = boundary1;
boundaries[i+1] = boundary2;
}
}
if ( find( boundaries_all.begin(), boundaries_all.end(), boundary1 ) == boundaries_all.end() )
unsigned char itcMac = iter->Arguments[0];
short boundary1, boundary2;
for (unsigned char i = 0; i < itcMac; i++)
{
boundaries_all.push_back( boundary1 );
}
boundary1 = FormatUtils::BytesToInt16( iter->Arguments + 1, i * 2 , iter->argumentsSize );
boundary2 = FormatUtils::BytesToInt16( iter->Arguments + 1, ( i + 1 ) * 2, iter->argumentsSize );
if ( find( boundaries_all.begin(), boundaries_all.end(), boundary2 ) == boundaries_all.end() )
{
boundaries_all.push_back( boundary2 );
}
boundary0 = boundary1;
AddBoundary(boundary1, boundary2, boundaries);
}
if (max_boundary < boundary2)
max_boundary = boundary2;
AddBoundary(boundary2, max_boundary, boundaries);
}break;
}
}
}
if (nestingLevel > 1 && fEndNestingLevel && !boundaries.empty())
break;
//get the next papx
papx = findValidPapx( fcRowEnd );
tai = TableInfo( papx, m_document->nWordVersion );
@ -1339,23 +1361,14 @@ namespace DocFileFormat
if (papx_prev && papx_prev == papx )
break;//file(12).doc
papx_prev = papx;
}
//build the grid based on the boundaries
sort( boundaries_all.begin(), boundaries_all.end() );
}
if ( !boundaries.empty() )
{
for ( size_t i = 0; i < ( boundaries.size() - 1 ); i++ )
for ( std::map<short, short>::iterator it = boundaries.begin(); it != boundaries.end(); ++it)
{
grid_write.push_back( boundaries[i + 1] - boundaries[i] );
}
}
if ( !boundaries_all.empty() )
{
for ( size_t i = 0; i < ( boundaries_all.size() - 1 ); i++ )
{
grid.push_back( boundaries_all[i + 1] - boundaries_all[i] );
grid.push_back( it->second );
}
}
_lastValidPapx = backup;
@ -1363,6 +1376,40 @@ namespace DocFileFormat
return true;
}
void DocumentMapping::AddBoundary(short boundary1, short boundary2, std::map<short, short> &boundaries)
{
if (boundary2 - boundary1 < 3)
return;
std::map<short, short>::iterator pFind = boundaries.find(boundary1);
while(true)
{
if (pFind == boundaries.end())
{
boundaries.insert(std::make_pair(boundary1, boundary2 - boundary1));
break;
}
else if (pFind->second != boundary2 - boundary1)
{
if (pFind->second > boundary2 - boundary1)
{
short new_size = boundary2 - boundary1;
boundary1 = boundary2;
boundary2 = pFind->second + pFind->first;
pFind->second = new_size;
}
else
{
boundary1 = pFind->second + pFind->first;
}
pFind = boundaries.find(boundary1);
}
else
break;
}
}
// Finds the FC of the next row end mark.
int DocumentMapping::findRowEndFc(int initialCp, int& rowEndCp, unsigned int nestingLevel )
{
@ -1480,7 +1527,7 @@ namespace DocFileFormat
}
/// Writes the table row that starts at the given cp value and ends at the next row end mark
int DocumentMapping::writeTableRow(int initialCp, std::vector<short>* grid, std::vector<short>* grid_write, unsigned int nestingLevel)
int DocumentMapping::writeTableRow(int initialCp, std::vector<short>* grid, unsigned int nestingLevel)
{
int cp = initialCp;
int fc = m_document->FindFileCharPos( cp );
@ -1510,7 +1557,7 @@ namespace DocFileFormat
//Write until the first "inner trailer paragraph" is reached
while ( !( ( m_document->Text->at( cp ) == TextMark::ParagraphEnd ) && ( tai.fInnerTtp ) ) && tai.fInTable )
{
cp = writeTableCell( cp, &tapx, grid, grid_write, gridIndex, cellIndex, nestingLevel );
cp = writeTableCell( cp, &tapx, grid, gridIndex, cellIndex, nestingLevel );
cellIndex++;
//each cell has it's own PAPX
@ -1527,7 +1574,7 @@ namespace DocFileFormat
while ( !( ( m_document->Text->at( cp ) == TextMark::CellOrRowMark ) && ( tai.fTtp ) )
&& tai.fInTable )
{
cp = writeTableCell( cp, &tapx, grid, grid_write, gridIndex, cellIndex, nestingLevel );
cp = writeTableCell( cp, &tapx, grid, gridIndex, cellIndex, nestingLevel );
cellIndex++;
//each cell has it's own PAPX
@ -1550,15 +1597,13 @@ namespace DocFileFormat
}
/// Writes the table cell that starts at the given cp value and ends at the next cell end mark
int DocumentMapping::writeTableCell(int initialCp, TablePropertyExceptions* tapx, std::vector<short>* grid, std::vector<short>* grid_write, int& gridIndex, int cellIndex, unsigned int nestingLevel )
int DocumentMapping::writeTableCell(int initialCp, TablePropertyExceptions* tapx, std::vector<short>* grid, int& gridIndex, int cellIndex, unsigned int nestingLevel )
{
int cp = initialCp;
int cpCellEnd = findCellEndCp( initialCp, nestingLevel );
//start w:tc
m_pXmlWriter->WriteNodeBegin( L"w:tc" );
TableCellPropertiesMapping* tcpMapping = new TableCellPropertiesMapping( m_pXmlWriter, grid, grid_write, gridIndex, cellIndex );
XMLTools::CStringXmlWriter writerTcPr;
TableCellPropertiesMapping* tcpMapping = new TableCellPropertiesMapping( &writerTcPr, grid, gridIndex, cellIndex, nestingLevel );
if ( tapx != NULL )
{
@ -1567,8 +1612,19 @@ namespace DocFileFormat
gridIndex = gridIndex + tcpMapping->GetGridSpan();
bool bCoverCell = tcpMapping->IsCoverCell();
RELEASEOBJECT( tcpMapping );
if (bCoverCell)
{
return cpCellEnd;
}
//start w:tc
m_pXmlWriter->WriteNodeBegin( L"w:tc" );
m_pXmlWriter->WriteString(writerTcPr.GetXmlString());
//write the paragraphs of the cell
while ( cp < cpCellEnd )
{

View File

@ -110,15 +110,15 @@ namespace DocFileFormat
// Writes the table starts at the given cp value
int writeTable ( int initialCp, unsigned int nestingLevel );
// Builds a list that contains the width of the several columns of the table.
bool buildTableGrid( int initialCp, unsigned int nestingLevel, std::vector<short>& grid, std::vector<short>& grid_write );
bool buildTableGrid( int initialCp, unsigned int nestingLevel, std::vector<short>& grid);
// Finds the FC of the next row end mark.
int findRowEndFc ( int initialCp, int& rowEndCp, unsigned int nestingLevel );
// Finds the FC of the next row end mark.
int findRowEndFc ( int initialCp, unsigned int nestingLevel );
// Writes the table row that starts at the given cp value and ends at the next row end mark
int writeTableRow ( int initialCp, std::vector<short>* grid, std::vector<short>* grid_write, unsigned int nestingLevel );
int writeTableRow ( int initialCp, std::vector<short>* grid, unsigned int nestingLevel );
// Writes the table cell that starts at the given cp value and ends at the next cell end mark
int writeTableCell ( int initialCp, TablePropertyExceptions* tapx, std::vector<short>* grid, std::vector<short>* grid_write, int& gridIndex, int cellIndex, unsigned int nestingLevel );
int writeTableCell ( int initialCp, TablePropertyExceptions* tapx, std::vector<short>* grid, int& gridIndex, int cellIndex, unsigned int nestingLevel );
int findCellEndCp ( int initialCp, unsigned int nestingLevel );
bool writeBookmarks ( int cp );
@ -135,6 +135,8 @@ namespace DocFileFormat
// Searches the given vector for the next FieldEnd character.
int searchNextTextMark( std::vector<wchar_t>* chars, int initialCp, wchar_t mark );
Symbol getSymbol ( const CharacterPropertyExceptions* chpx );
void AddBoundary(short boundary1, short boundary2, std::map<short, short> &boundaries);
//----------------------------------------------------------------------------------------------------------------------
bool m_bInternalXmlWriter;

View File

@ -53,7 +53,7 @@ namespace DocFileFormat
/*========================================================================================================*/
FormattedDiskPageCHPX::FormattedDiskPageCHPX( POLE::Stream* wordStream, int offset, int nWordVersion ):
FormattedDiskPage(), rgb(NULL), grpchpxSize(NULL), grpchpx(NULL)
FormattedDiskPage(), rgb(NULL), grpchpxSize(0), grpchpx(NULL)
{
Type = Character;
WordStream = wordStream;

View File

@ -128,21 +128,22 @@ namespace DocFileFormat
if ( bx.wordOffset != 0 )
{
unsigned char padbyte = 0;
unsigned char cw = bytes[bx.wordOffset * 2] * 2;
unsigned char cw = bytes[bx.wordOffset * 2];
//if that unsigned char is zero, it's a pad unsigned char, and the word count is the following unsigned char
if ( cw == 0 )
{
padbyte = 1;
cw = bytes[bx.wordOffset * 2 + 1] * 2;
cw = bytes[bx.wordOffset * 2 + 1];
}
if ( cw != 0 )
{
int sz = cw * 2;
//read the bytes for papx
unsigned char* papx = new unsigned char[cw];
memcpy( papx, ( bytes + (bx.wordOffset * 2) + padbyte + 1 ), cw );
unsigned char* papx = new unsigned char[sz];
memcpy( papx, ( bytes + (bx.wordOffset * 2) + padbyte + 1 ), sz );
//parse PAPX and fill grppapx
grppapx[i] = new ParagraphPropertyExceptions( papx, cw, dataStream, nWordVersion );
grppapx[i] = new ParagraphPropertyExceptions( papx, sz, dataStream, nWordVersion );
RELEASEARRAYOBJECTS( papx );
}

View File

@ -473,7 +473,10 @@ namespace DocFileFormat
return AddPart( mapping, L"word", fileName, VMLPictureMapping::GetContentType( blipType ), OpenXmlRelationshipTypes::Image );
}
int OpenXmlPackage::RegisterHyperlink(const IMapping* mapping, const std::wstring& link)
{
return AddPart(mapping, L"", link, L"", OpenXmlRelationshipTypes::Hyperlink, L"External");
}
int OpenXmlPackage::RegisterOLEObject(const IMapping* mapping, const std::wstring& objectType)
{
std::wstring fileName = ( std::wstring( L"embeddings/oleObject" ) + FormatUtils::IntToWideString( ++_oleCounter ) + OleObjectMapping::GetTargetExt(objectType));

View File

@ -177,6 +177,7 @@ namespace DocFileFormat
int RegisterEndnotes();
int RegisterComments();
int RegisterImage ( const IMapping* mapping, Global::BlipType blipType );
int RegisterHyperlink ( const IMapping* mapping, const std::wstring& link);
int RegisterOLEObject ( const IMapping* mapping, const std::wstring& objectType );
int RegisterPackage ( const IMapping* mapping, const std::wstring& objectType);
int RegisterExternalOLEObject( const IMapping* mapping, const std::wstring& objectType, const std::wstring& uri );

View File

@ -34,8 +34,8 @@
namespace DocFileFormat
{
std::map<unsigned char, std::wstring> PropertiesMapping::brcTypeMap;
OfficeCriticalSection PropertiesMapping::brcTypeMapLock;
std::map<unsigned char, std::wstring> PropertiesMapping::brcTypeMap;
NSCriticalSection::CRITICAL_SECTION_SMART PropertiesMapping::brcTypeMapLock;
void PropertiesMapping::init()
{

View File

@ -39,8 +39,7 @@
#include "ShadingDescriptor.h"
#include "SinglePropertyModifier.h"
#include "../../OfficeUtils/src/ASCOfficeCriticalSection.h" //for linux make inside
#include "../../DesktopEditor/graphics/TemporaryCS.h"
namespace DocFileFormat
{
@ -75,7 +74,7 @@ namespace DocFileFormat
XMLTools::CStringXmlWriter* m_pXmlWriter;
static std::map<unsigned char, std::wstring> brcTypeMap;
static OfficeCriticalSection brcTypeMapLock;
static std::map<unsigned char, std::wstring> brcTypeMap;
static NSCriticalSection::CRITICAL_SECTION_SMART brcTypeMapLock;
};
}

View File

@ -60,7 +60,7 @@ namespace DocFileFormat
}
void PropertyExceptions::ReadExceptions(unsigned char* bytes, int size, int nWordVersion)
{
RELEASEOBJECT( grpprl );
RELEASEOBJECT( grpprl );
grpprl = new std::list<SinglePropertyModifier>();

View File

@ -177,8 +177,6 @@ namespace DocFileFormat
}
}
private:
unsigned char numberOfColumns;
/// An array of 16-bit signed integer that specifies horizontal distance in twips.

View File

@ -35,8 +35,8 @@
namespace DocFileFormat
{
std::map<std::wstring, std::wstring> StyleSheetMapping::m_mapStyleId;
OfficeCriticalSection StyleSheetMapping::m_mapStyleIdLock;
std::map<std::wstring, std::wstring> StyleSheetMapping::m_mapStyleId;
NSCriticalSection::CRITICAL_SECTION_SMART StyleSheetMapping::m_mapStyleIdLock;
StyleSheetMapping::StyleSheetMapping( ConversionContext* ctx ) : AbstractOpenXmlMapping( new XMLTools::CStringXmlWriter() )
{
@ -171,7 +171,7 @@ namespace DocFileFormat
if ( (*iter)->tapx != NULL )
{
std::vector<short> tableGrid;
TablePropertiesMapping* tpMapping = new TablePropertiesMapping (m_pXmlWriter, sheet, &tableGrid, NULL, false);
TablePropertiesMapping* tpMapping = new TablePropertiesMapping (m_pXmlWriter, sheet, &tableGrid, false);
(*iter)->tapx->Convert( tpMapping );
RELEASEOBJECT( tpMapping );
}

View File

@ -55,7 +55,7 @@ namespace DocFileFormat
/// Generates a style id for custom style names or returns the build-in identifier for build-in styles.
static std::wstring MakeStyleId( StyleSheetDescription* std );
static std::map<std::wstring, std::wstring> m_mapStyleId;
static OfficeCriticalSection m_mapStyleIdLock;
static NSCriticalSection::CRITICAL_SECTION_SMART m_mapStyleIdLock;
virtual ~StyleSheetMapping();
private:
@ -67,4 +67,4 @@ namespace DocFileFormat
/// Writes the "NormalTable" default style
void writeNormalTableStyle();
};
}
}

View File

@ -35,9 +35,11 @@
namespace DocFileFormat
{
TableCellPropertiesMapping::TableCellPropertiesMapping (XMLTools::CStringXmlWriter* pWriter, const std::vector<short>* grid, const std::vector<short>* grid_write, int gridIndex, int cellIndex) :
TableCellPropertiesMapping::TableCellPropertiesMapping (XMLTools::CStringXmlWriter* pWriter,
const std::vector<short>* grid, int gridIndex, int cellIndex, unsigned int depth) :
PropertiesMapping(pWriter)
{
_depth = depth;
_width = 0;
_gridIndex = gridIndex;
@ -75,9 +77,25 @@ namespace DocFileFormat
TablePropertyExceptions* tapx = static_cast<TablePropertyExceptions*>(visited);
int nComputedCellWidth = 0;
_gridSpan = 1;
_gridSpan = 0;
_bCoverCell = false;
unsigned int iTap_current = 1;
for ( std::list<SinglePropertyModifier>::iterator iter = tapx->grpprl->begin(); iter != tapx->grpprl->end(); iter++ )
{
DWORD code = iter->OpCode;
switch(iter->OpCode)
{
case sprmPItap:
{
iTap_current = FormatUtils::BytesToUInt32( iter->Arguments, 0, iter->argumentsSize );
}break;
}
}
std::list<SinglePropertyModifier>::const_reverse_iterator rend = tapx->grpprl->rend();
for (std::list<SinglePropertyModifier>::const_reverse_iterator iter = tapx->grpprl->rbegin(); iter != rend; ++iter)
{
switch (iter->OpCode)
@ -113,16 +131,39 @@ namespace DocFileFormat
{
appendValueElement( _tcPr, L"noWrap", L"", true );
}
int ind = (std::min)(_cellIndex, (int)tdef.rgTc80.size() - 1);
int ind1 = ind;
while (ind1 < tdef.rgdxaCenter.size() - 1)
//int ind = (std::min)(_cellIndex, (int)tdef.rgTc80.size() - 1);
//int ind1 = ind;
//while (ind1 < tdef.rgdxaCenter.size() - 1)
//{
// int sz = tdef.rgdxaCenter[ ind1 + 1] - tdef.rgdxaCenter[ ind1 ] ;
// if (sz > 1)
// break;
// ind1++;
//}
if (tdef.rgTc80[_cellIndex].horzMerge == 1)
{
int sz = tdef.rgdxaCenter[ ind1 + 1] - tdef.rgdxaCenter[ ind1 ] ;
if (sz > 1)
break;
ind1++;
for (size_t i = _cellIndex; i < tdef.rgTc80.size(); i++)
{
if (tdef.rgTc80[i].horzMerge < 1)
break;
nComputedCellWidth += tdef.rgdxaCenter[ i + 1] - tdef.rgdxaCenter[ i ] ;
_gridSpan++;
}
}
else if (tdef.rgTc80[_cellIndex].horzMerge == 2)
{//skip cover cell
_gridSpan = 1;
nComputedCellWidth = 0;
_bCoverCell = true;
}
else
{
_gridSpan = 1;
nComputedCellWidth += tdef.rgdxaCenter[ _cellIndex + 1] - tdef.rgdxaCenter[ _cellIndex ] ;
}
nComputedCellWidth = tdef.rgdxaCenter[ ind1 + 1] - tdef.rgdxaCenter[ ind ] ;
if (!IsTableBordersDefined(tapx->grpprl))
{
@ -141,6 +182,10 @@ namespace DocFileFormat
}
break;
case sprmTDxaCol:
{
}break;
case sprmTCellPadding:
{
unsigned char first = iter->Arguments[0];
@ -288,23 +333,24 @@ namespace DocFileFormat
_tcPr->AppendChild( tcW );
if ( ( _gridIndex < (int)_grid->size() ) && ( nComputedCellWidth > _grid->at( _gridIndex ) ) )
//if ( ( _gridIndex < (int)_grid->size() ) && ( nComputedCellWidth > _grid->at( _gridIndex ) ) )
//{
// //check the number of merged cells
// int w = _grid->at( _gridIndex );
// for ( size_t i = _gridIndex + 1; i < _grid->size(); i++ )
// {
// _gridSpan++;
// w += _grid->at( i );
// if ( w >= nComputedCellWidth )
// {
// break;
// }
// }
if (_gridSpan > 1)
{
//check the number of merged cells
int w = _grid->at( _gridIndex );
for ( size_t i = _gridIndex + 1; i < _grid->size(); i++ )
{
_gridSpan++;
w += _grid->at( i );
if ( w >= nComputedCellWidth )
{
break;
}
}
appendValueElement( _tcPr, L"gridSpan", FormatUtils::IntToWideString( _gridSpan ), true );
}

View File

@ -58,7 +58,7 @@ namespace DocFileFormat
public:
virtual ~TableCellPropertiesMapping();
TableCellPropertiesMapping (XMLTools::CStringXmlWriter* pWriter, const std::vector<short>* grid, const std::vector<short>* grid_write, int gridIndex, int cellIndex);
TableCellPropertiesMapping (XMLTools::CStringXmlWriter* pWriter, const std::vector<short>* grid, int gridIndex, int cellIndex, unsigned int depth);
virtual void Apply( IVisitable* visited );
inline int GetGridSpan() const
@ -66,6 +66,11 @@ namespace DocFileFormat
return _gridSpan;
}
inline bool IsCoverCell() const
{
return _bCoverCell;
}
private:
void apppendCellShading (unsigned char* sprmArg, int size, int cellIndex);
@ -79,12 +84,13 @@ namespace DocFileFormat
XMLTools::XMLElement* _tcMar;
XMLTools::XMLElement* _tcBorders;
const std::vector<short>* _grid;
std::vector<short> _tGrid;
const std::vector<short>* _grid;
std::vector<short> _tGrid;
short _width;
Global::CellWidthType _ftsWidth;
TC80 _tcDef;
short _width;
Global::CellWidthType _ftsWidth;
TC80 _tcDef;
unsigned int _depth;
BorderCode* _brcTop;
BorderCode* _brcLeft;
@ -92,5 +98,6 @@ namespace DocFileFormat
BorderCode* _brcBottom;
int _gridSpan;
bool _bCoverCell;
};
}

View File

@ -106,7 +106,7 @@ namespace DocFileFormat
cellElements.clear();
}
void TableCell::Convert(IMapping* mapping, TablePropertyExceptions* tapx, const std::vector<short>* grid, const std::vector<short>* grid_write, int& gridIndex, int nCellIndex)
void TableCell::Convert(IMapping* mapping, TablePropertyExceptions* tapx, const std::vector<short>* grid, int& gridIndex, int nCellIndex)
{
if (NULL != mapping)
{
@ -118,12 +118,10 @@ namespace DocFileFormat
//find cell end
int cpCellEnd = documentMapping->findCellEndCp(cp, depth);
//start w:tc
documentMapping->GetXMLWriter()->WriteNodeBegin( L"w:tc" );
//convert the properties
TableCellPropertiesMapping tcpMapping(documentMapping->GetXMLWriter(), grid, grid_write, gridIndex, nCellIndex);
XMLTools::CStringXmlWriter writerTcPr;
TableCellPropertiesMapping tcpMapping(&writerTcPr, grid, gridIndex, nCellIndex, depth);
if ( tapx != NULL )
{
@ -131,6 +129,15 @@ namespace DocFileFormat
}
gridIndex += tcpMapping.GetGridSpan();
if (tcpMapping.IsCoverCell())
{
return;
}
//start w:tc
documentMapping->GetXMLWriter()->WriteNodeBegin( L"w:tc" );
documentMapping->GetXMLWriter()->WriteString(writerTcPr.GetXmlString());
documentMapping->_lastValidPapx = papxBackup;
documentMapping->_lastValidSepx = sepxBackup;
@ -193,7 +200,7 @@ namespace DocFileFormat
cells.clear();
}
void TableRow::Convert(IMapping* mapping, const std::vector<short>* grid, const std::vector<short>* grid_write)
void TableRow::Convert(IMapping* mapping, const std::vector<short>* grid)
{
if ( mapping != NULL )
{
@ -234,7 +241,7 @@ namespace DocFileFormat
{
for ( std::list<TableCell>::iterator iter = cells.begin(); iter != cells.end(); iter++ )
{
iter->Convert( mapping, &tapx, grid, grid_write, gridIndex, nCellIndex++);
iter->Convert( mapping, &tapx, grid, gridIndex, nCellIndex++);
}
}
@ -516,8 +523,8 @@ namespace DocFileFormat
SectionPropertyExceptions* sepxBackup = documentMapping->_lastValidSepx;
//build the table grid
std::vector<short> grid, grid_write;
documentMapping->buildTableGrid( cpStart, depth, grid, grid_write );
std::vector<short> grid;
documentMapping->buildTableGrid( cpStart, depth, grid);
//find first row end
int fcRowEnd = documentMapping->findRowEndFc( cpStart, depth );
@ -530,7 +537,7 @@ namespace DocFileFormat
documentMapping->GetXMLWriter()->WriteNodeBegin( L"w:tbl" );
//Convert it
TablePropertiesMapping tpMapping( documentMapping->GetXMLWriter(), documentMapping->m_document->Styles, &grid, &grid_write );
TablePropertiesMapping tpMapping( documentMapping->GetXMLWriter(), documentMapping->m_document->Styles, &grid);
row1Tapx.Convert( &tpMapping );
@ -539,7 +546,7 @@ namespace DocFileFormat
for ( std::list<TableRow>::iterator iter = rows.begin(); iter != rows.end(); iter++ )
{
iter->Convert( mapping, &grid, &grid_write );
iter->Convert( mapping, &grid );
}
//close w:tbl

View File

@ -58,7 +58,7 @@ namespace DocFileFormat
void AddItem( const ITableCellElement& _tableCellElement );
bool IsEmpty() const;
void Clear();
void Convert( IMapping* mapping, TablePropertyExceptions* tapx, const std::vector<short>* grid, const std::vector<short>* grid_write, int& gridIndex, int cellIndex );
void Convert( IMapping* mapping, TablePropertyExceptions* tapx, const std::vector<short>* grid, int& gridIndex, int cellIndex );
~TableCell();
private:
@ -81,7 +81,7 @@ namespace DocFileFormat
void AddCell( const TableCell& _tableCell );
bool IsEmpty() const;
void Clear();
void Convert( IMapping* mapping, const std::vector<short>* grid, const std::vector<short>* grid_write );
void Convert( IMapping* mapping, const std::vector<short>* grid);
~TableRow();
private:

View File

@ -34,8 +34,8 @@
namespace DocFileFormat
{
TablePropertiesMapping::TablePropertiesMapping (XMLTools::CStringXmlWriter* pWriter, StyleSheet* styles, std::vector<short>* grid, std::vector<short>* grid_write, bool isTableStyleNeeded ):
PropertiesMapping(pWriter), _tblPr(NULL), _tblGrid(NULL), _tblBorders(NULL), _grid(grid), _grid_write(grid_write),
TablePropertiesMapping::TablePropertiesMapping (XMLTools::CStringXmlWriter* pWriter, StyleSheet* styles, std::vector<short>* grid, bool isTableStyleNeeded ):
PropertiesMapping(pWriter), _tblPr(NULL), _tblGrid(NULL), _tblBorders(NULL), _grid(grid),
brcLeft(NULL), brcTop(NULL), brcBottom(NULL), brcRight(NULL), brcHorz(NULL), brcVert(NULL), _styles(styles),
_isTableStyleNeeded(isTableStyleNeeded)
{
@ -511,7 +511,7 @@ namespace DocFileFormat
bWriteGridCol = true;
else
{
for ( size_t i = 0, nSize = _grid_write->size(); i < nSize; i++ )
for ( size_t i = 0, nSize = _grid->size(); i < nSize; i++ )
{
if(_grid->at(i) % DocFileFormat::gc_nZeroWidth != 0)
{
@ -522,10 +522,10 @@ namespace DocFileFormat
}
if(true == bWriteGridCol)
{
for ( size_t i = 0; i < _grid_write->size(); i++ )
for ( size_t i = 0; i < _grid->size(); i++ )
{
XMLTools::XMLElement gridCol( L"w:gridCol");
XMLTools::XMLAttribute gridColW( L"w:w", FormatUtils::IntToWideString( _grid_write->at( i ) ) );
XMLTools::XMLAttribute gridColW( L"w:w", FormatUtils::IntToWideString( _grid->at( i ) ) );
gridCol.AppendAttribute( gridColW );
_tblGrid->AppendChild( gridCol );
}

View File

@ -71,7 +71,7 @@ namespace DocFileFormat
class TablePropertiesMapping: public PropertiesMapping, public IMapping
{
public:
TablePropertiesMapping( XMLTools::CStringXmlWriter* writer, StyleSheet* styles, std::vector<short>* grid, std::vector<short>* grid_write, bool isTableStyleNeeded = true );
TablePropertiesMapping( XMLTools::CStringXmlWriter* writer, StyleSheet* styles, std::vector<short>* grid, bool isTableStyleNeeded = true );
virtual ~TablePropertiesMapping();
void Apply( IVisitable* visited );
@ -83,7 +83,6 @@ namespace DocFileFormat
StyleSheet* _styles;
std::vector<short>* _grid;
std::vector<short>* _grid_write;
BorderCode* brcLeft;
BorderCode* brcTop;

View File

@ -39,6 +39,7 @@ namespace DocFileFormat
{
friend class Converter;
friend class MainDocumentMapping;
friend class DocumentMapping;
friend class CommandTableMapping;
friend class StyleSheetMapping;
friend class NumberingMapping;

View File

@ -21,13 +21,7 @@ include($$PWD/../../../Common/3dParty/boost/boost.pri)
DEFINES += UNICODE \
_UNICODE \
_USE_LIBXML2_READER_ \
LIBXML_READER_ENABLED \
DONT_WRITE_EMBEDDED_FONTS \
INCLUDEPATH += \
../../../DesktopEditor/freetype-2.5.2/include \
../../../DesktopEditor/xml/libxml2/include
DONT_WRITE_EMBEDDED_FONTS
core_mac {
#QMAKE_MAC_SDK = macosx10.11

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"

View File

@ -7,66 +7,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocFormatLib", "..\DocForma
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D} = {77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\..\DesktopEditor\graphics\graphics_vs2005.vcproj", "{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}"
ProjectSection(ProjectDependencies) = postProject
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeUtilsLib", "..\..\OfficeUtils\win32\OfficeUtilsLib.vcproj", "{F8274B05-168E-4D6E-B843-AA7510725363}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raster", "..\..\DesktopEditor\raster\raster_vs2005.vcproj", "{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}"
ProjectSection(ProjectDependencies) = postProject
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1} = {EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cximage", "..\..\DesktopEditor\cximage\CxImage\cximage_vs2005.vcproj", "{BC52A07C-A797-423D-8C4F-8678805BBB36}"
ProjectSection(ProjectDependencies) = postProject
{818753F2-DBB9-4D3B-898A-A604309BE470} = {818753F2-DBB9-4D3B-898A-A604309BE470}
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239} = {764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jasper", "..\..\DesktopEditor\cximage\jasper\jasper_vs2005.vcproj", "{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig", "..\..\DesktopEditor\cximage\jbig\jbig_vs2005.vcproj", "{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "..\..\DesktopEditor\cximage\jpeg\Jpeg_vs2005.vcproj", "{818753F2-DBB9-4D3B-898A-A604309BE470}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpsd", "..\..\DesktopEditor\cximage\libpsd\libpsd_vs2005.vcproj", "{9A037A69-D1DF-4505-AB2A-6CB3641C476E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mng", "..\..\DesktopEditor\cximage\mng\mng_vs2005.vcproj", "{40A69F40-063E-43FD-8543-455495D8733E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "png", "..\..\DesktopEditor\cximage\png\png_vs2005.vcproj", "{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdcr", "..\..\DesktopEditor\cximage\raw\libdcr_vs2005.vcproj", "{DF861D33-9BC1-418C-82B1-581F590FE169}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\DesktopEditor\cximage\tiff\Tiff_vs2005.vcproj", "{0588563C-F05C-428C-B21A-DD74756628B3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig2", "..\..\DesktopEditor\raster\JBig2\win32\jbig2.vcproj", "{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XlsFormat", "..\..\ASCOfficeXlsFile2\source\win32\XlsFormat.vcproj", "{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocFormatTest", "DocFormatTest.vcproj", "{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}"
ProjectSection(ProjectDependencies) = postProject
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
{36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302}
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF} = {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C} = {C27E9A9F-3A17-4482-9C5F-BF15C01E747C}
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
{C5371405-338F-4B70-83BD-2A5CDF64F383} = {C5371405-338F-4B70-83BD-2A5CDF64F383}
EndProjectSection
EndProject
@ -78,17 +26,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cryptlib", "..\..\Common\3d
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPTXFormat", "..\..\ASCOfficePPTXFile\PPTXLib\PPTXFormat.vcproj", "{36636678-AE25-4BE6-9A34-2561D1BCF302}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "agg2d", "..\..\DesktopEditor\agg-2.4\agg_vs2005.vcproj", "{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "font_engine", "..\..\DesktopEditor\fontengine\font_engine_vs2005.vcproj", "{C739151F-5384-41DF-A1A6-F089E2C1AD56}"
ProjectSection(ProjectDependencies) = postProject
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "..\..\DesktopEditor\freetype-2.5.2\builds\windows\vc2005\freetype.vcproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml2", "..\..\DesktopEditor\xml\build\vs2005\libxml2.vcproj", "{21663823-DE45-479B-91D0-B4FEF4916EF0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -105,110 +42,6 @@ Global
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Release|Win32.Build.0 = Release|Win32
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Release|x64.ActiveCfg = Release|x64
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Release|x64.Build.0 = Release|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|Win32.ActiveCfg = Debug|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|Win32.Build.0 = Debug|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|x64.ActiveCfg = Debug|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|x64.Build.0 = Debug|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|Win32.ActiveCfg = Release|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|Win32.Build.0 = Release|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|x64.ActiveCfg = Release|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|x64.Build.0 = Release|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|Win32.ActiveCfg = Debug|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|Win32.Build.0 = Debug|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|x64.ActiveCfg = Debug|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|x64.Build.0 = Debug|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|Win32.ActiveCfg = Release|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|Win32.Build.0 = Release|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|x64.ActiveCfg = Release|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|x64.Build.0 = Release|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|Win32.ActiveCfg = Debug|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|Win32.Build.0 = Debug|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|x64.ActiveCfg = Debug|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|x64.Build.0 = Debug|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|Win32.ActiveCfg = Release|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|Win32.Build.0 = Release|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|x64.ActiveCfg = Release|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|x64.Build.0 = Release|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|Win32.ActiveCfg = Debug|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|Win32.Build.0 = Debug|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|x64.ActiveCfg = Debug|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|x64.Build.0 = Debug|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|Win32.ActiveCfg = Release|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|Win32.Build.0 = Release|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|x64.ActiveCfg = Release|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|x64.Build.0 = Release|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|Win32.ActiveCfg = Debug|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|Win32.Build.0 = Debug|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|x64.ActiveCfg = Debug|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|x64.Build.0 = Debug|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|Win32.ActiveCfg = Release|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|Win32.Build.0 = Release|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|x64.ActiveCfg = Release|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|x64.Build.0 = Release|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|Win32.ActiveCfg = Debug|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|Win32.Build.0 = Debug|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|x64.ActiveCfg = Debug|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|x64.Build.0 = Debug|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|Win32.ActiveCfg = Release|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|Win32.Build.0 = Release|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|x64.ActiveCfg = Release|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|x64.Build.0 = Release|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|Win32.ActiveCfg = Debug|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|Win32.Build.0 = Debug|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|x64.ActiveCfg = Debug|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|x64.Build.0 = Debug|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|Win32.ActiveCfg = Release|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|Win32.Build.0 = Release|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|x64.ActiveCfg = Release|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|x64.Build.0 = Release|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|Win32.ActiveCfg = Debug|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|Win32.Build.0 = Debug|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|x64.ActiveCfg = Debug|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|x64.Build.0 = Debug|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|Win32.ActiveCfg = Release|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|Win32.Build.0 = Release|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|x64.ActiveCfg = Release|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|x64.Build.0 = Release|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|Win32.ActiveCfg = Debug|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|Win32.Build.0 = Debug|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|x64.ActiveCfg = Debug|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|x64.Build.0 = Debug|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Release|Win32.ActiveCfg = Release|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Release|Win32.Build.0 = Release|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Release|x64.ActiveCfg = Release|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Release|x64.Build.0 = Release|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|Win32.ActiveCfg = Debug|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|Win32.Build.0 = Debug|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|x64.ActiveCfg = Debug|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|x64.Build.0 = Debug|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|Win32.ActiveCfg = Release|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|Win32.Build.0 = Release|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|x64.ActiveCfg = Release|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|x64.Build.0 = Release|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|Win32.ActiveCfg = Debug|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|Win32.Build.0 = Debug|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|x64.ActiveCfg = Debug|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|x64.Build.0 = Debug|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|Win32.ActiveCfg = Release|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|Win32.Build.0 = Release|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|x64.ActiveCfg = Release|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|x64.Build.0 = Release|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|Win32.ActiveCfg = Debug|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|Win32.Build.0 = Debug|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|x64.ActiveCfg = Debug|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|x64.Build.0 = Debug|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|Win32.ActiveCfg = Release|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|Win32.Build.0 = Release|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|x64.ActiveCfg = Release|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|x64.Build.0 = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|Win32.ActiveCfg = Debug|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|Win32.Build.0 = Debug|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|x64.ActiveCfg = Debug|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|x64.Build.0 = Debug|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|Win32.ActiveCfg = Release|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|Win32.Build.0 = Release|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|x64.ActiveCfg = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|x64.Build.0 = Release|x64
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.Debug|Win32.ActiveCfg = Debug|Win32
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.Debug|Win32.Build.0 = Debug|Win32
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.Debug|x64.ActiveCfg = Debug|x64
@ -255,38 +88,6 @@ Global
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|Win32.Build.0 = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|x64.ActiveCfg = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|x64.Build.0 = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|Win32.ActiveCfg = Debug|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|Win32.Build.0 = Debug|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|x64.ActiveCfg = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|x64.Build.0 = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|Win32.ActiveCfg = Release|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|Win32.Build.0 = Release|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|x64.ActiveCfg = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|x64.Build.0 = Release|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|Win32.ActiveCfg = Debug|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|Win32.Build.0 = Debug|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|x64.ActiveCfg = Debug|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|x64.Build.0 = Debug|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|Win32.ActiveCfg = Release|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|Win32.Build.0 = Release|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|x64.ActiveCfg = Release|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|x64.Build.0 = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.ActiveCfg = Debug|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.Build.0 = Debug|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.ActiveCfg = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.Build.0 = Release|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.ActiveCfg = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.Build.0 = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|x64.ActiveCfg = Debug|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|x64.Build.0 = Debug|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.ActiveCfg = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.Build.0 = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|x64.ActiveCfg = Release|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -46,6 +46,16 @@
#if defined(_WIN64)
#pragma comment(lib, "../../build/bin/icu/win_64/icuuc.lib")
#elif defined (_WIN32)
#if defined(_DEBUG)
#pragma comment(lib, "../../build/lib/win_32/DEBUG/graphics.lib")
#pragma comment(lib, "../../build/lib/win_32/DEBUG/kernel.lib")
#pragma comment(lib, "../../build/lib/win_32/DEBUG/UnicodeConverter.lib")
#else
#pragma comment(lib, "../../build/lib/win_32/graphics.lib")
#pragma comment(lib, "../../build/lib/win_32/kernel.lib")
#pragma comment(lib, "../../build/lib/win_32/UnicodeConverter.lib")
#endif
#pragma comment(lib, "../../build/bin/icu/win_32/icuuc.lib")
#endif
@ -83,7 +93,7 @@ HRESULT convert_single(std::wstring srcFileName)
if (hRes == S_OK)
{
COfficeUtils oCOfficeUtils(NULL);
hRes = oCOfficeUtils.CompressFileOrDirectory(dstTempPath.c_str(), dstPath, -1);
hRes = oCOfficeUtils.CompressFileOrDirectory(dstTempPath.c_str(), dstPath, true);
}
NSDirectory::DeleteDirectory(dstTempPath);

View File

@ -48,7 +48,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_ATL_CSTRINGS;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="false"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
@ -341,6 +341,10 @@
<Filter
Name="Common"
>
<File
RelativePath="..\..\DesktopEditor\common\Base64.cpp"
>
</File>
<File
RelativePath="..\..\ASCOfficeDocxFile2\BinWriter\BinWriters.cpp"
>
@ -385,6 +389,10 @@
RelativePath="..\..\ASCOfficeDocxFile2\DocWrapper\FontProcessor.cpp"
>
</File>
<File
RelativePath="..\..\Common\3dParty\pole\pole.cpp"
>
</File>
<File
RelativePath="..\..\ASCOfficeDocxFile2\BinReader\Readers.cpp"
>
@ -442,30 +450,10 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\Common\FileDownloader\FileDownloader_win.cpp"
>
</File>
<File
RelativePath="..\..\Common\OfficeFileFormatChecker2.cpp"
>
</File>
<File
RelativePath="..\..\Common\3dParty\pole\pole.cpp"
>
</File>
<File
RelativePath="..\..\UnicodeConverter\UnicodeConverter.cpp"
>
</File>
<File
RelativePath="..\..\DesktopEditor\xml\src\xmldom.cpp"
>
</File>
<File
RelativePath="..\..\DesktopEditor\xml\src\xmllight.cpp"
>
</File>
</Files>
<Globals>
</Globals>

View File

@ -69,7 +69,7 @@ namespace Writers
{
rewind(pFile);
BYTE* pData = new BYTE[size];
DWORD dwSizeRead = (DWORD)fread((void*)pData, 1, size, pFile);
_UINT32 dwSizeRead = (_UINT32)fread((void*)pData, 1, size, pFile);
if(dwSizeRead > 0)
{
std::wstring sNewImagePath = AddImageGetNewPath();

View File

@ -53,6 +53,8 @@
#include "../../DesktopEditor/common/ASCVariant.h"
#include "../../OfficeUtils/src/OfficeUtils.h"
#include "../../DesktopEditor/common/Directory.h"
namespace BinDocxRW {
enum ETblStyleOverrideType
@ -7509,7 +7511,7 @@ public:
oXlsx.Write(strDstEmbeddedTemp, *oSaveParams.pContentTypes);
COfficeUtils oOfficeUtils(NULL);
oOfficeUtils.CompressFileOrDirectory(strDstEmbeddedTemp, strDstEmbedded + FILE_SEPARATOR_STR + sXlsxFilename, -1);
oOfficeUtils.CompressFileOrDirectory(strDstEmbeddedTemp, strDstEmbedded + FILE_SEPARATOR_STR + sXlsxFilename, true);
std::wstring sEmbWorksheetRelsName = L"embeddings/" + sXlsxFilename;
std::wstring bstrEmbWorksheetRelType = OOX::FileTypes::MicrosoftOfficeExcelWorksheet.RelationType();

View File

@ -37,7 +37,7 @@
namespace Writers
{
static std::wstring g_string_set_Start = _T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?><w:settings xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:v=\"urn:schemas-microsoft-com:vml\">");
static std::wstring g_string_set_Default = _T("<w:zoom w:percent=\"100\"/><w:characterSpacingControl w:val=\"doNotCompress\"/><w:compat><w:compatSetting w:name=\"compatibilityMode\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"14\"/><w:compatSetting w:name=\"overrideTableStyleFontSizeAndJustification\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/><w:compatSetting w:name=\"enableOpenTypeFeatures\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/><w:compatSetting w:name=\"doNotFlipMirrorIndents\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/></w:compat><w:themeFontLang w:val=\"en-US\" w:eastAsia=\"zh-CN\"/><w:shapeDefaults><o:shapedefaults v:ext=\"edit\" spidmax=\"1026\"/><o:shapelayout v:ext=\"edit\"><o:idmap v:ext=\"edit\" data=\"1\"/></o:shapelayout></w:shapeDefaults><w:decimalSymbol w:val=\".\"/><w:listSeparator w:val=\",\"/>");
static std::wstring g_string_set_Default = _T("<w:zoom w:percent=\"100\"/><w:characterSpacingControl w:val=\"doNotCompress\"/><w:compat><w:compatSetting w:name=\"compatibilityMode\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"15\"/><w:compatSetting w:name=\"overrideTableStyleFontSizeAndJustification\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/><w:compatSetting w:name=\"enableOpenTypeFeatures\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/><w:compatSetting w:name=\"doNotFlipMirrorIndents\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/></w:compat><w:themeFontLang w:val=\"en-US\" w:eastAsia=\"zh-CN\"/><w:shapeDefaults><o:shapedefaults v:ext=\"edit\" spidmax=\"1026\"/><o:shapelayout v:ext=\"edit\"><o:idmap v:ext=\"edit\" data=\"1\"/></o:shapelayout></w:shapeDefaults><w:decimalSymbol w:val=\".\"/><w:listSeparator w:val=\",\"/>");
static std::wstring g_string_set_End = _T("</w:settings>");
class SettingWriter

View File

@ -33,8 +33,7 @@
#define FONT_TABLE_WRITER
#include "../../XlsxSerializerCom/Common/Common.h"
#include "../../DesktopEditor/fontengine/FontManager.h"
#include "../../DesktopEditor/fontengine/ApplicationFonts.h"
#include "../../DesktopEditor/graphics/pro/Fonts.h"
#include <boost/unordered_map.hpp>
namespace Writers
@ -46,32 +45,28 @@ namespace Writers
{
XmlUtils::CStringWriter m_oWriter;
std::wstring m_sDir;
CApplicationFonts m_oApplicationFonts;
CFontManager* m_pFontManager;
NSFonts::IApplicationFonts* m_pApplicationFonts;
NSFonts::IFontManager* m_pFontManager;
public:
boost::unordered_map<std::wstring, int> m_mapFonts;
FontTableWriter(std::wstring sDir, std::wstring sFontDir, bool bNoFontDir):m_sDir(sDir)
{
m_pApplicationFonts = NSFonts::NSApplication::Create();
m_pFontManager = NULL;
if(!bNoFontDir)
{
if(sFontDir.empty())
m_oApplicationFonts.Initialize();
m_pApplicationFonts->Initialize();
else
m_oApplicationFonts.InitializeFromFolder(sFontDir);
CFontList* pFontList = m_oApplicationFonts.GetList();
if(NULL != pFontList)
{
std::wstring sDefaultFont(_T("Arial"));
pFontList->SetDefaultFont(sDefaultFont);
}
m_pFontManager = m_oApplicationFonts.GenerateFontManager();
m_pApplicationFonts->InitializeFromFolder(sFontDir);
m_pFontManager = m_pApplicationFonts->GenerateFontManager();
}
}
~FontTableWriter()
{
RELEASEOBJECT(m_pFontManager);
RELEASEOBJECT(m_pApplicationFonts);
}
void Write()
@ -116,11 +111,11 @@ namespace Writers
bool bUsePanose = false;
if(NULL != m_pFontManager)
{
CFontSelectFormat oFontSelectFormat;
NSFonts::CFontSelectFormat oFontSelectFormat;
oFontSelectFormat.wsName = new std::wstring;
*oFontSelectFormat.wsName = sFontName;
CFontInfo* pFontInfo = m_pFontManager->GetFontInfoByParams(oFontSelectFormat);
NSFonts::CFontInfo* pFontInfo = m_pFontManager->GetFontInfoByParams(oFontSelectFormat);
if(NULL != pFontInfo)
{
for (size_t i = 0; i < 10; ++i)

View File

@ -599,7 +599,7 @@ namespace BinXlsxRW{
//как в CsvReader - подозрительный код
WCHAR *pEndPtr;
wcstod(val.c_str(), &pEndPtr);
if (NULL != *pEndPtr)
if (0 != *pEndPtr)
{
// Не число
aSharedStrings.push_back(val);

View File

@ -67,7 +67,7 @@ bool BinDocxRW::CDocxSerializer::saveToFile(const std::wstring& sSrcFileName, co
COfficeFontPicker* pFontPicker = new COfficeFontPicker();
pFontPicker->Init(m_sFontDir);
CFontManager* pFontManager = pFontPicker->get_FontManager();
NSFonts::IFontManager* pFontManager = pFontPicker->get_FontManager();
DocWrapper::FontProcessor fp;
fp.setFontManager(pFontManager);

View File

@ -52,11 +52,11 @@ namespace DocWrapper {
{
}
void FontProcessor::setFontManager(CFontManager* pFontManager)
void FontProcessor::setFontManager(NSFonts::IFontManager* pFontManager)
{
m_pFontManager = pFontManager;
}
CFontManager* FontProcessor::getFontManager()
NSFonts::IFontManager* FontProcessor::getFontManager()
{
return m_pFontManager;
}
@ -88,7 +88,7 @@ namespace DocWrapper {
std::wstring FontProcessor::getFont(const NSCommon::nullable<OOX::Spreadsheet::CFontScheme>& oScheme, const NSCommon::nullable<ComplexTypes::Spreadsheet::String>& oRFont, const NSCommon::nullable<OOX::Spreadsheet::CCharset>& oCharset, const NSCommon::nullable<OOX::Spreadsheet::CFontFamily >& oFamily, PPTX::Theme* pTheme)
{
CFontSelectFormat oFontSelectFormat;
NSFonts::CFontSelectFormat oFontSelectFormat;
std::wstring sFontName;
if(NULL != pTheme && oScheme.IsInit() && oScheme->m_oFontScheme.IsInit())
{
@ -125,7 +125,7 @@ namespace DocWrapper {
}
std::wstring sRes;
CFontInfo* pFontInfo = m_pFontManager->GetFontInfoByParams(oFontSelectFormat);
NSFonts::CFontInfo* pFontInfo = m_pFontManager->GetFontInfoByParams(oFontSelectFormat);
if(NULL != pFontInfo)
sRes = pFontInfo->m_wsFontName;
else
@ -135,7 +135,7 @@ namespace DocWrapper {
}
void FontProcessor::addToFontMap(OOX::CFont& font)
{
CFontSelectFormat oFontSelectFormat;
NSFonts::CFontSelectFormat oFontSelectFormat;
std::wstring sFontName;
if(font.m_sName.empty())
@ -221,7 +221,7 @@ namespace DocWrapper {
*oFontSelectFormat.ulCodeRange2 = ulCodeRange2;
}
CFontInfo* pFontInfo = m_pFontManager->GetFontInfoByParams(oFontSelectFormat);
NSFonts::CFontInfo* pFontInfo = m_pFontManager->GetFontInfoByParams(oFontSelectFormat);
if(NULL != pFontInfo)
fontMap[sFontName] = pFontInfo->m_wsFontName;
else

View File

@ -33,7 +33,7 @@
#include <map>
#include "../../DesktopEditor/fontengine/ApplicationFonts.h"
#include "../../DesktopEditor/graphics/pro/Fonts.h"
namespace NSCommon{
template<class Type> class nullable;
@ -68,15 +68,15 @@ namespace DocWrapper
{
class FontProcessor
{
CFontManager* m_pFontManager;
NSFonts::IFontManager* m_pFontManager;
std::map<std::wstring, std::wstring> fontMap;
public:
FontProcessor();
~FontProcessor();
void setFontManager(CFontManager* pFontManager);
CFontManager* getFontManager();
void setFontManager(NSFonts::IFontManager* pFontManager);
NSFonts::IFontManager* getFontManager();
void setFontTable(OOX::CFontTable* fontTable);
std::wstring getFont(const std::wstring& name);

View File

@ -104,7 +104,7 @@ namespace BinXlsxRW{
{
COfficeFontPicker* pFontPicker = new COfficeFontPicker();
pFontPicker->Init(m_sFontDir);
CFontManager* pFontManager = pFontPicker->get_FontManager();
NSFonts::IFontManager* pFontManager = pFontPicker->get_FontManager();
DocWrapper::FontProcessor fp;
fp.setFontManager(pFontManager);

View File

@ -16,17 +16,9 @@ include($$PWD/../../Common/3dParty/boost/boost.pri)
DEFINES += UNICODE \
_UNICODE \
USE_AVSOFFICESTUDIO_XMLUTILS \
SOLUTION_ASCOFFICEDOCXFILE2 \
#DISABLE_FILE_DOWNLOADER \
_USE_LIBXML2_READER_ \
LIBXML_READER_ENABLED \
DONT_WRITE_EMBEDDED_FONTS
INCLUDEPATH += \
../../DesktopEditor/freetype-2.5.2/include \
../../DesktopEditor/xml/libxml2/include \
#DISABLE_FILE_DOWNLOADER \
DONT_WRITE_EMBEDDED_FONTS
SOURCES += \

View File

@ -51,6 +51,8 @@
6967917F1D9E8AEE002CA4BA /* BinWriters.h in Headers */ = {isa = PBXBuildFile; fileRef = 6967917B1D9E8AEE002CA4BA /* BinWriters.h */; };
69BBDF251F0B8AAC00EB1BF7 /* FileDownloader_mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 69BBDF241F0B8AAC00EB1BF7 /* FileDownloader_mac.mm */; };
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 */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@ -99,6 +101,8 @@
6967917B1D9E8AEE002CA4BA /* BinWriters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BinWriters.h; path = ../../BinWriter/BinWriters.h; sourceTree = "<group>"; };
69BBDF241F0B8AAC00EB1BF7 /* FileDownloader_mac.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; name = FileDownloader_mac.mm; path = ../../../Common/FileDownloader/FileDownloader_mac.mm; sourceTree = "<group>"; };
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>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -231,6 +235,8 @@
children = (
69F181AD1C77274E00B2952B /* FileDownloader.h */,
69BBDF241F0B8AAC00EB1BF7 /* FileDownloader_mac.mm */,
8A404FD2208A01AF00F2D5CF /* FileDownloader.cpp */,
8A404FD4208A01CE00F2D5CF /* FileDownloader_private.h */,
);
name = Common;
sourceTree = "<group>";
@ -273,6 +279,7 @@
69F181AF1C77274E00B2952B /* FileDownloader.h in Headers */,
17C1FEB01ACC42C4006B99B3 /* BinaryCommonReader.h in Headers */,
17C1FEB11ACC42C4006B99B3 /* Common.h in Headers */,
8A404FD5208A01CE00F2D5CF /* FileDownloader_private.h in Headers */,
17C1FEB21ACC42C4006B99B3 /* XlsxSerializer.h in Headers */,
17C1FEB31ACC42C4006B99B3 /* CSVReader.h in Headers */,
6967917D1D9E8AEE002CA4BA /* BinReaderWriterDefines.h in Headers */,
@ -314,7 +321,7 @@
17E17ED41AC453F800BEA2EA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 17E17ED71AC453F800BEA2EA /* Build configuration list for PBXProject "ASCOfficeDocxFile2Lib" */;
@ -351,6 +358,7 @@
17C1FE9C1ACC42C4006B99B3 /* XlsxSerializer.cpp in Sources */,
690FE0851E9BBD68004B26D0 /* Readers.cpp in Sources */,
17C1FE9D1ACC42C4006B99B3 /* FontProcessor.cpp in Sources */,
8A404FD3208A01AF00F2D5CF /* FileDownloader.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -446,12 +454,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -497,12 +507,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;

View File

@ -2,12 +2,10 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml_wrapper", "..\win32\cpxml.vcproj", "{41BED424-4EAF-4053-8A5F-1E2A387D53D1}"
ProjectSection(ProjectDependencies) = postProject
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormatReaderLib", "..\win32\cpodf.vcproj", "{50E20601-4A8D-4AFB-8870-63828D328429}"
ProjectSection(ProjectDependencies) = postProject
{41BED424-4EAF-4053-8A5F-1E2A387D53D1} = {41BED424-4EAF-4053-8A5F-1E2A387D53D1}
{609ED938-3CA8-4BED-B363-25096D4C4812} = {609ED938-3CA8-4BED-B363-25096D4C4812}
{94954A67-A853-43B1-A727-6EF2774C5A6A} = {94954A67-A853-43B1-A727-6EF2774C5A6A}
EndProjectSection
@ -21,77 +19,26 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormulasConvert", "..\wi
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFileReaderTest", "OdfFileTest.vcproj", "{C2882DDD-07E6-4314-AD4B-48F43F38D722}"
ProjectSection(ProjectDependencies) = postProject
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
{94954A67-A853-43B1-A727-6EF2774C5A6A} = {94954A67-A853-43B1-A727-6EF2774C5A6A}
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C} = {C27E9A9F-3A17-4482-9C5F-BF15C01E747C}
{50E20601-4A8D-4AFB-8870-63828D328429} = {50E20601-4A8D-4AFB-8870-63828D328429}
{41BED424-4EAF-4053-8A5F-1E2A387D53D1} = {41BED424-4EAF-4053-8A5F-1E2A387D53D1}
{94954A67-A853-43B1-A727-6EF2774C5A6A} = {94954A67-A853-43B1-A727-6EF2774C5A6A}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\..\DesktopEditor\graphics\graphics_vs2005.vcproj", "{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeFileCrypt", "..\..\OfficeCryptReader\win32\ECMACryptReader.vcproj", "{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}"
ProjectSection(ProjectDependencies) = postProject
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF} = {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "font_engine", "..\..\DesktopEditor\fontengine\font_engine_vs2005.vcproj", "{C739151F-5384-41DF-A1A6-F089E2C1AD56}"
ProjectSection(ProjectDependencies) = postProject
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "..\..\DesktopEditor\freetype-2.5.2\builds\windows\vc2005\freetype.vcproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raster", "..\..\DesktopEditor\raster\raster_vs2005.vcproj", "{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}"
ProjectSection(ProjectDependencies) = postProject
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1} = {EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cximage", "..\..\DesktopEditor\cximage\CxImage\cximage_vs2005.vcproj", "{BC52A07C-A797-423D-8C4F-8678805BBB36}"
ProjectSection(ProjectDependencies) = postProject
{818753F2-DBB9-4D3B-898A-A604309BE470} = {818753F2-DBB9-4D3B-898A-A604309BE470}
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239} = {764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jasper", "..\..\DesktopEditor\cximage\jasper\jasper_vs2005.vcproj", "{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig", "..\..\DesktopEditor\cximage\jbig\jbig_vs2005.vcproj", "{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "..\..\DesktopEditor\cximage\jpeg\Jpeg_vs2005.vcproj", "{818753F2-DBB9-4D3B-898A-A604309BE470}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpsd", "..\..\DesktopEditor\cximage\libpsd\libpsd_vs2005.vcproj", "{9A037A69-D1DF-4505-AB2A-6CB3641C476E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mng", "..\..\DesktopEditor\cximage\mng\mng_vs2005.vcproj", "{40A69F40-063E-43FD-8543-455495D8733E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "png", "..\..\DesktopEditor\cximage\png\png_vs2005.vcproj", "{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdcr", "..\..\DesktopEditor\cximage\raw\libdcr_vs2005.vcproj", "{DF861D33-9BC1-418C-82B1-581F590FE169}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\DesktopEditor\cximage\tiff\Tiff_vs2005.vcproj", "{0588563C-F05C-428C-B21A-DD74756628B3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig2", "..\..\DesktopEditor\raster\JBig2\win32\jbig2.vcproj", "{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "agg2d", "..\..\DesktopEditor\agg-2.4\agg_vs2005.vcproj", "{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeUtilsLib", "..\..\OfficeUtils\win32\OfficeUtilsLib.vcproj", "{F8274B05-168E-4D6E-B843-AA7510725363}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml2", "..\..\DesktopEditor\xml\build\vs2005\libxml2.vcproj", "{21663823-DE45-479B-91D0-B4FEF4916EF0}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cryptlib", "..\..\Common\3dParty\cryptopp\cryptlib.vcproj", "{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
DLL-Import Debug|Win32 = DLL-Import Debug|Win32
DLL-Import Debug|x64 = DLL-Import Debug|x64
DLL-Import Release|Win32 = DLL-Import Release|Win32
DLL-Import Release|x64 = DLL-Import Release|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
@ -100,6 +47,14 @@ Global
{41BED424-4EAF-4053-8A5F-1E2A387D53D1}.Debug|Win32.Build.0 = Debug|Win32
{41BED424-4EAF-4053-8A5F-1E2A387D53D1}.Debug|x64.ActiveCfg = Debug|x64
{41BED424-4EAF-4053-8A5F-1E2A387D53D1}.Debug|x64.Build.0 = Debug|x64
{41BED424-4EAF-4053-8A5F-1E2A387D53D1}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{41BED424-4EAF-4053-8A5F-1E2A387D53D1}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{41BED424-4EAF-4053-8A5F-1E2A387D53D1}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{41BED424-4EAF-4053-8A5F-1E2A387D53D1}.DLL-Import Debug|x64.Build.0 = Debug|x64
{41BED424-4EAF-4053-8A5F-1E2A387D53D1}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{41BED424-4EAF-4053-8A5F-1E2A387D53D1}.DLL-Import Release|Win32.Build.0 = Release|Win32
{41BED424-4EAF-4053-8A5F-1E2A387D53D1}.DLL-Import Release|x64.ActiveCfg = Release|x64
{41BED424-4EAF-4053-8A5F-1E2A387D53D1}.DLL-Import Release|x64.Build.0 = Release|x64
{41BED424-4EAF-4053-8A5F-1E2A387D53D1}.Release|Win32.ActiveCfg = Release|Win32
{41BED424-4EAF-4053-8A5F-1E2A387D53D1}.Release|Win32.Build.0 = Release|Win32
{41BED424-4EAF-4053-8A5F-1E2A387D53D1}.Release|x64.ActiveCfg = Release|x64
@ -108,6 +63,14 @@ Global
{50E20601-4A8D-4AFB-8870-63828D328429}.Debug|Win32.Build.0 = Debug|Win32
{50E20601-4A8D-4AFB-8870-63828D328429}.Debug|x64.ActiveCfg = Debug|x64
{50E20601-4A8D-4AFB-8870-63828D328429}.Debug|x64.Build.0 = Debug|x64
{50E20601-4A8D-4AFB-8870-63828D328429}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{50E20601-4A8D-4AFB-8870-63828D328429}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{50E20601-4A8D-4AFB-8870-63828D328429}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{50E20601-4A8D-4AFB-8870-63828D328429}.DLL-Import Debug|x64.Build.0 = Debug|x64
{50E20601-4A8D-4AFB-8870-63828D328429}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{50E20601-4A8D-4AFB-8870-63828D328429}.DLL-Import Release|Win32.Build.0 = Release|Win32
{50E20601-4A8D-4AFB-8870-63828D328429}.DLL-Import Release|x64.ActiveCfg = Release|x64
{50E20601-4A8D-4AFB-8870-63828D328429}.DLL-Import Release|x64.Build.0 = Release|x64
{50E20601-4A8D-4AFB-8870-63828D328429}.Release|Win32.ActiveCfg = Release|Win32
{50E20601-4A8D-4AFB-8870-63828D328429}.Release|Win32.Build.0 = Release|Win32
{50E20601-4A8D-4AFB-8870-63828D328429}.Release|x64.ActiveCfg = Release|x64
@ -116,6 +79,14 @@ Global
{609ED938-3CA8-4BED-B363-25096D4C4812}.Debug|Win32.Build.0 = Debug|Win32
{609ED938-3CA8-4BED-B363-25096D4C4812}.Debug|x64.ActiveCfg = Debug|x64
{609ED938-3CA8-4BED-B363-25096D4C4812}.Debug|x64.Build.0 = Debug|x64
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Debug|x64.Build.0 = Debug|x64
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Release|Win32.Build.0 = Release|Win32
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Release|x64.ActiveCfg = Release|x64
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Release|x64.Build.0 = Release|x64
{609ED938-3CA8-4BED-B363-25096D4C4812}.Release|Win32.ActiveCfg = Release|Win32
{609ED938-3CA8-4BED-B363-25096D4C4812}.Release|Win32.Build.0 = Release|Win32
{609ED938-3CA8-4BED-B363-25096D4C4812}.Release|x64.ActiveCfg = Release|x64
@ -124,6 +95,14 @@ Global
{94954A67-A853-43B1-A727-6EF2774C5A6A}.Debug|Win32.Build.0 = Debug|Win32
{94954A67-A853-43B1-A727-6EF2774C5A6A}.Debug|x64.ActiveCfg = Debug|x64
{94954A67-A853-43B1-A727-6EF2774C5A6A}.Debug|x64.Build.0 = Debug|x64
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Debug|x64.Build.0 = Debug|x64
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Release|Win32.Build.0 = Release|Win32
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Release|x64.ActiveCfg = Release|x64
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Release|x64.Build.0 = Release|x64
{94954A67-A853-43B1-A727-6EF2774C5A6A}.Release|Win32.ActiveCfg = Release|Win32
{94954A67-A853-43B1-A727-6EF2774C5A6A}.Release|Win32.Build.0 = Release|Win32
{94954A67-A853-43B1-A727-6EF2774C5A6A}.Release|x64.ActiveCfg = Release|x64
@ -132,146 +111,50 @@ Global
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.Debug|Win32.Build.0 = Debug|Win32
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.Debug|x64.ActiveCfg = Debug|x64
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.Debug|x64.Build.0 = Debug|x64
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.DLL-Import Debug|x64.Build.0 = Debug|x64
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.DLL-Import Release|Win32.Build.0 = Release|Win32
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.DLL-Import Release|x64.ActiveCfg = Release|x64
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.DLL-Import Release|x64.Build.0 = Release|x64
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.Release|Win32.ActiveCfg = Release|Win32
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.Release|Win32.Build.0 = Release|Win32
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.Release|x64.ActiveCfg = Release|x64
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.Release|x64.Build.0 = Release|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|Win32.ActiveCfg = Debug|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|Win32.Build.0 = Debug|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|x64.ActiveCfg = Debug|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|x64.Build.0 = Debug|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|Win32.ActiveCfg = Release|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|Win32.Build.0 = Release|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|x64.ActiveCfg = Release|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|x64.Build.0 = Release|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|Win32.ActiveCfg = Debug|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|Win32.Build.0 = Debug|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|x64.ActiveCfg = Debug|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|x64.Build.0 = Debug|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|Win32.ActiveCfg = Release|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|Win32.Build.0 = Release|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|x64.ActiveCfg = Release|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|x64.Build.0 = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.ActiveCfg = Debug|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.Build.0 = Debug|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.ActiveCfg = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.Build.0 = Release|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|Win32.ActiveCfg = Debug|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|Win32.Build.0 = Debug|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|x64.ActiveCfg = Debug|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|x64.Build.0 = Debug|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|Win32.ActiveCfg = Release|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|Win32.Build.0 = Release|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|x64.ActiveCfg = Release|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|x64.Build.0 = Release|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|Win32.ActiveCfg = Debug|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|Win32.Build.0 = Debug|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|x64.ActiveCfg = Debug|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|x64.Build.0 = Debug|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|Win32.ActiveCfg = Release|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|Win32.Build.0 = Release|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|x64.ActiveCfg = Release|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|x64.Build.0 = Release|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|Win32.ActiveCfg = Debug|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|Win32.Build.0 = Debug|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|x64.ActiveCfg = Debug|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|x64.Build.0 = Debug|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|Win32.ActiveCfg = Release|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|Win32.Build.0 = Release|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|x64.ActiveCfg = Release|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|x64.Build.0 = Release|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|Win32.ActiveCfg = Debug|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|Win32.Build.0 = Debug|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|x64.ActiveCfg = Debug|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|x64.Build.0 = Debug|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|Win32.ActiveCfg = Release|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|Win32.Build.0 = Release|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|x64.ActiveCfg = Release|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|x64.Build.0 = Release|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|Win32.ActiveCfg = Debug|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|Win32.Build.0 = Debug|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|x64.ActiveCfg = Debug|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|x64.Build.0 = Debug|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|Win32.ActiveCfg = Release|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|Win32.Build.0 = Release|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|x64.ActiveCfg = Release|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|x64.Build.0 = Release|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|Win32.ActiveCfg = Debug|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|Win32.Build.0 = Debug|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|x64.ActiveCfg = Debug|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|x64.Build.0 = Debug|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|Win32.ActiveCfg = Release|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|Win32.Build.0 = Release|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|x64.ActiveCfg = Release|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|x64.Build.0 = Release|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|Win32.ActiveCfg = Debug|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|Win32.Build.0 = Debug|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|x64.ActiveCfg = Debug|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|x64.Build.0 = Debug|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Release|Win32.ActiveCfg = Release|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Release|Win32.Build.0 = Release|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Release|x64.ActiveCfg = Release|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Release|x64.Build.0 = Release|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|Win32.ActiveCfg = Debug|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|Win32.Build.0 = Debug|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|x64.ActiveCfg = Debug|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|x64.Build.0 = Debug|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|Win32.ActiveCfg = Release|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|Win32.Build.0 = Release|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|x64.ActiveCfg = Release|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|x64.Build.0 = Release|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|Win32.ActiveCfg = Debug|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|Win32.Build.0 = Debug|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|x64.ActiveCfg = Debug|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|x64.Build.0 = Debug|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|Win32.ActiveCfg = Release|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|Win32.Build.0 = Release|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|x64.ActiveCfg = Release|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|x64.Build.0 = Release|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|Win32.ActiveCfg = Debug|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|Win32.Build.0 = Debug|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|x64.ActiveCfg = Debug|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|x64.Build.0 = Debug|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|Win32.ActiveCfg = Release|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|Win32.Build.0 = Release|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|x64.ActiveCfg = Release|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|x64.Build.0 = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|Win32.ActiveCfg = Debug|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|Win32.Build.0 = Debug|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|x64.ActiveCfg = Debug|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|x64.Build.0 = Debug|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|Win32.ActiveCfg = Release|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|Win32.Build.0 = Release|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|x64.ActiveCfg = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|x64.Build.0 = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|Win32.ActiveCfg = Debug|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|Win32.Build.0 = Debug|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|x64.ActiveCfg = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|x64.Build.0 = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|Win32.ActiveCfg = Release|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|Win32.Build.0 = Release|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|x64.ActiveCfg = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|x64.Build.0 = Release|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|Win32.ActiveCfg = Debug|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|Win32.Build.0 = Debug|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|x64.ActiveCfg = Debug|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|x64.Build.0 = Debug|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|Win32.ActiveCfg = Release|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|Win32.Build.0 = Release|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|x64.ActiveCfg = Release|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|x64.Build.0 = Release|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.ActiveCfg = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.Build.0 = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|x64.ActiveCfg = Debug|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|x64.Build.0 = Debug|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.ActiveCfg = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.Build.0 = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|x64.ActiveCfg = Release|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|x64.Build.0 = Release|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Debug|Win32.ActiveCfg = Debug|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Debug|Win32.Build.0 = Debug|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Debug|x64.ActiveCfg = Debug|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Debug|x64.Build.0 = Debug|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Debug|x64.Build.0 = Debug|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Release|Win32.Build.0 = Release|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Release|x64.ActiveCfg = Release|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Release|x64.Build.0 = Release|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Release|Win32.ActiveCfg = Release|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Release|Win32.Build.0 = Release|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Release|x64.ActiveCfg = Release|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Release|x64.Build.0 = Release|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|Win32.ActiveCfg = Debug|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|Win32.Build.0 = Debug|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|x64.ActiveCfg = Debug|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|x64.Build.0 = Debug|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Debug|Win32.ActiveCfg = DLL-Import Debug|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Debug|Win32.Build.0 = DLL-Import Debug|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Debug|x64.ActiveCfg = DLL-Import Debug|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Debug|x64.Build.0 = DLL-Import Debug|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Release|Win32.ActiveCfg = DLL-Import Release|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Release|Win32.Build.0 = DLL-Import Release|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Release|x64.ActiveCfg = DLL-Import Release|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Release|x64.Build.0 = DLL-Import Release|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|Win32.ActiveCfg = Release|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|Win32.Build.0 = Release|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|x64.ActiveCfg = Release|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -44,6 +44,14 @@
#if defined(_WIN64)
#pragma comment(lib, "../../build/bin/icu/win_64/icuuc.lib")
#elif defined (_WIN32)
#if defined(_DEBUG)
#pragma comment(lib, "../../build/lib/win_32/DEBUG/graphics.lib")
#pragma comment(lib, "../../build/lib/win_32/DEBUG/kernel.lib")
#else
#pragma comment(lib, "../../build/lib/win_32/graphics.lib")
#pragma comment(lib, "../../build/lib/win_32/kernel.lib")
#endif
#pragma comment(lib, "../../build/bin/icu/win_32/icuuc.lib")
#endif
@ -77,6 +85,7 @@ HRESULT convert_single(std::wstring srcFileName)
std::wstring outputDir = NSDirectory::GetFolderPath(dstPath);
std::wstring dstTempPath = NSDirectory::CreateDirectoryWithUniqueName(outputDir);
std::wstring srcTempPath;
std::wstring srcTempPath2 = NSDirectory::CreateDirectoryWithUniqueName(outputDir);
if (fileChecker.nFileType == AVS_OFFICESTUDIO_FILE_DOCUMENT_ODT ||
fileChecker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_ODS ||
@ -96,12 +105,13 @@ HRESULT convert_single(std::wstring srcFileName)
}
_CP_LOG << L"[info] " << srcFileName << std::endl;
nResult = ConvertODF2OOXml(srcTempPath, dstTempPath, L"C:\\Windows\\Fonts", false, NULL);
nResult = ConvertODF2OOXml(srcTempPath, dstTempPath, L"C:\\Windows\\Fonts", srcTempPath2, L"password", NULL);
if (srcTempPath != srcFileName)
{
NSDirectory::DeleteDirectory(srcTempPath);
}
NSDirectory::DeleteDirectory(srcTempPath2);
if (nResult == 0)
{

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_UNICODE;UNICODE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
@ -357,46 +357,6 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\Common\DocxFormat\Source\Base\unicode_util.cpp"
>
</File>
<File
RelativePath="..\..\UnicodeConverter\UnicodeConverter.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\DesktopEditor\xml\src\xmldom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\DesktopEditor\xml\src\xmllight.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
</Filter>
<File
RelativePath="OdfFileTest.cpp"
@ -410,6 +370,10 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\Common\DocxFormat\Source\Base\unicode_util.cpp"
>
</File>
</Files>
<Globals>
</Globals>

View File

@ -57,8 +57,8 @@ class odf_read_context;
class odf_document
{
public:
odf_document(const std::wstring & Folder, const ProgressCallback* CallBack);
odf_document(xml::sax * Reader);
odf_document(const std::wstring & SrcPath, const std::wstring & TempPath, const std::wstring& Password, const ProgressCallback* CallBack);
odf_document(xml::sax * Reader, const std::wstring & TempPath);
~odf_document();
@ -68,10 +68,12 @@ public:
bool xlsx_convert(oox::xlsx_conversion_context & Context);
bool pptx_convert(oox::pptx_conversion_context & Context);
const std::wstring & get_folder() const;
const std::wstring & get_folder() const;
const std::wstring & get_temp_folder() const;
int get_office_mime_type();
bool get_encrypted();
int get_office_mime_type();
bool get_encrypted();
bool get_error();
class Impl;
Impl * get_impl() { return impl_.get(); }

View File

@ -21,14 +21,9 @@ include($$PWD/../../Common/3dParty/boost/boost.pri)
DEFINES += UNICODE \
_UNICODE \
_USE_LIBXML2_READER_ \
LIBXML_READER_ENABLED \
DONT_WRITE_EMBEDDED_FONTS
INCLUDEPATH += ../include
INCLUDEPATH += ../../DesktopEditor/freetype-2.5.2/include
INCLUDEPATH += ../../DesktopEditor/xml/libxml2/include
INCLUDEPATH += ../../DesktopEditor/xml/build/qt
CONFIG(debug, debug|release){
DEFINES += _DEBUG

View File

@ -83,28 +83,38 @@ int ConvertOdp2Pptx(cpdoccore::odf_reader::odf_document & inputOdf, const std::w
return 0;
}
int ConvertODF2OOXml(const std::wstring & srcPath, const std::wstring & dstPath, const std::wstring & fontsPath, bool bOnlyPresentation, const ProgressCallback* CallBack)
int ConvertODF2OOXml(const std::wstring & srcPath, const std::wstring & dstPath, const std::wstring & fontsPath, const std::wstring & tempPath, const std::wstring & password, const ProgressCallback* CallBack)
{
int nResult = 0;
try
{
cpdoccore::odf_reader::odf_document inputOdf(srcPath, CallBack);
cpdoccore::odf_reader::odf_document inputOdf(srcPath, tempPath, password, CallBack);
int type = inputOdf.get_office_mime_type();
bool encrypted = inputOdf.get_encrypted();
int type = inputOdf.get_office_mime_type();
bool bEncrypted = inputOdf.get_encrypted();
bool bError = inputOdf.get_error();
if (encrypted) return AVS_ERROR_DRM;
if (bOnlyPresentation && type != 3)return AVS_ERROR_UNEXPECTED;
if (bError)
{
if (bEncrypted)
{
if (password.empty()) return AVS_ERROR_DRM;
else return AVS_ERROR_PASSWORD;
}
else
{
return AVS_ERROR_FILEFORMAT;
}
}
switch (type)
{
case 1:
nResult = ConvertOdt2Docx(inputOdf,dstPath, fontsPath);
nResult = ConvertOdt2Docx(inputOdf, dstPath, fontsPath);
break;
case 2:
nResult = ConvertOds2Xlsx(inputOdf,dstPath, fontsPath);
nResult = ConvertOds2Xlsx(inputOdf, dstPath, fontsPath);
break;
case 3:
nResult = ConvertOdp2Pptx(inputOdf, dstPath, fontsPath);

View File

@ -35,6 +35,6 @@
struct ProgressCallback;
int ConvertODF2OOXml(const std::wstring & srcPath, const std::wstring & dstPath, const std::wstring & fontsPath, bool bOnlyPresentation, const ProgressCallback* CallBack);
int ConvertODF2OOXml(const std::wstring & srcPath, const std::wstring & dstPath, const std::wstring & fontsPath, const std::wstring & tempPath, const std::wstring & password, const ProgressCallback* CallBack);
int ConvertOTF2ODF(const std::wstring & dstPath);
int ConvertOTF2ODF(const std::wstring & otfPath);

View File

@ -51,7 +51,7 @@
#include "oox_rels.h"
#include "logging.h"
#include "../../../DesktopEditor/fontengine/ApplicationFonts.h"
#include "../../../DesktopEditor/graphics/pro/Fonts.h"
#include "../../../Common/DocxFormat/Source/XML/Utils.h"
static int current_id_changes = 0;
@ -158,7 +158,7 @@ docx_conversion_context::docx_conversion_context(odf_reader::odf_document * OdfD
odf_document_ (OdfDocument)
{
streams_man_ = streams_man::create(temp_stream_);
applicationFonts_ = new CApplicationFonts();
applicationFonts_ = NSFonts::NSApplication::Create();
}
docx_conversion_context::~docx_conversion_context()
{

View File

@ -47,7 +47,7 @@
#include "oox_conversion_context.h"
#include "oox_chart_context.h"
class CApplicationFonts;
#include "../../../DesktopEditor/graphics/pro/Fonts.h"
namespace cpdoccore {
@ -758,7 +758,7 @@ private:
package::docx_document * output_document_;
odf_reader::odf_document * odf_document_;
CApplicationFonts * applicationFonts_;
NSFonts::IApplicationFonts * applicationFonts_;
std::vector<odf_reader::_property> settings_properties_;

View File

@ -140,7 +140,7 @@ void word_files::update_rels(docx_conversion_context & Context)
Context.dump_notes (rels_files_.get_rel_file()->get_rels());
}
void word_files::set_media(mediaitems & _Mediaitems, CApplicationFonts *pAppFonts)
void word_files::set_media(mediaitems & _Mediaitems, NSFonts::IApplicationFonts *pAppFonts)
{
if (_Mediaitems.count_image + _Mediaitems.count_media > 0)
{

View File

@ -40,7 +40,7 @@
#include "docx_content_type.h"
#include "oox_package.h"
class CApplicationFonts;
#include "../../../DesktopEditor/graphics/pro/Fonts.h"
namespace cpdoccore {
namespace oox {
@ -130,7 +130,7 @@ public:
void set_numbering (element_ptr Element);
void set_settings (element_ptr Element);
bool has_numbering ();
void set_media (mediaitems & _Mediaitems, CApplicationFonts *pAppFonts);
void set_media (mediaitems & _Mediaitems, NSFonts::IApplicationFonts *pAppFonts);
void set_headers_footers(headers_footers & HeadersFooters);
void set_notes (notes_context & notesContext);
void set_comments (comments_context & commentsContext);

View File

@ -36,8 +36,7 @@
#include <float.h>
#include "../../DesktopEditor/fontengine/FontManager.h"
#include "../../DesktopEditor/fontengine/ApplicationFonts.h"
#include "../../DesktopEditor/graphics/pro/Fonts.h"
namespace cpdoccore {
namespace utils {
@ -49,7 +48,7 @@ namespace
class MeasureError : public Error {};
}
std::pair<float, float> GetMaxDigitSizePixelsImpl(const std::wstring & fontName, double fontSize, double dpi, long fontStyle, CFontManager *pFontManager)
std::pair<float, float> GetMaxDigitSizePixelsImpl(const std::wstring & fontName, double fontSize, double dpi, long fontStyle, NSFonts::IFontManager *pFontManager)
{
if (pFontManager == NULL) return std::pair<float, float>(7,8);
@ -102,7 +101,7 @@ std::pair<float, float> GetMaxDigitSizePixelsImpl(const std::wstring & fontName,
}
std::pair<float, float> GetMaxDigitSizePixels(const std::wstring & fontName, double fontSize, double dpi, long fontStyle, CApplicationFonts *appFonts)
std::pair<float, float> GetMaxDigitSizePixels(const std::wstring & fontName, double fontSize, double dpi, long fontStyle, NSFonts::IApplicationFonts *appFonts)
{
try
{
@ -110,13 +109,12 @@ std::pair<float, float> GetMaxDigitSizePixels(const std::wstring & fontName, dou
if (appFonts)
{
CFontManager *pFontManager = appFonts->GenerateFontManager();
NSFonts::IFontManager *pFontManager = appFonts->GenerateFontManager();
std::pair<float, float> val = GetMaxDigitSizePixelsImpl(fontName, fontSize, dpi, fontStyle, pFontManager);
if (pFontManager)
{
pFontManager->m_pApplication = NULL;
{
delete pFontManager;
}

View File

@ -34,12 +34,15 @@
#include <utility>
#include <string>
class CApplicationFonts;
namespace NSFonts
{
class IApplicationFonts;
}
namespace cpdoccore {
namespace utils {
std::pair<float, float> GetMaxDigitSizePixels(const std::wstring & fontName, double fontSize, double dpi, long fontStyle, CApplicationFonts *appFonts);
std::pair<float, float> GetMaxDigitSizePixels(const std::wstring & fontName, double fontSize, double dpi, long fontStyle, NSFonts::IApplicationFonts *appFonts);
}
}

View File

@ -38,7 +38,7 @@
#include "mediaitems.h"
#include "../../DesktopEditor/common/File.h"
#include "../../DesktopEditor/raster/Metafile/MetaFile.h"
#include "../../DesktopEditor/graphics/pro/Image.h"
#include "../../DesktopEditor/raster/ImageFileFormatChecker.h"
#include "../../Common/DocxFormat/Source/Base/Base.h"
@ -46,17 +46,19 @@ namespace cpdoccore {
namespace oox {
namespace package {
static void ConvertSvmToImage(std::wstring &file_svm, std::wstring &file_png, CApplicationFonts *pAppFonts)
static void ConvertSvmToImage(std::wstring &file_svm, std::wstring &file_png, NSFonts::IApplicationFonts *pAppFonts)
{
MetaFile::CMetaFile oMetaFile(pAppFonts);
MetaFile::IMetaFile* pMetaFile = MetaFile::Create(pAppFonts);
if (oMetaFile.LoadFromFile(file_svm.c_str()))
if (pMetaFile->LoadFromFile(file_svm.c_str()))
{
double w, h, x, y;
oMetaFile.GetBounds(&x, &y, &w, &h);
oMetaFile.ConvertToRaster(file_png.c_str(), 4, w);
oMetaFile.Close();
pMetaFile->GetBounds(&x, &y, &w, &h);
pMetaFile->ConvertToRaster(file_png.c_str(), 4, w);
pMetaFile->Close();
}
RELEASEOBJECT(pMetaFile);
}
static std::wstring get_mime_type(const std::wstring & extension)
@ -331,7 +333,7 @@ void docProps_files::write(const std::wstring & RootPath)
////////////
media::media(mediaitems & _Mediaitems, CApplicationFonts *pAppFonts) : mediaitems_(_Mediaitems), appFonts_(pAppFonts)
media::media(mediaitems & _Mediaitems, NSFonts::IApplicationFonts *pAppFonts) : mediaitems_(_Mediaitems), appFonts_(pAppFonts)
{
}

View File

@ -42,7 +42,10 @@
#include "../../../Common/DocxFormat/Source/Base/Base.h"
#include "../../../DesktopEditor/common/Directory.h"
class CApplicationFonts;
namespace NSFonts
{
class IApplicationFonts;
}
namespace cpdoccore {
namespace oox {
@ -202,14 +205,14 @@ private:
class media : public element
{
public:
media(mediaitems & _Mediaitems, CApplicationFonts *pAppFonts);
media(mediaitems & _Mediaitems, NSFonts::IApplicationFonts *pAppFonts);
public:
virtual void write(const std::wstring & RootPath);
private:
mediaitems & mediaitems_;
CApplicationFonts * appFonts_;
NSFonts::IApplicationFonts * appFonts_;
};

View File

@ -45,7 +45,7 @@
#include "pptx_default_serializes.h"
#include "../../DesktopEditor/fontengine/ApplicationFonts.h"
#include "../../DesktopEditor/graphics/pro/Fonts.h"
namespace cpdoccore {
@ -72,7 +72,7 @@ pptx_conversion_context::pptx_conversion_context( odf_reader::odf_document * odf
,last_idx_placeHolder (1)
,last_uniq_big_id (1)
{
applicationFonts_ = new CApplicationFonts();
applicationFonts_ = NSFonts::NSApplication::Create();
}
pptx_conversion_context::~pptx_conversion_context()

View File

@ -44,7 +44,10 @@
#include "mediaitems.h"
class CApplicationFonts;
namespace NSFonts
{
class IApplicationFonts;
}
namespace cpdoccore {
@ -152,7 +155,7 @@ private:
package::pptx_document * output_document_;
odf_reader::odf_document * odf_document_;
CApplicationFonts * applicationFonts_;
NSFonts::IApplicationFonts * applicationFonts_;
pptx_slide_context pptx_slide_context_;
pptx_text_context pptx_text_context_;

View File

@ -504,7 +504,7 @@ void ppt_files::add_notesMaster(slide_content_ptr slide)
{
notesMaster_files_.add_slide(slide);
}
void ppt_files::set_media(mediaitems & _Mediaitems, CApplicationFonts *pAppFonts)
void ppt_files::set_media(mediaitems & _Mediaitems, NSFonts::IApplicationFonts *pAppFonts)
{
if (_Mediaitems.count_image + _Mediaitems.count_media > 0)
{

View File

@ -35,7 +35,10 @@
#include <cpdoccore/CPNoncopyable.h>
#include "pptx_comments.h"
class CApplicationFonts;
namespace NSFonts
{
class IApplicationFonts;
}
namespace cpdoccore {
namespace oox {
@ -214,7 +217,7 @@ public:
void add_notes (slide_content_ptr sheet);
void add_notesMaster(slide_content_ptr sheet);
void set_media(mediaitems & _Mediaitems, CApplicationFonts *pAppFonts);
void set_media(mediaitems & _Mediaitems, NSFonts::IApplicationFonts *pAppFonts);
void add_charts(chart_content_ptr chart);
void add_theme (pptx_xml_theme_ptr theme);

View File

@ -36,6 +36,8 @@
#include <cpdoccore/utf8cpp/utf8.h>
#include "../../../DesktopEditor/common/Directory.h"
namespace cpdoccore {
namespace oox {
namespace package {
@ -275,7 +277,7 @@ void xl_files::add_sheet(sheet_content_ptr sheet)
sheets_files_.add_sheet(sheet);
}
void xl_files::set_media(mediaitems & _Mediaitems, CApplicationFonts *pAppFonts)
void xl_files::set_media(mediaitems & _Mediaitems, NSFonts::IApplicationFonts *pAppFonts)
{
if (_Mediaitems.count_image + _Mediaitems.count_media > 0)
{

View File

@ -38,7 +38,10 @@
#include "xlsx_drawings.h"
#include "xlsx_comments.h"
class CApplicationFonts;
namespace NSFonts
{
class IApplicationFonts;
}
namespace cpdoccore {
namespace oox {
@ -222,7 +225,7 @@ public:
void set_sharedStrings (element_ptr Element);
void set_connections (element_ptr Element);
void add_sheet (sheet_content_ptr sheet);
void set_media (mediaitems & _Mediaitems, CApplicationFonts *pAppFonts);
void set_media (mediaitems & _Mediaitems, NSFonts::IApplicationFonts *pAppFonts);
void set_drawings (element_ptr Element);
void set_vml_drawings (element_ptr Element);
void set_comments (element_ptr Element);

View File

@ -45,7 +45,7 @@
#include "../odf/odfcontext.h"
#include "../odf/calcs_styles.h"
#include "../../DesktopEditor/fontengine/ApplicationFonts.h"
#include "../../DesktopEditor/graphics/pro/Fonts.h"
namespace cpdoccore {
@ -76,7 +76,7 @@ xlsx_conversion_context::xlsx_conversion_context(odf_reader::odf_document * odfD
mediaitems_ (odf_document_->get_folder()),
xlsx_drawing_context_handle_(mediaitems_)
{
applicationFonts_ = new CApplicationFonts();
applicationFonts_ = NSFonts::NSApplication::Create();
}
void xlsx_conversion_context::set_output_document (package::xlsx_document * document)

View File

@ -54,7 +54,10 @@
#include "mediaitems.h"
class CApplicationFonts;
namespace NSFonts
{
class IApplicationFonts;
}
namespace cpdoccore {
@ -194,7 +197,7 @@ private:
const odf_reader::office_element *spreadsheet_;
odf_reader::odf_document *odf_document_;
CApplicationFonts *applicationFonts_;
NSFonts::IApplicationFonts *applicationFonts_;
std::vector<xlsx_xml_worksheet_ptr> sheets_;
std::vector<oox_chart_context_ptr> charts_;

View File

@ -51,20 +51,21 @@
/////////////////////////////////////////////////////////////////////////////////
#include "../../../DesktopEditor/raster/BgraFrame.h"
#include "../../../DesktopEditor/raster/Metafile/MetaFile.h"
#include "../../../DesktopEditor/graphics/pro/Image.h"
#include "../../../Common/DocxFormat/Source/XML/Utils.h"
namespace _image_file_
{
bool GetResolution(const wchar_t* fileName, int & Width, int &Height, CApplicationFonts * appFonts)
bool GetResolution(const wchar_t* fileName, int & Width, int &Height, NSFonts::IApplicationFonts* appFonts)
{
CBgraFrame image;
MetaFile::CMetaFile meta_file(appFonts);
MetaFile::IMetaFile* meta_file = MetaFile::Create(appFonts);
if ( meta_file.LoadFromFile(fileName))
bool bRet = false;
if ( meta_file->LoadFromFile(fileName))
{
double dX = 0, dY = 0, dW = 0, dH = 0;
meta_file.GetBounds(&dX, &dY, &dW, &dH);
meta_file->GetBounds(&dX, &dY, &dW, &dH);
Width = dW;
Height = dH;
@ -74,13 +75,13 @@ namespace _image_file_
Width = image.get_Width();
Height = image.get_Height();
return true;
bRet = true;
}
return false;
RELEASEOBJECT(meta_file);
return bRet;
}
};
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
namespace cpdoccore {
@ -98,7 +99,7 @@ int get_value_emu(double pt)
{
return static_cast<int>((pt* 360000 * 2.54) / 72);
}
bool parse_clipping(std::wstring strClipping,std::wstring fileName, double_4 & clip_rect, CApplicationFonts * appFonts)
bool parse_clipping(std::wstring strClipping,std::wstring fileName, double_4 & clip_rect, NSFonts::IApplicationFonts * appFonts)
{
memset(clip_rect, 0, 4*sizeof(double));

View File

@ -50,11 +50,9 @@
#include "datatypes/targetframename.h"
#include "datatypes/common_attlists.h"
//class CApplicationFonts;
namespace _image_file_
{
bool GetResolution(const wchar_t* fileName, int & Width, int &Height, CApplicationFonts * appFonts);
bool GetResolution(const wchar_t* fileName, int & Width, int &Height, NSFonts::IApplicationFonts * appFonts);
}
namespace cpdoccore {
@ -76,7 +74,7 @@ void Compute_GraphicFill(const odf_types::common_draw_fill_attlist & props,
const office_element_ptr & style_image, styles_lite_container &styles, oox::_oox_fill & fill, bool txbx = false);
typedef double double_4[4];
bool parse_clipping(std::wstring strClipping,std::wstring fileName,double_4 & clip_rect, CApplicationFonts * appFonts);
bool parse_clipping(std::wstring strClipping,std::wstring fileName,double_4 & clip_rect, NSFonts::IApplicationFonts * appFonts);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class draw_a : public office_element_impl<draw_a>
{
@ -118,4 +116,4 @@ void oox_convert_transforms(std::wstring transformStr,std::vector<odf_reader::_p
//void docx_convert_transforms(std::wstring transformStr, oox::xlsx_conversion_context & Context);
}
}
}

View File

@ -274,7 +274,7 @@ void draw_object::add_child_element( xml::sax * Reader, const std::wstring & Ns,
if CP_CHECK_NAME(L"office", L"document")
{
//embedded
odf_document_ = odf_document_ptr( new odf_document(Reader));
odf_document_ = odf_document_ptr( new odf_document(Reader, NSDirectory::GetTempPath()));
}
}

View File

@ -1461,13 +1461,14 @@ void draw_object::docx_convert(oox::docx_conversion_context & Context)
if (!odf_document_ && !href.empty())
{
std::wstring tempPath = Context.root()->get_temp_folder();
std::wstring folderPath = Context.root()->get_folder();
std::wstring objectPath = folderPath + FILE_SEPARATOR_STR + href;
// normalize path ???? todooo
XmlUtils::replace_all( objectPath, FILE_SEPARATOR_STR + std::wstring(L"./"), FILE_SEPARATOR_STR);
odf_document_ = odf_document_ptr(new odf_document(objectPath, NULL));
odf_document_ = odf_document_ptr(new odf_document(objectPath, tempPath, L"", NULL));
}
//---------------------------------------------------------------------------------------------------------------------
draw_frame* frame = NULL;

View File

@ -261,13 +261,14 @@ void draw_object::pptx_convert(oox::pptx_conversion_context & Context)
if (!odf_document_ && !href.empty())
{
std::wstring tempPath = Context.root()->get_temp_folder();
std::wstring folderPath = Context.root()->get_folder();
std::wstring objectPath = folderPath + FILE_SEPARATOR_STR + href;
// normalize path ???? todooo
XmlUtils::replace_all( objectPath, FILE_SEPARATOR_STR + std::wstring(L"./"), FILE_SEPARATOR_STR);
odf_document_ = odf_document_ptr(new odf_document(objectPath, NULL));
odf_document_ = odf_document_ptr(new odf_document(objectPath, tempPath, L"", NULL));
}
//---------------------------------------------------------------------------------------------------------------------
office_element *contentSubDoc = odf_document_ ? odf_document_->get_impl()->get_content() : NULL;

View File

@ -268,13 +268,14 @@ void draw_object::xlsx_convert(oox::xlsx_conversion_context & Context)
if (!odf_document_ && !href.empty())
{
std::wstring tempPath = Context.root()->get_temp_folder();
std::wstring folderPath = Context.root()->get_folder();
std::wstring objectPath = folderPath + FILE_SEPARATOR_STR + href;
// normalize path ???? todooo
XmlUtils::replace_all( objectPath, FILE_SEPARATOR_STR + std::wstring(L"./"), FILE_SEPARATOR_STR);
odf_document_ = odf_document_ptr(new odf_document(objectPath, NULL));
odf_document_ = odf_document_ptr(new odf_document(objectPath, tempPath, L"", NULL));
}
office_element *contentSubDoc = odf_document_ ? odf_document_->get_impl()->get_content() : NULL;
if (!contentSubDoc)

View File

@ -38,9 +38,11 @@
namespace cpdoccore {
namespace odf_reader {
odf_document::odf_document(const std::wstring & Folder, const ProgressCallback* CallBack) : impl_(new Impl(Folder, CallBack))
odf_document::odf_document(const std::wstring & SrcPath, const std::wstring & TempPath, const std::wstring & Password, const ProgressCallback* CallBack)
: impl_(new Impl(SrcPath, TempPath, Password, CallBack))
{}
odf_document::odf_document( xml::sax * Reader) : impl_(new Impl(Reader))
odf_document::odf_document( xml::sax * Reader, const std::wstring & TempPath) : impl_(new Impl(Reader, TempPath))
{}
odf_document::~odf_document()
@ -70,6 +72,11 @@ const std::wstring & odf_document::get_folder() const
return impl_->get_folder();
}
const std::wstring & odf_document::get_temp_folder() const
{
return impl_->get_temp_folder();
}
int odf_document::get_office_mime_type()
{
return impl_->get_office_mime_type();
@ -78,6 +85,10 @@ bool odf_document::get_encrypted()
{
return impl_->get_encrypted();
}
bool odf_document::get_error()
{
return impl_->get_error();
}
bool odf_document::UpdateProgress(long Complete)
{
if (!impl_) return true;

View File

@ -85,6 +85,8 @@
#include "../progressCallback.h"
#include "../../../OfficeCryptReader/source/CryptTransform.h"
#define PROGRESSEVENT_ID 0
namespace cpdoccore {
@ -119,11 +121,12 @@ content_xml_t_ptr odf_document::Impl::read_file_content(const std::wstring & Pat
return result;
}
odf_document::Impl::Impl(xml::sax * Reader):
context_(new odf_read_context()), base_folder_(L""), pCallBack(NULL), bUserStopConvert (0)
odf_document::Impl::Impl(xml::sax * Reader, const std::wstring & tempPath):
context_(new odf_read_context()), base_folder_(L""), pCallBack(NULL), bUserStopConvert (0), bError(false)
{
office_mime_type_ = 0;
encrypted = false;
tmp_folder_original_ = tempPath;
content_xml_ = read_file_content(Reader);
@ -141,30 +144,59 @@ odf_document::Impl::Impl(xml::sax * Reader):
_CP_LOG << L"[info] parse settings" << std::endl;
parse_settings(content_xml_->get_content());
tmp_folder_ = NSDirectory::CreateDirectoryWithUniqueName(NSDirectory::GetTempPath());
tmp_folder_ = NSDirectory::CreateDirectoryWithUniqueName(tempPath);
}
}
odf_document::Impl::Impl(const std::wstring & srcPath, const ProgressCallback* CallBack) :
context_(new odf_read_context()), pCallBack(CallBack), bUserStopConvert (0)
odf_document::Impl::Impl(const std::wstring & srcPath, const std::wstring & tempPath, const std::wstring & password, const ProgressCallback* callBack) :
context_(new odf_read_context()), pCallBack(callBack), bUserStopConvert (0), bError(false)
{
office_mime_type_ = 0;
encrypted = false;
tmp_folder_original_ = tempPath;
if (NSDirectory::Exists(srcPath))
{
base_folder_ = srcPath;
std::wstring content_xml = srcPath + FILE_SEPARATOR_STR + L"content.xml";
std::wstring styles_xml = srcPath + FILE_SEPARATOR_STR + L"styles.xml";
std::wstring meta_xml = srcPath + FILE_SEPARATOR_STR + L"meta.xml";
std::wstring settings_xml = srcPath + FILE_SEPARATOR_STR + L"settings.xml";
std::wstring manifest_xml = srcPath + FILE_SEPARATOR_STR + L"META-INF" + FILE_SEPARATOR_STR + L"manifest.xml";
std::wstring mimetype_xml = srcPath + FILE_SEPARATOR_STR + L"mimetype";
_CP_LOG << L"[info] read mimetype" << std::endl;
NSFile::CFileBinary::ReadAllTextUtf8(mimetype_xml, mimetype_content_file_);
_CP_LOG << L"[info] read manifest.xml" << std::endl;
manifest_xml_ = read_file_content(manifest_xml);
_CP_LOG << L"[info] parse manifest" << std::endl;
parse_manifests(manifest_xml_ ? manifest_xml_->get_content() : NULL);
if (!office_mime_type_)
{
office_mime_type_ = GetMimetype(mimetype_content_file_);
}
if (false == map_encryptions_.empty())
{
if (password.empty()) return;
//decrypt files
tmp_folder_ = NSDirectory::CreateDirectoryWithUniqueName(tempPath);
bError = !decrypt_folder(password, base_folder_, tmp_folder_);
if (bError)
return;
base_folder_ = tmp_folder_;
}
std::wstring content_xml = base_folder_ + FILE_SEPARATOR_STR + L"content.xml";
std::wstring styles_xml = base_folder_ + FILE_SEPARATOR_STR + L"styles.xml";
std::wstring meta_xml = base_folder_ + FILE_SEPARATOR_STR + L"meta.xml";
std::wstring settings_xml = base_folder_ + FILE_SEPARATOR_STR + L"settings.xml";
//-----------------------------------------------------------------------------------------------------
_CP_LOG << L"[info] read settings.xml" << std::endl;
settings_xml_ = read_file_content(settings_xml);
@ -174,8 +206,6 @@ odf_document::Impl::Impl(const std::wstring & srcPath, const ProgressCallback* C
_CP_LOG << L"[info] read styles.xml" << std::endl;
styles_xml_ = read_file_content(styles_xml);
_CP_LOG << L"[info] read mimetype" << std::endl;
NSFile::CFileBinary::ReadAllTextUtf8(mimetype_xml, mimetype_content_file_);
//----------------------------------------------------------------------------------------
_CP_LOG << L"[info] parse fonts" << std::endl;
parse_fonts(content_xml_ ? content_xml_->get_content() : NULL);
@ -183,14 +213,6 @@ odf_document::Impl::Impl(const std::wstring & srcPath, const ProgressCallback* C
_CP_LOG << L"[info] parse styles" << std::endl;
parse_styles(styles_xml_ ? styles_xml_->get_content() : NULL);
_CP_LOG << L"[info] parse manifest" << std::endl;
parse_manifests(manifest_xml_ ? manifest_xml_->get_content() : NULL);
if (!office_mime_type_)
{
office_mime_type_ = GetMimetype(mimetype_content_file_);
}
_CP_LOG << L"[info] parse settings" << std::endl;
parse_settings(settings_xml_ ? settings_xml_->get_content() : NULL);
@ -214,7 +236,7 @@ odf_document::Impl::Impl(const std::wstring & srcPath, const ProgressCallback* C
_CP_LOG << L"[info] parse settings" << std::endl;
parse_settings(content_xml_->get_content());
tmp_folder_ = NSDirectory::CreateDirectoryWithUniqueName(NSDirectory::GetTempPath());
tmp_folder_ = NSDirectory::CreateDirectoryWithUniqueName(tempPath);
}
}
@ -225,11 +247,183 @@ odf_document::Impl::~Impl()
if (!tmp_folder_.empty())
NSDirectory::DeleteDirectory(tmp_folder_);
}
bool odf_document::Impl::decrypt_folder (const std::wstring &password, const std::wstring & srcPath, const std::wstring & dstPath)
{
std::vector<std::wstring> arFiles = NSDirectory::GetFiles(srcPath, false);
std::vector<std::wstring> arDirectories = NSDirectory::GetDirectories(srcPath);
bool result = true;
for (size_t i = 0; i < arFiles.size(); ++i)
{
std::wstring sFileName = NSFile::GetFileName(arFiles[i]);
std::map<std::wstring, std::pair<office_element_ptr, int>>::iterator pFind = map_encryptions_.find(arFiles[i]);
if ( pFind != map_encryptions_.end() )
{
result = decrypt_file(password, arFiles[i], dstPath + FILE_SEPARATOR_STR + sFileName, pFind->second.first, pFind->second.second);
if (false == result)
break;
}
else
{
NSFile::CFileBinary::Copy(arFiles[i], dstPath + FILE_SEPARATOR_STR + sFileName);
}
}
for (size_t i = 0; result && i < arDirectories.size(); ++i)
{
std::wstring sDirName = NSFile::GetFileName(arDirectories[i]);
NSDirectory::CreateDirectory(dstPath + FILE_SEPARATOR_STR + sDirName);
result = decrypt_folder(password, arDirectories[i], dstPath + FILE_SEPARATOR_STR + sDirName);
}
return result;
}
std::string DecodeBase64(const std::wstring & value1)
{
int nLength = 0;
unsigned char *pData = NULL;
std::string result;
std::string value(value1.begin(), value1.end());
NSFile::CBase64Converter::Decode(value.c_str(), value.length(), pData, nLength);
if (pData)
{
result = std::string((char*)pData, nLength);
delete []pData; pData = NULL;
}
return result;
}
bool odf_document::Impl::decrypt_file (const std::wstring &password, const std::wstring & srcPath, const std::wstring & dstPath, office_element_ptr element, int file_size )
{
manifest_encryption_data* encryption_data = dynamic_cast<manifest_encryption_data*>(element.get());
if (!encryption_data) return false;
manifest_algorithm* algorithm = dynamic_cast<manifest_algorithm*>(encryption_data->algorithm_.get());
manifest_key_derivation* key_derivation = dynamic_cast<manifest_key_derivation*>(encryption_data->key_derivation_.get());
manifest_start_key_generation* start_key_generation = dynamic_cast<manifest_start_key_generation*>(encryption_data->start_key_generation_.get());
CRYPT::_odfCryptData cryptData;
if (key_derivation)
{
cryptData.saltValue = DecodeBase64(key_derivation->salt_);
cryptData.spinCount = key_derivation->iteration_count_;
cryptData.keySize = key_derivation->key_size_;
}
//------------------------------------------------------------------------------------------
if (start_key_generation)
{
if (std::wstring::npos != start_key_generation->start_key_generation_name_.find(L"sha"))
{
if (std::wstring::npos != start_key_generation->start_key_generation_name_.find(L"512"))
{
cryptData.start_hashAlgorithm = CRYPT_METHOD::SHA512;
}
if (std::wstring::npos != start_key_generation->start_key_generation_name_.find(L"256"))
{
cryptData.start_hashAlgorithm = CRYPT_METHOD::SHA256;
}
}
cryptData.start_hashSize = start_key_generation->key_size_;
}
//------------------------------------------------------------------------------------------
if (algorithm)
{
cryptData.initializationVector = DecodeBase64(algorithm->initialisation_vector_);
if (std::wstring::npos != algorithm->algorithm_name_.find(L"aes"))
{
if (std::wstring::npos != algorithm->algorithm_name_.find(L"cbc"))
cryptData.cipherAlgorithm = CRYPT_METHOD::AES_CBC;
else
cryptData.cipherAlgorithm = CRYPT_METHOD::AES_ECB;//??
}
else if (std::wstring::npos != algorithm->algorithm_name_.find(L"blowfish"))
{
cryptData.cipherAlgorithm = CRYPT_METHOD::Blowfish_CFB;
}
}
//------------------------------------------------------------------------------------------
if (encryption_data)
{
cryptData.checksum = DecodeBase64(encryption_data->checksum_);
cryptData.checksum_hashAlgorithm = CRYPT_METHOD::SHA1;
if (std::wstring::npos != encryption_data->checksum_type_.find(L"sha"))
{
if (std::wstring::npos != encryption_data->checksum_type_.find(L"512"))
{
cryptData.checksum_hashAlgorithm = CRYPT_METHOD::SHA512;
}
if (std::wstring::npos != encryption_data->checksum_type_.find(L"256"))
{
cryptData.checksum_hashAlgorithm = CRYPT_METHOD::SHA256;
}
}
size_t nPosChecksumSize = encryption_data->checksum_type_.find(L"-");
if (std::wstring::npos == nPosChecksumSize)
nPosChecksumSize = encryption_data->checksum_type_.find(L"/");
if (std::wstring::npos != nPosChecksumSize)
{
std::wstring strSize = encryption_data->checksum_type_.substr(nPosChecksumSize + 1);
if (strSize == L"1k")
{
cryptData.checksum_size = 1024;
}
else
{
//???
}
}
}
NSFile::CFileBinary file_inp;
if (false == file_inp.OpenFile(srcPath))
return false;
DWORD dwSizeRead = 0;
_UINT64 lengthRead = file_inp.GetFileSize();
unsigned char* data = new unsigned char[lengthRead];
unsigned char* data_out = NULL;
file_inp.ReadFile(data, lengthRead, dwSizeRead);
file_inp.CloseFile();
//------------------------------------------------------------------------------------------
CRYPT::ODFDecryptor decryptor;
decryptor.SetCryptData(cryptData);
bool result = decryptor.Decrypt(password, data, dwSizeRead, data_out, file_size);
delete []data;
//------------------------------------------------------------------------------------------------------------
if (result && data_out)
{
NSFile::CFileBinary file_out;
file_out.CreateFileW(dstPath);
file_out.WriteFile(data_out, file_size);
file_out.CloseFile();
delete []data_out;
}
return result;
}
const std::wstring & odf_document::Impl::get_temp_folder() const
{
return tmp_folder_original_;
}
const std::wstring & odf_document::Impl::get_folder() const
{
if (!base_folder_.empty()) return base_folder_;
else return tmp_folder_;
}
bool odf_document::Impl::UpdateProgress(long nComplete)
{
if (pCallBack)
@ -341,8 +535,16 @@ void odf_document::Impl::parse_manifests(office_element *element)
manifest_entry * entry = dynamic_cast<manifest_entry *>(elm.get());
if (!entry)continue;
if (entry->encryption_data_)
{
std::wstring file_path = entry->full_path_;
if (entry->full_path_ == L"content.xml" && entry->encryption_) encrypted = true;
XmlUtils::replace_all( file_path, L"/", FILE_SEPARATOR_STR);
file_path = base_folder_ + FILE_SEPARATOR_STR + file_path;
map_encryptions_.insert(std::make_pair(file_path, std::make_pair(entry->encryption_data_, entry->size)));
}
if (entry->full_path_ == L"/")
{

View File

@ -58,8 +58,9 @@ typedef shared_ptr<content_xml_t>::Type content_xml_t_ptr;
class odf_document::Impl
{
public:
Impl(const std::wstring & Folder, const ProgressCallback* CallBack);
Impl(xml::sax * Reader);
Impl(const std::wstring & SrcPath, const std::wstring & TempPath, const std::wstring & Password, const ProgressCallback* CallBack);
Impl(xml::sax * Reader, const std::wstring & TempPath);
virtual ~Impl();
odf_read_context & odf_context();
@ -72,19 +73,22 @@ public:
bool pptx_convert(oox::pptx_conversion_context & Context);
const std::wstring & get_folder() const;
const std::wstring & get_temp_folder() const;
const office_element * get_content() const;
office_element * get_content();
int get_office_mime_type() {return office_mime_type_;}
bool get_encrypted(){return encrypted;}
bool get_encrypted() {return (false == map_encryptions_.empty());}
bool get_error() {return bError;}
bool UpdateProgress(long Complete);
private:
const ProgressCallback* pCallBack;
short bUserStopConvert;
bool bError;
odf_read_context_ptr context_;
@ -93,6 +97,9 @@ private:
void parse_manifests(office_element *element);
void parse_settings (office_element *element);
bool decrypt_folder (const std::wstring &password, const std::wstring & srcPath, const std::wstring & dstPath);
bool decrypt_file (const std::wstring &password, const std::wstring & srcPath, const std::wstring & dstPath, office_element_ptr data, int size );
content_xml_t_ptr content_xml_;
content_xml_t_ptr styles_xml_;
content_xml_t_ptr meta_xml_;
@ -103,11 +110,13 @@ private:
std::wstring base_folder_;
std::wstring tmp_folder_;
std::wstring tmp_folder_original_;
int office_mime_type_;
bool encrypted;
int GetMimetype(std::wstring value);
std::map<std::wstring, std::pair<office_element_ptr, int>> map_encryptions_;
};

View File

@ -128,34 +128,111 @@ const wchar_t * office_document_settings::name = L"document-settings";
// manifest:manifest
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * manifest_manifest::ns = L"manifest";
const wchar_t * manifest_manifest::ns = L"manifest";
const wchar_t * manifest_manifest::name = L"manifest";
// manifest:file-entry
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * manifest_entry::ns = L"manifest";
const wchar_t * manifest_entry::name = L"file-entry";
const wchar_t * manifest_entry::ns = L"manifest";
const wchar_t * manifest_entry::name = L"file-entry";
void manifest_entry::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"manifest:media-type", media_type_, std::wstring(L""));
CP_APPLY_ATTR(L"manifest:full-path", full_path_, std::wstring(L""));
CP_APPLY_ATTR(L"manifest:size", size, 0);
}
void manifest_entry::add_child_element(cpdoccore::xml::sax *Reader, const std::wstring &Ns, const std::wstring &Name)
{
if CP_CHECK_NAME(L"manifest", L"encryption-data")
CP_CREATE_ELEMENT(encryption_);
{
CP_CREATE_ELEMENT(encryption_data_);
}
}
// manifest:file-entry
// manifest:encryption-data
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * manifest_encryption_data::ns = L"manifest";
const wchar_t * manifest_encryption_data::name = L"encryption-data";
void manifest_encryption_data::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"manifest:checksum", manifest_checksum_, std::wstring(L""));
CP_APPLY_ATTR(L"manifest:checksum-type", manifest_checksum_type_, std::wstring(L""));
CP_APPLY_ATTR(L"manifest:checksum", checksum_, std::wstring(L""));
CP_APPLY_ATTR(L"manifest:checksum-type", checksum_type_, std::wstring(L""));
size_t nFind = checksum_type_.find(L"#");
if (nFind != std::wstring::npos)
{
checksum_type_ = checksum_type_.substr(nFind + 1);
}
checksum_type_ = XmlUtils::GetLower(checksum_type_);
}
void manifest_encryption_data::add_child_element(cpdoccore::xml::sax *Reader, const std::wstring &Ns, const std::wstring &Name)
{
if CP_CHECK_NAME(L"manifest", L"algorithm")
{
CP_CREATE_ELEMENT(algorithm_);
}
else if CP_CHECK_NAME(L"manifest", L"key-derivation")
{
CP_CREATE_ELEMENT(key_derivation_);
}
else if CP_CHECK_NAME(L"manifest", L"start-key-generation")
{
CP_CREATE_ELEMENT(start_key_generation_);
}
}
// manifest:algorithm
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * manifest_algorithm::ns = L"manifest";
const wchar_t * manifest_algorithm::name = L"algorithm";
void manifest_algorithm::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"manifest:algorithm-name", algorithm_name_, std::wstring(L""));
CP_APPLY_ATTR(L"manifest:initialisation-vector", initialisation_vector_, std::wstring(L""));
size_t nFind = algorithm_name_.find(L"#");
if (nFind != std::wstring::npos)
{
algorithm_name_ = algorithm_name_.substr(nFind + 1);
}
algorithm_name_ = XmlUtils::GetLower(algorithm_name_);
}
// manifest:key-derivation
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * manifest_key_derivation::ns = L"manifest";
const wchar_t * manifest_key_derivation::name = L"key-derivation";
void manifest_key_derivation::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"manifest:key-derivation-name", key_derivation_name_, std::wstring(L""));
CP_APPLY_ATTR(L"manifest:key-size", key_size_, 16);
CP_APPLY_ATTR(L"manifest:iteration-count", iteration_count_, 1024);
CP_APPLY_ATTR(L"manifest:salt", salt_, std::wstring(L""));
size_t nFind = key_derivation_name_.find(L"#");
if (nFind != std::wstring::npos)
{
key_derivation_name_ = key_derivation_name_.substr(nFind + 1);
}
key_derivation_name_ = XmlUtils::GetLower(key_derivation_name_);
}
// manifest:start-key-generation
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * manifest_start_key_generation::ns = L"manifest";
const wchar_t * manifest_start_key_generation::name = L"start-key-generation";
void manifest_start_key_generation::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"manifest:start-key-generation-name", start_key_generation_name_, std::wstring(L""));
CP_APPLY_ATTR(L"manifest:key-size", key_size_, 20);
size_t nFind = start_key_generation_name_.find(L"#");
if (nFind != std::wstring::npos)
{
start_key_generation_name_ = start_key_generation_name_.substr(nFind + 1);
}
start_key_generation_name_ = XmlUtils::GetLower(start_key_generation_name_);
}
}
}

View File

@ -200,21 +200,21 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
std::wstring media_type_;
std::wstring full_path_;
std::wstring media_type_;
std::wstring full_path_;
int size;
office_element_ptr encryption_;
office_element_ptr encryption_data_;
};
CP_REGISTER_OFFICE_ELEMENT2(manifest_entry);
// manifest:encryption-data
class manifest_encryption_data : public office_element
{
public:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text){}
static const wchar_t * ns;
@ -226,15 +226,83 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
std::wstring manifest_checksum_;
std::wstring manifest_checksum_type_;
std::wstring checksum_;
std::wstring checksum_type_;
//childs
//manifest:algorithm
//manifest:key-derivation
office_element_ptr algorithm_;
office_element_ptr key_derivation_;
office_element_ptr start_key_generation_;
};
CP_REGISTER_OFFICE_ELEMENT2(manifest_encryption_data);
// manifest:algorithm
class manifest_algorithm : public office_element
{
public:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
virtual void add_text(const std::wstring & Text){}
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeManifestAlgorithm;
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_;
CPDOCCORE_DEFINE_VISITABLE();
std::wstring algorithm_name_;
std::wstring initialisation_vector_;
};
CP_REGISTER_OFFICE_ELEMENT2(manifest_algorithm);
// manifest:key_derivation
class manifest_key_derivation : public office_element
{
public:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
virtual void add_text(const std::wstring & Text){}
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeManifestKeyDerivation;
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_;
CPDOCCORE_DEFINE_VISITABLE();
std::wstring key_derivation_name_;
int key_size_;
int iteration_count_;
std::wstring salt_;
};
CP_REGISTER_OFFICE_ELEMENT2(manifest_key_derivation);
// manifest:start-key-generation
class manifest_start_key_generation : public office_element
{
public:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
virtual void add_text(const std::wstring & Text){}
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeManifestStartKeyGeneration;
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_;
CPDOCCORE_DEFINE_VISITABLE();
std::wstring start_key_generation_name_;
int key_size_;
};
CP_REGISTER_OFFICE_ELEMENT2(manifest_start_key_generation);
}
}

View File

@ -358,6 +358,10 @@ enum ElementType
typeManifestEntry,
typeManifestEncryptionData,
typeManifestAlgorithm,
typeManifestStartKeyGeneration,
typeManifestKeyDerivation,
typeOfficeSettings,
typeOfficeSettingsConfigItemSet,
typeOfficeSettingsConfigItem,

View File

@ -109,14 +109,20 @@ namespace svg_path
aChar = rStr[++io_rPos];
}
}
bool result = false;
if(!sNumberString.empty())
{
o_fRetval = boost::lexical_cast<double>(sNumberString);
return true;
try
{
o_fRetval = boost::lexical_cast<double>(sNumberString);
result = true;
}
catch(...)
{
}
}
return false;
return result;
}
bool importDoubleAndSpaces( double& o_fRetval, int& io_rPos, const std::wstring& rStr, const int nLen )

View File

@ -34,7 +34,6 @@
#include "../../../Common/DocxFormat/Source/Base/Nullable.h"
#include "../../../DesktopEditor/xml/include/xmlutils.h"
#include "../../../DesktopEditor/xml/src/xmllight_private.h"
#include "../../include/cpdoccore/xml/sax.h"
@ -73,7 +72,7 @@ public:
virtual NodeType next(int Depth);
private:
smart_ptr< XmlUtils::CXmlLiteReader_Private > xml_;
smart_ptr< XmlUtils::CXmlLiteReader > xml_;
};
@ -113,7 +112,7 @@ namespace
saxXmlLiteReader::saxXmlLiteReader(const wchar_t * FileName)
{
xml_ = new XmlUtils::CXmlLiteReader_Private();
xml_ = new XmlUtils::CXmlLiteReader();
xml_->FromFile(FileName);
@ -157,20 +156,14 @@ std::wstring saxXmlLiteReader::namespacePrefix()
{
if (xml_.IsInit() == false) return _T("");
xmlChar* pName = xmlTextReaderPrefix(xml_->getNativeReader());
if (NULL == pName)
return L"";
std::wstring sTemp = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)pName, (LONG)strlen((const char*)pName));
free(pName);
return sTemp;
return xml_->GetNamespacePrefix();
}
NodeType saxXmlLiteReader::nodeType()
{
if (xml_.IsInit() == false) return typeNone;
XmlUtils::XmlNodeType nTempType = (XmlUtils::XmlNodeType)xmlTextReaderNodeType(xml_->getNativeReader());
XmlUtils::XmlNodeType nTempType = xml_->GetNodeType();
return NodeTypeConvert(nTempType);
}
@ -214,14 +207,14 @@ bool saxXmlLiteReader::attrDefault()
{
if (xml_.IsInit() == false) return false;
return (FALSE != xmlTextReaderIsDefault(xml_->getNativeReader()));
return xml_->IsDefaultAttribute();
}
NodeType saxXmlLiteReader::next(int Depth)
{
if (xml_->ReadNextSiblingNode2(Depth))
{
XmlUtils::XmlNodeType nTempType = (XmlUtils::XmlNodeType)xmlTextReaderNodeType(xml_->getNativeReader());
XmlUtils::XmlNodeType nTempType = xml_->GetNodeType();
return NodeTypeConvert(nTempType);
}
else

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
WarningLevel="3"

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
WarningLevel="3"

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
WarningLevel="3"

View File

@ -45,7 +45,7 @@
AdditionalIncludeDirectories=""
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeLibrary="3"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"

View File

@ -46,6 +46,16 @@
#if defined(_WIN64)
#pragma comment(lib, "../../build/bin/icu/win_64/icuuc.lib")
#elif defined (_WIN32)
#if defined(_DEBUG)
#pragma comment(lib, "../../build/lib/win_32/DEBUG/graphics.lib")
#pragma comment(lib, "../../build/lib/win_32/DEBUG/kernel.lib")
#pragma comment(lib, "../../build/lib/win_32/DEBUG/UnicodeConverter.lib")
#else
#pragma comment(lib, "../../build/lib/win_32/graphics.lib")
#pragma comment(lib, "../../build/lib/win_32/kernel.lib")
#pragma comment(lib, "../../build/lib/win_32/UnicodeConverter.lib")
#endif
#pragma comment(lib, "../../build/bin/icu/win_32/icuuc.lib")
#endif
@ -86,14 +96,16 @@ HRESULT convert_single(std::wstring srcFileName)
Oox2Odf::Converter converter(srcTempPath, type, L"C:\\Windows\\Fonts", NULL);
std::wstring sPassword = L"password";
converter.convert();
converter.write(dstTempPath);
converter.write(dstTempPath, srcTempPath, sPassword);
NSDirectory::DeleteDirectory(srcTempPath);
if (hr != S_OK) return hr;
if (S_OK != oCOfficeUtils.CompressFileOrDirectory(dstTempPath.c_str(), dstPath.c_str(), -1))
if (S_OK != oCOfficeUtils.CompressFileOrDirectory(dstTempPath.c_str(), dstPath.c_str(), false, sPassword.empty() ? Z_DEFLATED : 0))
return hr;
NSDirectory::DeleteDirectory(dstTempPath);

View File

@ -7,86 +7,39 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Oox2OdfConverter", "..\sour
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFileWriterTest", "OdfFileWTest.vcproj", "{FBA8446A-150F-4A10-B4DA-1022048D6473}"
ProjectSection(ProjectDependencies) = postProject
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
{609ED938-3CA8-4BED-B363-25096D4C4812} = {609ED938-3CA8-4BED-B363-25096D4C4812}
{BEE01B53-244A-44E6-8947-ED9342D9247E} = {BEE01B53-244A-44E6-8947-ED9342D9247E}
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD} = {E5A67556-44DA-4481-8F87-0A3AEDBD20DD}
{94954A67-A853-43B1-A727-6EF2774C5A6A} = {94954A67-A853-43B1-A727-6EF2774C5A6A}
{36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302}
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF} = {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}
{94954A67-A853-43B1-A727-6EF2774C5A6A} = {94954A67-A853-43B1-A727-6EF2774C5A6A}
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD} = {E5A67556-44DA-4481-8F87-0A3AEDBD20DD}
{BEE01B53-244A-44E6-8947-ED9342D9247E} = {BEE01B53-244A-44E6-8947-ED9342D9247E}
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
{609ED938-3CA8-4BED-B363-25096D4C4812} = {609ED938-3CA8-4BED-B363-25096D4C4812}
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C} = {C27E9A9F-3A17-4482-9C5F-BF15C01E747C}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\..\Common\DocxFormat\Projects\DocxFormat2005.vcproj", "{A100103A-353E-45E8-A9B8-90B87CC5C0B0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormulasConvert", "..\..\ASCOfficeOdfFile\win32\formulasconvert.vcproj", "{94954A67-A853-43B1-A727-6EF2774C5A6A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\..\DesktopEditor\graphics\graphics_vs2005.vcproj", "{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}"
ProjectSection(ProjectDependencies) = postProject
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfCommon", "..\..\ASCOfficeOdfFile\win32\cpcommon.vcproj", "{609ED938-3CA8-4BED-B363-25096D4C4812}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raster", "..\..\DesktopEditor\raster\raster_vs2005.vcproj", "{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}"
ProjectSection(ProjectDependencies) = postProject
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1} = {EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig2", "..\..\DesktopEditor\raster\JBig2\win32\jbig2.vcproj", "{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cximage", "..\..\DesktopEditor\cximage\CxImage\cximage_vs2005.vcproj", "{BC52A07C-A797-423D-8C4F-8678805BBB36}"
ProjectSection(ProjectDependencies) = postProject
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239} = {764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
{818753F2-DBB9-4D3B-898A-A604309BE470} = {818753F2-DBB9-4D3B-898A-A604309BE470}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jasper", "..\..\DesktopEditor\cximage\jasper\jasper_vs2005.vcproj", "{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig", "..\..\DesktopEditor\cximage\jbig\jbig_vs2005.vcproj", "{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "..\..\DesktopEditor\cximage\jpeg\Jpeg_vs2005.vcproj", "{818753F2-DBB9-4D3B-898A-A604309BE470}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpsd", "..\..\DesktopEditor\cximage\libpsd\libpsd_vs2005.vcproj", "{9A037A69-D1DF-4505-AB2A-6CB3641C476E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mng", "..\..\DesktopEditor\cximage\mng\mng_vs2005.vcproj", "{40A69F40-063E-43FD-8543-455495D8733E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "png", "..\..\DesktopEditor\cximage\png\png_vs2005.vcproj", "{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdcr", "..\..\DesktopEditor\cximage\raw\libdcr_vs2005.vcproj", "{DF861D33-9BC1-418C-82B1-581F590FE169}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\DesktopEditor\cximage\tiff\Tiff_vs2005.vcproj", "{0588563C-F05C-428C-B21A-DD74756628B3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "font_engine", "..\..\DesktopEditor\fontengine\font_engine_vs2005.vcproj", "{C739151F-5384-41DF-A1A6-F089E2C1AD56}"
ProjectSection(ProjectDependencies) = postProject
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "..\..\DesktopEditor\freetype-2.5.2\builds\windows\vc2005\freetype.vcproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeUtilsLib", "..\..\OfficeUtils\win32\OfficeUtilsLib.vcproj", "{F8274B05-168E-4D6E-B843-AA7510725363}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "agg2d", "..\..\DesktopEditor\agg-2.4\agg_vs2005.vcproj", "{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPTXFormat", "..\..\ASCOfficePPTXFile\PPTXLib\PPTXFormat.vcproj", "{36636678-AE25-4BE6-9A34-2561D1BCF302}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml2", "..\..\DesktopEditor\xml\build\vs2005\libxml2.vcproj", "{21663823-DE45-479B-91D0-B4FEF4916EF0}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeFileCrypt", "..\..\OfficeCryptReader\win32\ECMACryptReader.vcproj", "{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}"
ProjectSection(ProjectDependencies) = postProject
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF} = {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cryptlib", "..\..\Common\3dParty\cryptopp\cryptlib.vcproj", "{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
DLL-Import Debug|Win32 = DLL-Import Debug|Win32
DLL-Import Debug|x64 = DLL-Import Debug|x64
DLL-Import Release|Win32 = DLL-Import Release|Win32
DLL-Import Release|x64 = DLL-Import Release|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
@ -95,6 +48,14 @@ Global
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}.Debug|Win32.Build.0 = Debug|Win32
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}.Debug|x64.ActiveCfg = Debug|x64
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}.Debug|x64.Build.0 = Debug|x64
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}.DLL-Import Debug|x64.Build.0 = Debug|x64
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}.DLL-Import Release|Win32.Build.0 = Release|Win32
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}.DLL-Import Release|x64.ActiveCfg = Release|x64
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}.DLL-Import Release|x64.Build.0 = Release|x64
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}.Release|Win32.ActiveCfg = Release|Win32
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}.Release|Win32.Build.0 = Release|Win32
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}.Release|x64.ActiveCfg = Release|x64
@ -103,6 +64,14 @@ Global
{BEE01B53-244A-44E6-8947-ED9342D9247E}.Debug|Win32.Build.0 = Debug|Win32
{BEE01B53-244A-44E6-8947-ED9342D9247E}.Debug|x64.ActiveCfg = Debug|x64
{BEE01B53-244A-44E6-8947-ED9342D9247E}.Debug|x64.Build.0 = Debug|x64
{BEE01B53-244A-44E6-8947-ED9342D9247E}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{BEE01B53-244A-44E6-8947-ED9342D9247E}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{BEE01B53-244A-44E6-8947-ED9342D9247E}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{BEE01B53-244A-44E6-8947-ED9342D9247E}.DLL-Import Debug|x64.Build.0 = Debug|x64
{BEE01B53-244A-44E6-8947-ED9342D9247E}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{BEE01B53-244A-44E6-8947-ED9342D9247E}.DLL-Import Release|Win32.Build.0 = Release|Win32
{BEE01B53-244A-44E6-8947-ED9342D9247E}.DLL-Import Release|x64.ActiveCfg = Release|x64
{BEE01B53-244A-44E6-8947-ED9342D9247E}.DLL-Import Release|x64.Build.0 = Release|x64
{BEE01B53-244A-44E6-8947-ED9342D9247E}.Release|Win32.ActiveCfg = Release|Win32
{BEE01B53-244A-44E6-8947-ED9342D9247E}.Release|Win32.Build.0 = Release|Win32
{BEE01B53-244A-44E6-8947-ED9342D9247E}.Release|x64.ActiveCfg = Release|x64
@ -111,6 +80,14 @@ Global
{FBA8446A-150F-4A10-B4DA-1022048D6473}.Debug|Win32.Build.0 = Debug|Win32
{FBA8446A-150F-4A10-B4DA-1022048D6473}.Debug|x64.ActiveCfg = Debug|x64
{FBA8446A-150F-4A10-B4DA-1022048D6473}.Debug|x64.Build.0 = Debug|x64
{FBA8446A-150F-4A10-B4DA-1022048D6473}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{FBA8446A-150F-4A10-B4DA-1022048D6473}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{FBA8446A-150F-4A10-B4DA-1022048D6473}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{FBA8446A-150F-4A10-B4DA-1022048D6473}.DLL-Import Debug|x64.Build.0 = Debug|x64
{FBA8446A-150F-4A10-B4DA-1022048D6473}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{FBA8446A-150F-4A10-B4DA-1022048D6473}.DLL-Import Release|Win32.Build.0 = Release|Win32
{FBA8446A-150F-4A10-B4DA-1022048D6473}.DLL-Import Release|x64.ActiveCfg = Release|x64
{FBA8446A-150F-4A10-B4DA-1022048D6473}.DLL-Import Release|x64.Build.0 = Release|x64
{FBA8446A-150F-4A10-B4DA-1022048D6473}.Release|Win32.ActiveCfg = Release|Win32
{FBA8446A-150F-4A10-B4DA-1022048D6473}.Release|Win32.Build.0 = Release|Win32
{FBA8446A-150F-4A10-B4DA-1022048D6473}.Release|x64.ActiveCfg = Release|x64
@ -119,6 +96,14 @@ Global
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|Win32.Build.0 = Debug|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|x64.ActiveCfg = Debug|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|x64.Build.0 = Debug|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Debug|x64.Build.0 = Debug|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Release|Win32.Build.0 = Release|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Release|x64.ActiveCfg = Release|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Release|x64.Build.0 = Release|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|Win32.ActiveCfg = Release|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|Win32.Build.0 = Release|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|x64.ActiveCfg = Release|x64
@ -127,162 +112,82 @@ Global
{94954A67-A853-43B1-A727-6EF2774C5A6A}.Debug|Win32.Build.0 = Debug|Win32
{94954A67-A853-43B1-A727-6EF2774C5A6A}.Debug|x64.ActiveCfg = Debug|x64
{94954A67-A853-43B1-A727-6EF2774C5A6A}.Debug|x64.Build.0 = Debug|x64
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Debug|x64.Build.0 = Debug|x64
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Release|Win32.Build.0 = Release|Win32
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Release|x64.ActiveCfg = Release|x64
{94954A67-A853-43B1-A727-6EF2774C5A6A}.DLL-Import Release|x64.Build.0 = Release|x64
{94954A67-A853-43B1-A727-6EF2774C5A6A}.Release|Win32.ActiveCfg = Release|Win32
{94954A67-A853-43B1-A727-6EF2774C5A6A}.Release|Win32.Build.0 = Release|Win32
{94954A67-A853-43B1-A727-6EF2774C5A6A}.Release|x64.ActiveCfg = Release|x64
{94954A67-A853-43B1-A727-6EF2774C5A6A}.Release|x64.Build.0 = Release|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|Win32.ActiveCfg = Debug|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|Win32.Build.0 = Debug|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|x64.ActiveCfg = Debug|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|x64.Build.0 = Debug|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|Win32.ActiveCfg = Release|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|Win32.Build.0 = Release|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|x64.ActiveCfg = Release|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|x64.Build.0 = Release|x64
{609ED938-3CA8-4BED-B363-25096D4C4812}.Debug|Win32.ActiveCfg = Debug|Win32
{609ED938-3CA8-4BED-B363-25096D4C4812}.Debug|Win32.Build.0 = Debug|Win32
{609ED938-3CA8-4BED-B363-25096D4C4812}.Debug|x64.ActiveCfg = Debug|x64
{609ED938-3CA8-4BED-B363-25096D4C4812}.Debug|x64.Build.0 = Debug|x64
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Debug|x64.Build.0 = Debug|x64
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Release|Win32.Build.0 = Release|Win32
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Release|x64.ActiveCfg = Release|x64
{609ED938-3CA8-4BED-B363-25096D4C4812}.DLL-Import Release|x64.Build.0 = Release|x64
{609ED938-3CA8-4BED-B363-25096D4C4812}.Release|Win32.ActiveCfg = Release|Win32
{609ED938-3CA8-4BED-B363-25096D4C4812}.Release|Win32.Build.0 = Release|Win32
{609ED938-3CA8-4BED-B363-25096D4C4812}.Release|x64.ActiveCfg = Release|x64
{609ED938-3CA8-4BED-B363-25096D4C4812}.Release|x64.Build.0 = Release|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|Win32.ActiveCfg = Debug|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|Win32.Build.0 = Debug|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|x64.ActiveCfg = Debug|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|x64.Build.0 = Debug|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|Win32.ActiveCfg = Release|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|Win32.Build.0 = Release|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|x64.ActiveCfg = Release|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|x64.Build.0 = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|Win32.ActiveCfg = Debug|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|Win32.Build.0 = Debug|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|x64.ActiveCfg = Debug|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|x64.Build.0 = Debug|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|Win32.ActiveCfg = Release|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|Win32.Build.0 = Release|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|x64.ActiveCfg = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|x64.Build.0 = Release|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|Win32.ActiveCfg = Debug|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|Win32.Build.0 = Debug|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|x64.ActiveCfg = Debug|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|x64.Build.0 = Debug|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|Win32.ActiveCfg = Release|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|Win32.Build.0 = Release|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|x64.ActiveCfg = Release|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|x64.Build.0 = Release|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|Win32.ActiveCfg = Debug|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|Win32.Build.0 = Debug|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|x64.ActiveCfg = Debug|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|x64.Build.0 = Debug|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|Win32.ActiveCfg = Release|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|Win32.Build.0 = Release|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|x64.ActiveCfg = Release|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|x64.Build.0 = Release|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|Win32.ActiveCfg = Debug|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|Win32.Build.0 = Debug|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|x64.ActiveCfg = Debug|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|x64.Build.0 = Debug|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|Win32.ActiveCfg = Release|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|Win32.Build.0 = Release|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|x64.ActiveCfg = Release|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|x64.Build.0 = Release|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|Win32.ActiveCfg = Debug|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|Win32.Build.0 = Debug|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|x64.ActiveCfg = Debug|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|x64.Build.0 = Debug|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|Win32.ActiveCfg = Release|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|Win32.Build.0 = Release|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|x64.ActiveCfg = Release|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|x64.Build.0 = Release|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|Win32.ActiveCfg = Debug|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|Win32.Build.0 = Debug|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|x64.ActiveCfg = Debug|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|x64.Build.0 = Debug|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|Win32.ActiveCfg = Release|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|Win32.Build.0 = Release|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|x64.ActiveCfg = Release|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|x64.Build.0 = Release|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|Win32.ActiveCfg = Debug|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|Win32.Build.0 = Debug|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|x64.ActiveCfg = Debug|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|x64.Build.0 = Debug|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Release|Win32.ActiveCfg = Release|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Release|Win32.Build.0 = Release|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Release|x64.ActiveCfg = Release|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Release|x64.Build.0 = Release|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|Win32.ActiveCfg = Debug|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|Win32.Build.0 = Debug|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|x64.ActiveCfg = Debug|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|x64.Build.0 = Debug|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|Win32.ActiveCfg = Release|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|Win32.Build.0 = Release|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|x64.ActiveCfg = Release|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|x64.Build.0 = Release|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|Win32.ActiveCfg = Debug|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|Win32.Build.0 = Debug|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|x64.ActiveCfg = Debug|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|x64.Build.0 = Debug|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|Win32.ActiveCfg = Release|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|Win32.Build.0 = Release|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|x64.ActiveCfg = Release|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|x64.Build.0 = Release|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|Win32.ActiveCfg = Debug|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|Win32.Build.0 = Debug|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|x64.ActiveCfg = Debug|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|x64.Build.0 = Debug|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|Win32.ActiveCfg = Release|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|Win32.Build.0 = Release|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|x64.ActiveCfg = Release|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|x64.Build.0 = Release|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|Win32.ActiveCfg = Debug|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|Win32.Build.0 = Debug|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|x64.ActiveCfg = Debug|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|x64.Build.0 = Debug|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|Win32.ActiveCfg = Release|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|Win32.Build.0 = Release|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|x64.ActiveCfg = Release|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|x64.Build.0 = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.ActiveCfg = Debug|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.Build.0 = Debug|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.ActiveCfg = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.Build.0 = Release|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|Win32.ActiveCfg = Debug|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|Win32.Build.0 = Debug|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|x64.ActiveCfg = Debug|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|x64.Build.0 = Debug|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|Win32.ActiveCfg = Release|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|Win32.Build.0 = Release|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|x64.ActiveCfg = Release|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|x64.Build.0 = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|Win32.ActiveCfg = Debug|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|Win32.Build.0 = Debug|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|x64.ActiveCfg = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|x64.Build.0 = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|Win32.ActiveCfg = Release|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|Win32.Build.0 = Release|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|x64.ActiveCfg = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|x64.Build.0 = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|Win32.ActiveCfg = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|Win32.Build.0 = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|x64.ActiveCfg = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|x64.Build.0 = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Debug|x64.Build.0 = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Release|Win32.Build.0 = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Release|x64.ActiveCfg = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Release|x64.Build.0 = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|Win32.ActiveCfg = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|Win32.Build.0 = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|x64.ActiveCfg = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|x64.Build.0 = Release|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.ActiveCfg = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.Build.0 = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|x64.ActiveCfg = Debug|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|x64.Build.0 = Debug|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.ActiveCfg = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.Build.0 = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|x64.ActiveCfg = Release|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|x64.Build.0 = Release|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Debug|Win32.ActiveCfg = Debug|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Debug|Win32.Build.0 = Debug|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Debug|x64.ActiveCfg = Debug|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Debug|x64.Build.0 = Debug|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Debug|x64.Build.0 = Debug|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Release|Win32.Build.0 = Release|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Release|x64.ActiveCfg = Release|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.DLL-Import Release|x64.Build.0 = Release|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Release|Win32.ActiveCfg = Release|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Release|Win32.Build.0 = Release|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Release|x64.ActiveCfg = Release|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.Release|x64.Build.0 = Release|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|Win32.ActiveCfg = Debug|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|Win32.Build.0 = Debug|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|x64.ActiveCfg = Debug|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|x64.Build.0 = Debug|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Debug|Win32.ActiveCfg = DLL-Import Debug|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Debug|Win32.Build.0 = DLL-Import Debug|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Debug|x64.ActiveCfg = DLL-Import Debug|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Debug|x64.Build.0 = DLL-Import Debug|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Release|Win32.ActiveCfg = DLL-Import Release|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Release|Win32.Build.0 = DLL-Import Release|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Release|x64.ActiveCfg = DLL-Import Release|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Release|x64.Build.0 = DLL-Import Release|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|Win32.ActiveCfg = Release|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|Win32.Build.0 = Release|Win32
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|x64.ActiveCfg = Release|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;__WORDSIZE=32;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)\OdfFileWriterTest.pdb"
WarningLevel="3"
@ -67,7 +67,7 @@
Name="VCLinkerTool"
AdditionalDependencies="&#x0D;&#x0A;Rpcrt4.lib"
LinkIncremental="2"
IgnoreDefaultLibraryNames="MSVCRTD.lib"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
@ -333,18 +333,6 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\Common\FileDownloader\FileDownloader_win.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\Common\3dParty\pole\pole.cpp"
>
@ -357,42 +345,6 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\UnicodeConverter\UnicodeConverter.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\DesktopEditor\xml\src\xmldom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\DesktopEditor\xml\src\xmllight.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
<Filter
Name="oox"
>

View File

@ -21,14 +21,10 @@ include($$PWD/../../Common/3dParty/boost/boost.pri)
DEFINES += UNICODE \
_UNICODE \
_USE_LIBXML2_READER_ \
LIBXML_READER_ENABLED \
DONT_WRITE_EMBEDDED_FONTS
INCLUDEPATH += ../../DesktopEditor/freetype-2.5.2/include
INCLUDEPATH += ../../ASCOfficeOdfFile/include
INCLUDEPATH += ../../ASCOfficeOdfFile/src/odf/datatypes
INCLUDEPATH += ../../DesktopEditor/xml/libxml2/include
CONFIG(debug, debug|release){
DEFINES += _DEBUG
@ -41,6 +37,8 @@ SOURCES += \
core_debug {
SOURCES += \
../source/utils.cpp \
../source/OdfFormat/office_document.cpp \
../source/OdfFormat/abstract_xml.cpp \
../source/OdfFormat/calcext_elements.cpp \
../source/OdfFormat/draw_base.cpp \
@ -118,6 +116,7 @@ SOURCES += \
../source/Oox2OdfConverter/PptxConverter.cpp
HEADERS += \
../source/OdfFormat/office_document.h \
../source/OdfFormat/abstract_xml.h \
../source/OdfFormat/calcext_elements.h \
../source/OdfFormat/draw_base.h \

View File

@ -29,6 +29,15 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#ifndef min
#define min(a,b) ((a) < (b) ? (a) : (b))
#endif
#ifndef max
#define max(a,b) ((a) > (b) ? (a) : (b))
#endif
#include "../source/OdfFormat/office_document.cpp"
#include "../source/OdfFormat/calcext_elements.cpp"
#include "../source/OdfFormat/draw_base.cpp"
#include "../source/OdfFormat/draw_frame.cpp"
@ -93,3 +102,4 @@
#include "../source/OdfFormat/style_presentation.cpp"
#include "../source/OdfFormat/office_scripts.cpp"
#include "../source/OdfFormat/office_event_listeners.cpp"
#include "../source/utils.cpp"

View File

@ -60,7 +60,7 @@ void _mediaitems::add_or_find(const std::wstring & oox_ref, Type type, std::wst
{
std::wstring output_sub_path;
std::wstring output_fileName;
int number=0;
size_t number = 0;
if (type == typeImage)
{

View File

@ -40,6 +40,7 @@
#include "../../../DesktopEditor/common/Directory.h"
#include "../../../Common/DocxFormat/Source/SystemUtility/SystemUtility.h"
#include "../../../Common/3dParty/cryptopp/osrng.h"
namespace cpdoccore
{
@ -56,7 +57,7 @@ namespace odf_writer
content_utf8_ = std::string( Content.begin(), Content.end());
}
void simple_element::write(const std::wstring & RootPath)
void simple_element::write(const std::wstring & RootPath, bool add_padding)
{
NSFile::CFileBinary file;
@ -65,9 +66,34 @@ namespace odf_writer
if (utf8_)
{
std::string root = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
file.WriteFile((BYTE*)root.c_str(), root.length());
file.WriteFile((BYTE*)root.c_str(), (DWORD)root.length());
if (add_padding)
{
CryptoPP::RandomPool prng;
CryptoPP::SecByteBlock padding(1024);
CryptoPP::OS_GenerateRandomBlock(false, padding, padding.size());
prng.IncorporateEntropy(padding, padding.size());
std::string padding_start = "<!-- ";
std::string padding_end = "-->";
file.WriteFile((BYTE*)padding_start.c_str(), (DWORD)padding_start.length());
//--------------------------------
int nLength = 0;
char *pData = NULL;
NSFile::CBase64Converter::Encode(padding.data(), padding.size(), pData, nLength, NSBase64::B64_BASE64_FLAG_NOCRLF);
if (pData)
{
file.WriteFile((BYTE*)pData, nLength);
delete []pData; pData = NULL;
}
//--------------------------------
file.WriteFile((BYTE*)padding_end.c_str(), (DWORD)padding_end.length());
}
}
file.WriteFile((BYTE*)content_utf8_.c_str(), content_utf8_.length());
file.WriteFile((BYTE*)content_utf8_.c_str(), (DWORD)content_utf8_.length());
file.CloseFile();
}
@ -89,10 +115,9 @@ namespace odf_writer
//-------------------------------------------------------------------------------
void manifect_file::add_rels(rels & r)
{
std::vector<relationship> & rels = r.relationships();
for (size_t i = 0; i < rels.size(); i++)
for (size_t i = 0; i < r.relationships_.size(); i++)
{
rels_.add(rels[i]);
rels_.add(r.relationships_[i]);
}
}
manifect_file::manifect_file(std::wstring t)
@ -103,7 +128,7 @@ namespace odf_writer
{
type_ = t;
}
void mimetype_file::write(const std::wstring & RootPath)
void mimetype_file::write(const std::wstring & RootPath, bool add_padding)
{
std::wstringstream resStream;
@ -111,9 +136,9 @@ namespace odf_writer
resStream << type_;
simple_element elm(L"mimetype", resStream.str(),false);
elm.write(RootPath);
elm.write(RootPath, false);
}
void manifect_file::write(const std::wstring & RootPath)
void manifect_file::write(const std::wstring & RootPath, bool add_padding)
{
std::wstringstream resStream;
@ -129,10 +154,10 @@ namespace odf_writer
std::wstring path = RootPath + FILE_SEPARATOR_STR + L"META-INF";
NSDirectory::CreateDirectory(path);
simple_element elm(L"manifest.xml", resStream.str());
elm.write(path);
elm.write(path, false);
}
void meta_file::write(const std::wstring & RootPath)
void meta_file::write(const std::wstring & RootPath, bool add_padding)
{
std::wstringstream resStream;
CP_XML_WRITER(resStream)
@ -175,14 +200,14 @@ namespace odf_writer
}
simple_element elm(L"meta.xml", resStream.str());
elm.write(RootPath);
elm.write(RootPath, add_padding);
}
//-------------------------------------------------------------------------------
media::media(_mediaitems & mediaitems, const std::wstring internal_folder, int type) : mediaitems_(mediaitems), type_(type), folder_(internal_folder)
media_files::media_files(_mediaitems & mediaitems, const std::wstring internal_folder, int type) : mediaitems_(mediaitems), type_(type), folder_(internal_folder)
{
}
void media::write(const std::wstring & RootPath)
void media_files::write(const std::wstring & RootPath, bool add_padding)
{
OOX::CPath path (RootPath + (folder_.empty() ? L"" : FILE_SEPARATOR_STR) + folder_);
NSDirectory::CreateDirectory(path.GetPath());
@ -204,48 +229,48 @@ namespace odf_writer
//-------------------------------------------------------------------------------
void object_files::set_content(content_content_ptr & _content)
{
content_.set_content(_content);
meta_ = element_ptr(new meta_file());
content.set_content(_content);
meta = element_ptr(new meta_file());
}
void object_files::set_mediaitems(_mediaitems & mediaitems)
{
if (mediaitems.count_image > 0)
{
pictures_ = element_ptr( new media(mediaitems, L"Pictures", 1) );
pictures = element_ptr( new media_files(mediaitems, L"Pictures", 1) );
}
if (mediaitems.count_media > 0)
{
media_ = element_ptr( new media(mediaitems, L"Media", 2) );
media = element_ptr( new media_files(mediaitems, L"Media", 2) );
}
if (mediaitems.count_object > 0)
{
oleObjects_ = element_ptr( new media(mediaitems, L"", 3) );
oleObjects = element_ptr( new media_files(mediaitems, L"", 3) );
}
if (mediaitems.count_object > 0)
{
imageObjects_ = element_ptr( new media(mediaitems, L"ObjectReplacements", 4) );
imageObjects = element_ptr( new media_files(mediaitems, L"ObjectReplacements", 4) );
}
}
void object_files::set_styles(content_simple_ptr & _content)
{
styles_.set_content(_content);
styles.set_content(_content);
}
void object_files::set_settings(content_simple_ptr & _content)
{
settings_.set_content(_content);
settings.set_content(_content);
}
void object_files::write(const std::wstring & RootPath)
void object_files::write(const std::wstring & RootPath, bool add_padding)
{
content_.write(RootPath);
styles_.write(RootPath);
settings_.write(RootPath);
content.write(RootPath, add_padding);
styles.write(RootPath, add_padding);
settings.write(RootPath, add_padding);
if (meta_) meta_->write(RootPath);
if (meta) meta->write(RootPath, add_padding);
if (media_) media_->write(RootPath);
if (pictures_) pictures_->write(RootPath);
if (oleObjects_) oleObjects_->write(RootPath);
if (imageObjects_) imageObjects_->write(RootPath);
if (media) media->write(RootPath, add_padding);
if (pictures) pictures->write(RootPath, add_padding);
if (oleObjects) oleObjects->write(RootPath, add_padding);
if (imageObjects) imageObjects->write(RootPath, add_padding);
}
void odf_document::add_object(element_ptr _object, bool root)
@ -272,23 +297,30 @@ namespace odf_writer
manifest_ = element_ptr(new manifect_file(type));
mimetype_ = element_ptr(new mimetype_file(type));
}
void odf_document::write(const std::wstring & RootPath)
void odf_document::write_manifest(const std::wstring & RootPath)
{
if (base_)base_->write(RootPath);
if (mimetype_)
mimetype_->write(RootPath);
if (manifest_)
manifest_->write(RootPath);
}
void odf_document::write(const std::wstring & RootPath, bool add_padding)
{
if (base_)base_->write(RootPath, add_padding);
for (size_t i = 0; i < objects_.size(); i++)
{
std::wstring path = RootPath + FILE_SEPARATOR_STR + objects_[i]->local_path;
NSDirectory::CreateDirectory(path);
objects_[i]->write(path);
objects_[i]->write(path, add_padding);
}
if (manifest_) manifest_->write(RootPath);
if (mimetype_) mimetype_->write(RootPath);
if (settings_) settings_->write(RootPath);
if (manifest_) manifest_->write(RootPath, add_padding);
if (mimetype_) mimetype_->write(RootPath, add_padding);
if (settings_) settings_->write(RootPath, add_padding);
}
void content_file::write(const std::wstring & RootPath)
void content_file::write(const std::wstring & RootPath, bool add_padding)
{
std::wstringstream resStream;
CP_XML_WRITER(resStream)
@ -339,24 +371,24 @@ namespace odf_writer
CP_XML_ATTR(L"office:version", L"1.2");
CP_XML_NODE(L"office:font-face-decls");
if (content_)
if (content)
{
CP_XML_STREAM() << content_->styles_str();
CP_XML_STREAM() << content->styles_str();
}
CP_XML_NODE(L"office:body")
{
if (content_)
if (content)
{
CP_XML_STREAM() << content_->content_str();
CP_XML_STREAM() << content->content_str();
}
}
}
}
simple_element elm(L"content.xml", resStream.str());
elm.write(RootPath);
elm.write(RootPath, add_padding);
}
void styles_file::write(const std::wstring & RootPath)
void styles_file::write(const std::wstring & RootPath, bool add_padding)
{
std::wstringstream resStream;
CP_XML_WRITER(resStream)
@ -414,9 +446,9 @@ namespace odf_writer
}
simple_element elm(L"styles.xml", resStream.str());
elm.write(RootPath);
elm.write(RootPath, add_padding);
}
void settings_file::write(const std::wstring & RootPath)
void settings_file::write(const std::wstring & RootPath, bool add_padding)
{
std::wstringstream resStream;
CP_XML_WRITER(resStream)
@ -438,7 +470,7 @@ namespace odf_writer
}
simple_element elm(L"settings.xml", resStream.str());
elm.write(RootPath);
elm.write(RootPath, add_padding);
}
}
}

View File

@ -44,8 +44,6 @@ namespace cpdoccore
namespace odf_writer
{
class _mediaitems;//picture & media
class rels;
namespace package
{
@ -91,7 +89,7 @@ namespace odf_writer
public:
virtual ~element() = 0;
virtual void write(const std::wstring & RootPath) = 0;
virtual void write(const std::wstring & RootPath, bool add_padding = false) = 0;
std::wstring local_path;
private:
element * element_;
@ -107,35 +105,35 @@ namespace odf_writer
simple_element(const std::wstring & FileName, const std::wstring & Content, bool utf8 = true);
static element_ptr create(const std::wstring & FileName, const std::wstring & Content, bool utf8 = true);
virtual void write(const std::wstring & RootPath);
virtual void write(const std::wstring & RootPath, bool add_padding = false);
private:
std::wstring file_name_;
std::string content_utf8_;
bool utf8_;
std::wstring file_name_;
std::string content_utf8_;
bool utf8_;
};
class meta_file : public element
{
public:
virtual void write(const std::wstring & RootPath);
virtual void write(const std::wstring & RootPath, bool add_padding = false);
};
class content_file : public element
{
public:
void set_content(content_content_ptr & c){content_ = c;}
virtual void write(const std::wstring & RootPath);
void set_content(content_content_ptr & c){content = c;}
virtual void write(const std::wstring & RootPath, bool add_padding = false);
content_content_ptr content_;
content_content_ptr content;
};
class styles_file : public element
{
public:
void set_content(content_simple_ptr & c) {content_ = c;}
virtual void write(const std::wstring & RootPath);
virtual void write(const std::wstring & RootPath, bool add_padding = false);
content_simple_ptr content_;
};
@ -143,7 +141,7 @@ namespace odf_writer
{
public:
void set_content(content_simple_ptr & c) {content_ = c;}
virtual void write(const std::wstring & RootPath);
virtual void write(const std::wstring & RootPath, bool add_padding = false);
content_simple_ptr content_;
};
@ -152,9 +150,11 @@ namespace odf_writer
public:
manifect_file(std::wstring type);
virtual void write(const std::wstring & RootPath);
virtual void write(const std::wstring & RootPath, bool add_padding = false);
void add_rels(rels & r);
rels *get_rels() {return &rels_;}
private:
rels rels_;
std::wstring type_;
@ -165,17 +165,17 @@ namespace odf_writer
public:
mimetype_file(std::wstring type);
virtual void write(const std::wstring & RootPath);
virtual void write(const std::wstring & RootPath, bool add_padding = false);
private:
std::wstring type_;
};
class media : public element
class media_files : public element
{
public:
media(_mediaitems & mediaitems, const std::wstring internal_folder, int type);
virtual void write(const std::wstring & RootPath);
media_files(_mediaitems & mediaitems, const std::wstring internal_folder, int type);
virtual void write(const std::wstring & RootPath, bool add_padding = false);
private:
_mediaitems& mediaitems_;
@ -195,19 +195,19 @@ namespace odf_writer
void set_mediaitems (_mediaitems & mediaitems);
virtual void write(const std::wstring & RootPath);
virtual void write(const std::wstring & RootPath, bool add_padding = false);
private:
content_file content_;
settings_file settings_;
styles_file styles_;
content_file content;
settings_file settings;
styles_file styles;
element_ptr meta_;
element_ptr meta;
element_ptr media_;
element_ptr pictures_;
element_ptr oleObjects_;
element_ptr imageObjects_;
element_ptr media;
element_ptr pictures;
element_ptr oleObjects;
element_ptr imageObjects;
};
class odf_document : public element
{
@ -218,7 +218,11 @@ namespace odf_writer
void set_rels(rels & r);
virtual void write(const std::wstring & RootPath);
virtual void write(const std::wstring & RootPath, bool add_padding = false);
void write_manifest(const std::wstring & RootPath);
manifect_file* get_manifest() {return dynamic_cast<manifect_file*>(manifest_.get());}
private:
element_ptr base_;

View File

@ -43,7 +43,7 @@
#include "style_paragraph_properties.h"
#include "../../DesktopEditor/fontengine/ApplicationFonts.h"
#include "../../DesktopEditor/graphics/pro/Fonts.h"
namespace cpdoccore {
@ -60,7 +60,7 @@ odf_conversion_context::odf_conversion_context(_office_type_document type_, pack
output_document_ = outputDocument;
current_object_ = 0;
applicationFonts_ = new CApplicationFonts();
applicationFonts_ = NSFonts::NSApplication::Create();
}
odf_conversion_context::~odf_conversion_context()

View File

@ -43,7 +43,10 @@
#include "mediaitems.h"
class CApplicationFonts;
namespace NSFonts
{
class IApplicationFonts;
}
namespace cpdoccore {
namespace odf_writer {
@ -86,8 +89,8 @@ public:
virtual void start_document() = 0 ;
virtual void end_document();
package::odf_document *output_document_;
CApplicationFonts *applicationFonts_;
package::odf_document *output_document_;
NSFonts::IApplicationFonts *applicationFonts_;
virtual odf_drawing_context * drawing_context() = 0;

View File

@ -1101,7 +1101,7 @@ void odf_drawing_context::end_frame()
/////////////////////
void odf_drawing_context::start_element(office_element_ptr elm, office_element_ptr style_elm)
{
int level = (int)impl_->current_level_.size();
size_t level = (int)impl_->current_level_.size();
if (impl_->current_level_.size() > 0 && elm)
impl_->current_level_.back()->add_child_element(elm);

View File

@ -490,7 +490,7 @@ void odf_lists_styles_context::set_numeric_format(std::wstring val)
}
if (r1 < 0) return;//??
r1 = s.find(L"%", 1);
r1 = (int)s.find(L"%", 1);
if (r1 >0)
{
int level = 0;
@ -498,7 +498,7 @@ void odf_lists_styles_context::set_numeric_format(std::wstring val)
int r2=0;
while (r2 < s.length())
{
r2 = s.find(L"%", r2);
r2 = (int)s.find(L"%", r2);
if (r2 >=0) level++;
else break;
r2++;

View File

@ -545,9 +545,9 @@ void odf_number_styles_context::create_currency_style(number_format_state & stat
{
create_element(L"number", L"currency-style", root_elm, odf_context_);
{
int res1 = state.format_code[0].rfind(L"]");
int res2 = state.format_code[0].rfind(L"#");
int res3 = state.format_code[0].rfind(L"0");
int res1 = (int)state.format_code[0].rfind(L"]");
int res2 = (int)state.format_code[0].rfind(L"#");
int res3 = (int)state.format_code[0].rfind(L"0");
office_element_ptr elm_symbol;
create_element(L"number", L"currency-symbol", elm_symbol, odf_context_);

View File

@ -135,7 +135,7 @@ void odf_master_state::add_header(office_element_ptr & elm)
///////////////////////////////////////////////////////////////////////////////
odf_layout_state::odf_layout_state(office_element_ptr & layout_elm )
{
int level =0;
size_t level = 0;
odf_element_state state = {layout_elm,L"",office_element_ptr(),level};
elements_.push_back(state);

View File

@ -45,23 +45,38 @@ void relationship::serialize(std::wostream & _Wostream)
{
CP_XML_NODE(L"manifest:file-entry")
{
CP_XML_ATTR(L"manifest:full-path", target());
CP_XML_ATTR(L"manifest:media-type", type());
}
CP_XML_ATTR(L"manifest:full-path", target_);
if (target_ == L"/")
{
CP_XML_ATTR(L"manifest:version", L"1.2");
}
CP_XML_ATTR(L"manifest:media-type", type_);
if (size_ >= 0)
{
CP_XML_ATTR(L"manifest:size", size_);
}
if (!encryption_.empty())
{
CP_XML_STREAM() << encryption_;
}
}
}
}
void rels::serialize(std::wostream & strm)
{
for (size_t i = 0; i < relationship_.size(); i++)
for (size_t i = 0; i < relationships_.size(); i++)
{
relationship_[i].serialize(strm);
relationships_[i].serialize(strm);
}
}
void rels::add(relationship const & r)
{
relationships().push_back(r);
relationships_.push_back(r);
}
}

View File

@ -45,37 +45,30 @@ class relationship /*: public xml::element_impl<relationship>*/
public:
relationship() {}
relationship(const std::wstring & Type,const std::wstring & Target) : type_(Type), target_(Target)
relationship(const std::wstring & Type,const std::wstring & Target) : type_(Type), target_(Target), size_(-1)
{}
void serialize(std::wostream & _Wostream);
const std::wstring & type() const { return type_; }
const std::wstring & target() const { return target_; }
int size_;
std::wstring type_;
std::wstring target_;
private:
std::wstring type_;
std::wstring target_;
std::wstring encryption_;
};
class rels;
typedef _CP_PTR(rels) rels_ptr;
/// \class rels
class rels
{
public:
rels() {}
rels() {}
void serialize(std::wostream & _Wostream);
void serialize(std::wostream & _Wostream);
void add(relationship const & r);
std::vector<relationship> & relationships() { return relationship_; }
void add(relationship const & r);
bool empty() { return relationship_.empty(); }
private:
std::vector<relationship> relationship_;
std::vector<relationship> relationships_;
};
}

View File

@ -342,6 +342,16 @@ void odf_table_context::change_current_column_width(double width)
int index = impl_->current_table().current_column ;
if (index < 0) return;
while(index >= impl_->current_table().columns.size())
{
office_element_ptr elm;
create_element(L"table", L"table-column", elm, impl_->odf_context_);
impl_->styles_context()->create_style(L"", style_family::TableColumn, true, false, -1);
add_column(elm, true);
}
style *style_ = dynamic_cast<style*>(impl_->current_table().columns[index].style_elm.get());
if (style_ == NULL) return;
@ -527,7 +537,11 @@ void odf_table_context::set_cell_row_span_restart()
cell->table_table_cell_attlist_extra_.table_number_rows_spanned_ = sz;
}
state.spanned_row_cell.clear();
state.spanned_row_cell.push_back(impl_->current_table().cells.back().elm);
if (false == impl_->current_table().cells.empty())
{
state.spanned_row_cell.push_back(impl_->current_table().cells.back().elm);
}
}

View File

@ -30,6 +30,13 @@
*
*/
//#ifndef min
//#define min(a,b) ((a) < (b) ? (a) : (b))
//#endif
//#ifndef max
//#define max(a,b) ((a) > (b) ? (a) : (b))
//#endif
#include <boost/algorithm/string.hpp>
#include "../utils.h"
@ -44,7 +51,6 @@
#include "paragraph_elements.h"
#include "odf_settings_context.h"
namespace cpdoccore {
using namespace odf_types;
@ -54,7 +60,7 @@ namespace odf_writer {
namespace utils
{
void calculate_size_font_symbols(_font_metrix & metrix, CApplicationFonts *appFonts)
void calculate_size_font_symbols(_font_metrix & metrix, NSFonts::IApplicationFonts *appFonts)
{
double appr_px = _graphics_utils_::calculate_size_symbol_asc(metrix.font_name, metrix.font_size, metrix.italic, metrix.bold, appFonts);
@ -178,14 +184,17 @@ void ods_conversion_context::end_sheet()
styles_context()->reset_defaults();
}
void ods_conversion_context::add_row_repeated()
{
current_table().add_row_repeated();
}
void ods_conversion_context::start_row(int _start_row, int repeated, int level, bool _default)
{
if (_start_row > current_table().current_row()+1)
if (_start_row > current_table().current_row() + 1)
{
int repeated_default = _start_row - current_table().current_row()-1;
start_row(_start_row-repeated_default, repeated_default,0, true);
start_row(_start_row - repeated_default, repeated_default, 0, true);
end_row();
}
/////////////////////////////////////////////////////////////////
@ -416,7 +425,7 @@ void ods_conversion_context::end_rows()
repeated -= (1 + rows);
}
if (repeated > 0)
if (repeated > 0 && current_table().get_last_row_repeated() < 1024)
{
start_row(current_table().current_row() + 1, repeated, 0, true);
end_row();

View File

@ -77,6 +77,8 @@ public:
void start_cell(std::wstring & ref, int xfd_style);
void end_cell();
void add_row_repeated();
void end_rows();
void start_cell_text();

View File

@ -245,7 +245,7 @@ void ods_table_state::end_headers()
current_level_.pop_back();
}
void ods_table_state::add_column(office_element_ptr & elm, short repeated,office_element_ptr & style_elm)
void ods_table_state::add_column(office_element_ptr & elm, unsigned int repeated,office_element_ptr & style_elm)
{
current_level_.back()->add_child_element(elm);
@ -254,7 +254,7 @@ void ods_table_state::add_column(office_element_ptr & elm, short repeated,office
odf_writer::style* style = dynamic_cast<odf_writer::style*>(style_elm.get());
if (style)style_name = style->style_name_;
ods_element_state state = {elm, repeated,style_name, style_elm, defaut_column_width_ , (short)current_level_.size()};
ods_element_state state(elm, repeated, style_name, style_elm, defaut_column_width_, current_level_.size());
if (repeated > 10000)repeated = 1024;//????
@ -331,7 +331,7 @@ void ods_table_state::set_table_dimension(int col, int row)
if (dimension_row < row) dimension_row = row + 1;
}
void ods_table_state::add_row(office_element_ptr & elm, short repeated, office_element_ptr & style_elm)
void ods_table_state::add_row(office_element_ptr & elm, unsigned int repeated, office_element_ptr & style_elm)
{
current_table_column_ = 0;
current_table_row_ += repeated;
@ -343,7 +343,7 @@ void ods_table_state::add_row(office_element_ptr & elm, short repeated, office_e
odf_writer::style* style = dynamic_cast<odf_writer::style*>(style_elm.get());
if (style)style_name = style->style_name_;
ods_element_state state = {elm, repeated,style_name, style_elm, defaut_row_height_ , (short)current_level_.size()};
ods_element_state state(elm, repeated, style_name, style_elm, defaut_row_height_ , current_level_.size());
rows_.push_back(state);
@ -356,6 +356,16 @@ void ods_table_state::add_row(office_element_ptr & elm, short repeated, office_e
row_default_cell_style_name_ = L"";
}
void ods_table_state::add_row_repeated()
{
table_table_row* row = dynamic_cast<table_table_row*>(rows_.back().elm.get());
if (row == NULL)return;
unsigned int t = rows_.back().repeated;
rows_.back().repeated++;
current_table_row_++;
row->table_table_row_attlist_.table_number_rows_repeated_ = rows_.back().repeated;
}
void ods_table_state::set_row_hidden(bool Val)
{
table_table_row* row = dynamic_cast<table_table_row*>(rows_.back().elm.get());
@ -400,22 +410,22 @@ bool ods_table_state::is_cell_comment()
int ods_table_state::is_cell_hyperlink(int col, int row)
{
for (size_t i=0; i < hyperlinks_.size();i++)
for (size_t i = 0; i < hyperlinks_.size(); i++)
{
if (hyperlinks_[i].col == col && hyperlinks_[i].row == row)
{
return i;
return (int)i;
}
}
return -1;
}
int ods_table_state::is_cell_comment(int col, int row, short repeate_col)
int ods_table_state::is_cell_comment(int col, int row, unsigned int repeate_col)
{
for (size_t i = 0; i < comments_.size(); i++)
{
if ((comments_[i].col < col + repeate_col && comments_[i].col >= col) && comments_[i].row == row)
{
return i;
return (int)i;
}
}
return -1;
@ -442,6 +452,11 @@ int ods_table_state::current_row() const
return current_table_row_;
}
unsigned int ods_table_state::get_last_row_repeated ()
{
return rows_.empty() ? 1 : rows_.back().repeated;
}
void ods_table_state::set_row_default_cell_style(std::wstring & style_name)
{
row_default_cell_style_name_= style_name; //обязательно нужно определить default-style (table_cell)!!!
@ -500,7 +515,7 @@ void ods_table_state::start_cell(office_element_ptr & elm, office_element_ptr &
state.empty = true;
state.elm = elm; state.repeated = 1; state.style_name = style_name; state.style_elm = style_elm;
state.row = current_table_row_; state.col =current_table_column_ + 1;
state.row = current_table_row_; state.col = current_table_column_ + 1;
state.hyperlink_idx = is_cell_hyperlink(state.col, state.row);
state.comment_idx = is_cell_comment(state.col, state.row);
@ -760,7 +775,7 @@ void ods_table_state::add_or_find_cell_shared_formula(std::wstring & formula, st
if (row2-row1 >0)moving_type = 2;
if (col2-col1 >0)moving_type = 1;
}
ods_shared_formula_state state = {(short)ind, odf_formula,ref, current_table_column_,current_table_row_, moving_type};
ods_shared_formula_state state = {(unsigned int)ind, odf_formula,ref, current_table_column_,current_table_row_, moving_type};
shared_formulas_.push_back(state);
cell->table_table_cell_attlist_.table_formula_ = odf_formula;
@ -1031,7 +1046,7 @@ void ods_table_state::end_cell()
{
if ( cells_size_ <1)return;
if (cells_.back().comment_idx >=0)
if (cells_.back().comment_idx >= 0)
{
office_element_ptr & comm_elm = comments_[cells_.back().comment_idx].elm;
cells_.back().elm->add_child_element(comm_elm);
@ -1043,7 +1058,7 @@ void ods_table_state::end_cell()
}
}
void ods_table_state::add_default_cell( short repeated)
void ods_table_state::add_default_cell( unsigned int repeated)
{
int comment_idx = is_cell_comment(current_table_column_ + 1 , current_table_row_, repeated);
if (comment_idx >= 0 && repeated > 1)
@ -1071,7 +1086,7 @@ void ods_table_state::add_default_cell( short repeated)
state.empty = true;
state.elm = default_cell_elm; state.repeated = repeated;
state.row=current_table_row_; state.col =current_table_column_+1;
state.row=current_table_row_; state.col =current_table_column_+ 1;
state.hyperlink_idx = is_cell_hyperlink(state.col, current_table_row_);
state.comment_idx = comment_idx;

View File

@ -156,18 +156,23 @@ namespace utils
row = getRowAdderssInv(strRow)+1;
}
};
}
struct ods_element_state
{
office_element_ptr elm;
ods_element_state(){}
ods_element_state(office_element_ptr &elm_, unsigned int repeated_, const std::wstring &style_name_, office_element_ptr &style_elm_, double size_, size_t level_)
: elm(elm_), repeated(repeated_), style_name(style_name_), style_elm(style_elm_), size(size_), level(level_)
{}
office_element_ptr elm;
short repeated;
unsigned int repeated = 1;
std::wstring style_name;
office_element_ptr style_elm;
double size;
double size = 0;
short level;
size_t level = 1;
std::wstring cell_style_name;
};
@ -177,10 +182,10 @@ struct ods_cell_state : ods_element_state
int col;
int row;
short hyperlink_idx;
short comment_idx;
int hyperlink_idx = -1;
int comment_idx = -1;
bool empty;
bool empty = true;
};
struct ods_hyperlink_state
@ -201,7 +206,7 @@ struct ods_comment_state
};
struct ods_shared_formula_state
{
short index;
unsigned int index;
std::wstring formula;
std::wstring ref;
@ -248,7 +253,7 @@ public:
void set_table_dimension(int col, int row);
void set_print_range(std::wstring range);
void add_column(office_element_ptr & elm, short repeated ,office_element_ptr & style);
void add_column(office_element_ptr & elm, unsigned int repeated ,office_element_ptr & style);
void set_column_width(double width);
void set_column_optimal_width(bool val);
void set_column_hidden(bool val);
@ -264,15 +269,16 @@ public:
void start_headers(office_element_ptr & elm);
void end_headers();
void add_row(office_element_ptr & elm, short repeated , office_element_ptr & style);//const std::wstring & StyleName, const std::wstring & defaultCellStyleName);
void add_row(office_element_ptr & elm, unsigned int repeated , office_element_ptr & style);//const std::wstring & StyleName, const std::wstring & defaultCellStyleName);
void set_row_hidden(bool Val);
void set_row_optimal_height(bool val);
void set_row_height(double height);
void set_row_default_cell_style(std::wstring & style_name);
void add_row_repeated();
void start_cell(office_element_ptr & elm ,office_element_ptr & style);
void end_cell();
void add_default_cell(short repeated);
void add_default_cell(unsigned int repeated);
void set_cell_format_value(odf_types::office_value_type::type value_type);
void set_cell_type(int type);
@ -318,9 +324,11 @@ public:
bool is_cell_hyperlink ();
int is_cell_hyperlink (int col, int row);
bool is_cell_comment ();
int is_cell_comment (int col, int row, short repeate_col = 1);
int is_cell_comment (int col, int row, unsigned int repeate_col = 1);
int is_row_comment (int row, int repeate_row = 1);
unsigned int get_last_row_repeated ();
ods_hyperlink_state & current_hyperlink();
int current_column() const;

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