Compare commits

..

171 Commits

Author SHA1 Message Date
80fe4c0164 Add dependency for pdfwriter project 2018-05-21 13:35:32 +03:00
04f7527f9e OdfFormatReader - restore xlsx table chart from cache - bug #37705 2018-05-19 16:34:14 +03:00
d92aa1f793 [x2t] Add lvlOverride to binary 2018-05-18 20:21:51 +03:00
af4e135fe2 . 2018-05-18 16:22:44 +03:00
a5ef8c01b3 PdfWriter - encrypt in AES256 2018-05-18 15:28:31 +03:00
1b7f35b317 . 2018-05-18 11:22:56 +03:00
4079dea224 [bug] builder crash 2018-05-17 16:56:10 +03:00
f4c112d523 Merge pull request #84 from ONLYOFFICE/feature/remove_function_pointers
Feature/remove function pointers
2018-05-16 20:37:14 +03:00
b082ffe20c PdfReader - decrypt files revision 6(fix bug #17002) 2018-05-16 18:24:41 +03:00
c589a6c947 [x2t] Remove name collision in READ1_DEF, READ2_DEF, READ_TABLE_DEF. For Bug #36436 2018-05-16 16:41:05 +03:00
15b08aeebf [x2t] Remove function pointers at CComment. For Bug #36436 2018-05-15 17:52:29 +03:00
672129c242 [x2t] Remove function pointers at Binary_CommonReader.ReadTable. For Bug #36436 2018-05-15 17:52:29 +03:00
92689a7a57 [x2t] Remove function pointers at Binary_CommonReader.Read1. For Bug #36436 2018-05-15 17:52:28 +03:00
31ebd7b14c [x2t] Remove function pointers at Binary_CommonReader.Read2. For Bug #36436 2018-05-15 17:52:28 +03:00
1695668a6f [x2t] Remove function pointers at Binary_CommonReader.ReadTable. For Bug #36436 2018-05-15 17:52:27 +03:00
77dfd5c12a [x2t] Remove function pointers at Binary_CommonReader.Read2. For Bug #36436 2018-05-15 17:52:27 +03:00
e600fe93b7 [x2t] Remove function pointers at Binary_CommonReader.Read1. For Bug #36436 2018-05-15 17:52:27 +03:00
889a1f827a Merge remote-tracking branch 'origin/hotfix/v5.1.4' into develop 2018-05-15 16:48:11 +03:00
8cd55fb9c4 OdfFormatReader - fix bug #37746 2018-05-15 16:47:14 +03:00
01b9309f09 x2t - fix bug #37740 2018-05-15 13:39:22 +03:00
d3a4f00f76 Add curl source to gitignore 2018-05-11 19:45:49 +03:00
f65196d95b Revert wrong merge 2018-05-11 19:07:10 +03:00
3ee5d685c2 Fix build error 2018-05-11 18:32:51 +03:00
c0cd75dbd5 Move curl.pri to kernel.pro 2018-05-11 18:05:24 +03:00
a69453af4b Merge branch 'hotfix/v5.1.4' into develop 2018-05-11 17:36:59 +03:00
3adcfecfb9 Bug with draw combo fonts 2018-05-10 20:11:04 +03:00
a7d2191649 Add static libcurl (#81) 2018-05-10 19:23:59 +03:00
db50e87fe0 [x2t] Add customStyle style property to binary 2018-05-10 18:10:01 +03:00
36bdc7376a Change lib name 2018-05-10 14:24:16 +03:00
1321211336 . 2018-05-10 14:06:57 +03:00
8c834c5041 Remove curl 2018-05-10 12:41:47 +03:00
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
7d2f96d284 4 2018-04-11 11:51:43 +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
1051 changed files with 79607 additions and 53564 deletions

7
.gitignore vendored
View File

@ -13,6 +13,11 @@ Common/3dParty/cef/win_32
Common/3dParty/cef/linux_64
Common/3dParty/cef/linux_32
Common/3dParty/cef/mac_64
Common/3dParty/curl/win_64
Common/3dParty/curl/win_32
Common/3dParty/curl/linux_64
Common/3dParty/curl/linux_32
Common/3dParty/curl/mac_64
Common/3dParty/v8/v8
Common/3dParty/v8/depot_tools
Common/3dParty/v8/win_64
@ -40,6 +45,8 @@ ASCOfficeXlsFile2/win32/_ASCOfficeXlsFile2_i.c
ASCOfficeXlsFile2/win32/_ASCOfficeXlsFile2_p.c
ASCOfficeXlsFile2/win32/dlldata.c
OfficeUtils/win32/OfficeUtilsLib/OfficeUtilsLib/ReadMe.txt
X2tConverter/**/Makefile.*
*.7z
*.obj
*.pdb
*.tlb

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="..\..\build\lib\win_32\DEBUG\UnicodeConverter.lib"
>
</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

@ -780,7 +780,9 @@ public:
std::wstring Name;
std::wstring Id;
BYTE byteType;
bool bDefault;
bool Default;
bool Custom;
std::wstring Aliases;
std::wstring BasedOn;
std::wstring NextId;
std::wstring Link;
@ -789,6 +791,11 @@ public:
bool hidden;
bool semiHidden;
bool unhideWhenUsed;
bool autoRedefine;
bool locked;
bool personal;
bool personalCompose;
bool personalReply;
std::wstring TextPr;
std::wstring ParaPr;
std::wstring TablePr;
@ -796,22 +803,36 @@ public:
std::wstring CellPr;
std::vector<std::wstring> TblStylePr;
bool bDefault;
bool bCustom;
bool bqFormat;
bool buiPriority;
bool bhidden;
bool bsemiHidden;
bool bunhideWhenUsed;
bool bautoRedefine;
bool blocked;
bool bpersonal;
bool bpersonalCompose;
bool bpersonalReply;
public:
docStyle()
{
byteType = styletype_Paragraph;
bDefault = false;
bCustom = false;
bqFormat = false;
buiPriority = false;
bhidden = false;
bsemiHidden = false;
bunhideWhenUsed = false;
bautoRedefine = false;
blocked = false;
bpersonal = false;
bpersonalCompose = false;
bpersonalReply = false;
}
void Write(XmlUtils::CStringWriter* pCStringWriter)
{
@ -827,10 +848,35 @@ public:
{
std::wstring sStyle = L"<w:style w:type=\"" + sType + L"\" w:styleId=\"" + Id + L"\"";
if(bDefault)
sStyle += L" w:default=\"1\"";
{
if(Default)
sStyle += L" w:default=\"1\"";
else
sStyle += L" w:default=\"0\"";
}
if(bCustom)
{
if(Custom)
sStyle += L" w:customStyle=\"1\"";
else
sStyle += L" w:customStyle=\"0\"";
}
sStyle += L">";
pCStringWriter->WriteString(sStyle);
if(!Aliases.empty())
{
pCStringWriter->WriteString(L"<w:aliases w:val=\"");
pCStringWriter->WriteEncodeXmlString(Aliases);
pCStringWriter->WriteString(L"\"/>");
}
if(bautoRedefine)
{
if(autoRedefine)
pCStringWriter->WriteString(L"<w:autoRedefine/>");
else
pCStringWriter->WriteString(L"<w:autoRedefine val=\"false\"/>");
}
if(!Name.empty())
{
pCStringWriter->WriteString(L"<w:name w:val=\"" + Name + L"\"/>");
@ -843,12 +889,40 @@ public:
{
pCStringWriter->WriteString(L"<w:next w:val=\"" + NextId + L"\"/>");
}
if(bpersonal)
{
if(personal)
pCStringWriter->WriteString(L"<w:personal/>");
else
pCStringWriter->WriteString(L"<w:personal val=\"false\"/>");
}
if(bpersonalCompose)
{
if(personalCompose)
pCStringWriter->WriteString(L"<w:personalCompose/>");
else
pCStringWriter->WriteString(L"<w:personalCompose val=\"false\"/>");
}
if(bpersonalReply)
{
if(personalReply)
pCStringWriter->WriteString(L"<w:personalReply/>");
else
pCStringWriter->WriteString(L"<w:personalReply val=\"false\"/>");
}
if(!Link.empty())
{
pCStringWriter->WriteString(L"<w:link w:val=\"");
pCStringWriter->WriteEncodeXmlString(Link);
pCStringWriter->WriteString(L"\"/>");
}
if(blocked)
{
if(locked)
pCStringWriter->WriteString(L"<w:locked/>");
else
pCStringWriter->WriteString(L"<w:locked val=\"false\"/>");
}
if(bqFormat)
{
if(qFormat)
@ -1237,6 +1311,7 @@ public:
class docLvl
{
public:
long ILvl;
long Format;
BYTE Jc;
std::vector<docLvlText*> Text;
@ -1247,6 +1322,7 @@ public:
XmlUtils::CStringWriter TextPr;
std::wstring PStyle;
bool bILvl;
bool bFormat;
bool bJc;
bool bText;
@ -1258,6 +1334,7 @@ public:
bool bPStyle;
docLvl()
{
bILvl = false;
bFormat = false;
bJc = false;
bText = false;
@ -1275,9 +1352,14 @@ public:
delete Text[i];
}
}
void Write(XmlUtils::CStringWriter& oWriter, int index)
void Write(XmlUtils::CStringWriter& oWriter)
{
oWriter.WriteString(L"<w:lvl w:ilvl=\"" + std::to_wstring(index) + L"\">");
oWriter.WriteString(L"<w:lvl");
if(bILvl)
{
oWriter.WriteString(L" w:ilvl=\"" + std::to_wstring(ILvl) + L"\"");
}
oWriter.WriteString(L">");
if(bStart)
{
oWriter.WriteString(L"<w:start w:val=\"" + std::to_wstring(Start) + L"\"/>");
@ -1374,6 +1456,48 @@ public:
oWriter.WriteString(L"</w:lvl>");
}
};
class docLvlOverride
{
public:
long ILvl;
long StartOverride;
docLvl* Lvl;
bool bILvl;
bool bStartOverride;
docLvlOverride()
{
bILvl = false;
bStartOverride = false;
Lvl = NULL;
}
~docLvlOverride()
{
RELEASEOBJECT(Lvl);
}
void Write(XmlUtils::CStringWriter& oWriter)
{
oWriter.WriteString(L"<w:lvlOverride");
if (bILvl)
{
oWriter.WriteString(L" w:ilvl=\"");
oWriter.WriteString(std::to_wstring(ILvl));
oWriter.WriteString(L"\"");
}
oWriter.WriteString(L">");
if (bStartOverride)
{
oWriter.WriteString(L"<w:startOverride w:val=\"");
oWriter.WriteString(std::to_wstring(StartOverride));
oWriter.WriteString(L"\"/>");
}
if(NULL != Lvl)
{
Lvl->Write(oWriter);
}
oWriter.WriteString(L"</w:lvlOverride>");
}
};
class docANum
{
public:
@ -1411,7 +1535,7 @@ public:
}
for(int i = 0, length = (int)Lvls.size(); i < length; ++i)
{
Lvls[i]->Write(oWriterANum, i);
Lvls[i]->Write(oWriterANum);
}
oWriterANum.WriteString(L"</w:abstractNum>");
}
@ -1422,6 +1546,7 @@ class docNum
public:
long AId;
long Id;
std::vector<docLvlOverride*> LvlOverrides;
bool bAId;
bool bId;
@ -1430,12 +1555,21 @@ public:
bAId = false;
bId = false;
}
~docNum()
{
for(size_t i = 0; i < LvlOverrides.size(); ++i){
RELEASEOBJECT(LvlOverrides[i]);
}
}
void Write(XmlUtils::CStringWriter& oWriterNumList)
{
if(bAId && bId)
{
oWriterNumList.WriteString(L"<w:num w:numId=\"" + std::to_wstring(Id) + L"\"><w:abstractNumId w:val=\"" +
std::to_wstring(AId) + L"\"/></w:num>");
oWriterNumList.WriteString(L"<w:num w:numId=\"" + std::to_wstring(Id) + L"\"><w:abstractNumId w:val=\"" + std::to_wstring(AId) + L"\"/>");
for(size_t i = 0; i < LvlOverrides.size(); ++i){
LvlOverrides[i]->Write(oWriterNumList);
}
oWriterNumList.WriteString(L"</w:num>");
}
}
};
@ -1593,7 +1727,6 @@ public:
};
class CComment{
private:
typedef std::wstring (*funcArg)(CComment* pComment);
IdCounter& m_oParaIdCounter;
IdCounter& m_oFormatIdCounter;
public:
@ -1654,13 +1787,13 @@ public:
}
return sRes;
}
std::wstring writeTemplates(funcArg fReadFunction)
std::wstring writeTemplates(bool isExt)
{
std::wstring sRes;
sRes += (fReadFunction(this));
sRes += isExt ? writeContentExt(this) : writeContent(this);
for(size_t i = 0; i < replies.size(); ++i)
sRes += (fReadFunction(replies[i]));
sRes += isExt ? writeContentExt(replies[i]) : writeContent(replies[i]);
return sRes;
}
static std::wstring writeRef(CComment* pComment, const std::wstring& sBefore, const std::wstring& sRef, const std::wstring& sAfter)
@ -1852,7 +1985,7 @@ public:
std::wstring sRes;
for (boost::unordered_map<int, CComment*>::const_iterator it = m_mapComments.begin(); it != m_mapComments.end(); ++it)
{
sRes += (it->second->writeTemplates(CComment::writeContent));
sRes += it->second->writeTemplates(false);
}
return sRes;
}
@ -1861,7 +1994,7 @@ public:
std::wstring sRes;
for (boost::unordered_map<int, CComment*>::const_iterator it = m_mapComments.begin(); it != m_mapComments.end(); ++it)
{
sRes += (it->second->writeTemplates(CComment::writeContentExt));
sRes += it->second->writeTemplates(true);
}
return sRes;
}

View File

@ -47,7 +47,9 @@ Binary_HdrFtrTableReader::Binary_HdrFtrTableReader(NSBinPptxRW::CBinaryFileReade
}
int Binary_HdrFtrTableReader::Read()
{
return ReadTable(&Binary_HdrFtrTableReader::ReadHdrFtrContent, this);
int res = c_oSerConstants::ReadOk;
READ_TABLE_DEF(res, this->ReadHdrFtrContent, NULL);
return res;
}
int Binary_HdrFtrTableReader::ReadHdrFtrContent(BYTE type, long length, void* poResult)
{
@ -55,7 +57,7 @@ int Binary_HdrFtrTableReader::ReadHdrFtrContent(BYTE type, long length, void* po
if ( c_oSerHdrFtrTypes::Header == type || c_oSerHdrFtrTypes::Footer == type )
{
nCurType = type;
res = Read1(length, &Binary_HdrFtrTableReader::ReadHdrFtrFEO, this, poResult);
READ1_DEF(length, res, this->ReadHdrFtrFEO, poResult);
}
else
res = c_oSerConstants::ReadUnknown;
@ -67,7 +69,7 @@ int Binary_HdrFtrTableReader::ReadHdrFtrFEO(BYTE type, long length, void* poResu
if ( c_oSerHdrFtrTypes::HdrFtr_First == type || c_oSerHdrFtrTypes::HdrFtr_Even == type || c_oSerHdrFtrTypes::HdrFtr_Odd == type )
{
nCurHeaderType = type;
res = Read1(length, &Binary_HdrFtrTableReader::ReadHdrFtrItem, this, poResult);
READ1_DEF(length, res, this->ReadHdrFtrItem, poResult);
}
else
res = c_oSerConstants::ReadUnknown;
@ -99,7 +101,7 @@ int Binary_HdrFtrTableReader::ReadHdrFtrItem(BYTE type, long length, void* poRes
}
m_oFileWriter.m_pDrawingConverter->SetDstContentRels();
Binary_DocumentTableReader oBinary_DocumentTableReader(m_oBufferedStream, m_oFileWriter, poHdrFtrItem->Header, m_pComments);
res = Read1(length, &Binary_HdrFtrTableReader::ReadHdrFtrItemContent, this, &oBinary_DocumentTableReader);
READ1_DEF(length, res, this->ReadHdrFtrItemContent, &oBinary_DocumentTableReader);
OOX::CPath fileRelsPath = m_oFileWriter.m_oDocumentWriter.m_sDir + FILE_SEPARATOR_STR + L"word" +
FILE_SEPARATOR_STR + L"_rels"+
@ -118,4 +120,4 @@ int Binary_HdrFtrTableReader::ReadHdrFtrItemContent(BYTE type, long length, void
return pBinary_DocumentTableReader->ReadDocumentContent(type, length, NULL);
}
}
}

File diff suppressed because it is too large Load Diff

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

@ -201,7 +201,10 @@ extern int g_nCurFormatVersion;
StyleLink = 23,
lvl_NumFmt = 24,
NumFmtVal = 25,
NumFmtFormat = 26
NumFmtFormat = 26,
Num_LvlOverride = 27,
StartOverride = 28,
ILvl = 29
};}
namespace c_oSerOtherTableTypes{enum c_oSerOtherTableTypes
{
@ -262,7 +265,14 @@ extern int g_nCurFormatVersion;
Style_RowPr = 15,
Style_CellPr = 16,
Style_TblStylePr = 17,
Style_Link = 18
Style_Link = 18,
Style_CustomStyle = 19,
Style_Aliases = 20,
Style_AutoRedefine = 21,
Style_Locked = 22,
Style_Personal = 23,
Style_PersonalCompose = 24,
Style_PersonalReply = 25
};}
namespace c_oSerProp_tblStylePrType{enum c_oSerProp_tblStylePrType
{

File diff suppressed because it is too large Load Diff

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);
@ -341,7 +341,7 @@ bool BinDocxRW::CDocxSerializer::getXmlContent(NSBinPptxRW::CBinaryFileReader& o
long nLength = oBufferedStream.GetLong();
Writers::ContentWriter oTempContentWriter;
BinDocxRW::Binary_DocumentTableReader oBinary_DocumentTableReader(oBufferedStream, *m_pCurFileWriter, oTempContentWriter, m_pCurFileWriter->m_pComments);
int res = oBinary_DocumentTableReader.Read1(nLength, &BinDocxRW::Binary_DocumentTableReader::ReadDocumentContent, &oBinary_DocumentTableReader, NULL);
oBinary_DocumentTableReader.ReadDocumentContentOut(nLength);
sOutputXml = oTempContentWriter.m_oContent.GetData();
return true;
@ -433,13 +433,13 @@ bool BinDocxRW::CDocxSerializer::getXmlContentElem(OOX::EElementType eType, NSBi
if(OOX::et_m_oMathPara == eType)
{
oTempContentWriter.m_oContent.WriteString(std::wstring(_T("<m:oMathPara>")));
oBinary_DocumentTableReader.Read1(nLength, &BinDocxRW::Binary_DocumentTableReader::ReadMathOMathPara, &oBinary_DocumentTableReader, NULL);
oBinary_DocumentTableReader.ReadMathOMathParaOut(nLength);
oTempContentWriter.m_oContent.WriteString(std::wstring(_T("</m:oMathPara>")));
}
else if(OOX::et_m_oMath == eType)
{
oTempContentWriter.m_oContent.WriteString(std::wstring(_T("<m:oMath>")));
oBinary_DocumentTableReader.Read1(nLength, &BinDocxRW::Binary_DocumentTableReader::ReadMathArg, &oBinary_DocumentTableReader, NULL);
oBinary_DocumentTableReader.ReadMathArgOut(nLength);
oTempContentWriter.m_oContent.WriteString(std::wstring(_T("</m:oMath>")));
}

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,16 +105,17 @@ 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)
{
if (S_OK != oCOfficeUtils.CompressFileOrDirectory(dstTempPath.c_str(), dstPath.c_str(), true))
if (S_OK != oCOfficeUtils.CompressFileOrDirectory(dstTempPath, dstPath, true))
nResult = -2;
}

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()
{
@ -333,17 +333,11 @@ hyperlinks::_ref docx_conversion_context::last_hyperlink()
return hyperlinks_.last();
}
void docx_conversion_context::dump_hyperlinks(rels & Rels, hyperlinks::_type_place type)
{
hyperlinks_.dump_rels(Rels, type);
}
void docx_conversion_context::dump_mediaitems(rels & Rels)
{
mediaitems_.dump_rels(Rels);
}
void docx_conversion_context::dump_headers_footers(rels & Rels) const
{
headers_footers_.dump_rels(Rels);
@ -353,12 +347,6 @@ void docx_conversion_context::dump_notes(rels & Rels) const
{
notes_context_.dump_rels(Rels);
}
std::wstring docx_conversion_context::add_mediaitem(const std::wstring & uri, RelsType type, bool & isInternal, std::wstring & ref)
{
return mediaitems_.add_or_find(uri, type, isInternal, ref);
}
void docx_conversion_context::start_document()
{
streams_man_ = streams_man::create(document_xml_);
@ -1203,7 +1191,7 @@ namespace
//слить если есть mediaitems, добавить релсы и обнулить их для основного документа.
rels internal_rels;
Context.dump_mediaitems(internal_rels);
Context.get_mediaitems().dump_rels(internal_rels);
Context.dump_hyperlinks(internal_rels, hyperlinks::document_place);
Context.get_headers_footers().add(styleName, dbgStr, type, internal_rels);

View File

@ -33,21 +33,21 @@
#include "../odf/datatypes/stylefamily.h"
#include "../odf/datatypes/length.h"
#include "../odf/datatypes/noteclass.h"
#include <boost/unordered_map.hpp>
#include <boost/shared_ptr.hpp>
#include <list>
#include "hyperlinks.h"
#include "mediaitems.h"
#include "headers_footers.h"
#include "docx_table_context.h"
#include "../odf/datatypes/noteclass.h"
#include "oox_conversion_context.h"
#include "oox_chart_context.h"
class CApplicationFonts;
#include "headers_footers.h"
#include "hyperlinks.h"
#include "mediaitems.h"
#include "../../../DesktopEditor/graphics/pro/Fonts.h"
namespace cpdoccore {
@ -117,8 +117,6 @@ private:
std::wstring name(const std::wstring & Name, odf_types::style_family::type Type);
size_t count_;
//boost::unordered_map<std::wstring, std::wstring> map_;
std::multimap<std::wstring, std::wstring> map_;
};
@ -591,9 +589,6 @@ public:
hyperlinks::_ref last_hyperlink ();
void dump_hyperlinks (rels & Rels, hyperlinks::_type_place type);
std::wstring add_mediaitem(const std::wstring & uri, RelsType type, bool & isInternal, std::wstring & ref);
void dump_mediaitems (rels & Rels);
void dump_headers_footers (rels & Rels) const;
void dump_notes (rels & Rels) const;
@ -677,6 +672,7 @@ public:
styles_map * get_style_map() { return &styles_map_; }
mediaitems & get_mediaitems() {return mediaitems_;}
styles_context & get_styles_context() { return styles_context_; }
drawing_context & get_drawing_context() { return drawing_context_; }
comments_context & get_comments_context() { return comments_context_; }
@ -758,7 +754,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

@ -134,13 +134,14 @@ void word_files::write(const std::wstring & RootPath)
void word_files::update_rels(docx_conversion_context & Context)
{
Context.get_mediaitems().dump_rels(rels_files_.get_rel_file()->get_rels());
Context.dump_hyperlinks (rels_files_.get_rel_file()->get_rels(), hyperlinks::document_place);
Context.dump_mediaitems (rels_files_.get_rel_file()->get_rels());
Context.dump_headers_footers(rels_files_.get_rel_file()->get_rels());
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

@ -70,7 +70,14 @@ void oox_chart_context::reset_fill(oox::_oox_fill &f)
rels_.push_back(_rel(isInternal, f.bitmap->rId, ref, typeImage));
}
}
void oox_chart_context::set_externalData(const std::wstring & href)
{
bool isInternal = true;
std::wstring href_out;
externalDataId_ = mediaitems_.add_or_find(href, typeMsObject, isInternal, href_out);
rels_.push_back(_rel(isInternal, externalDataId_, href_out, typeMsObject));
}
std::wostream & oox_chart_context::chartData()
{
return impl_->chartData_;
@ -78,7 +85,7 @@ std::wostream & oox_chart_context::chartData()
void oox_chart_context::dump_rels(rels & Rels)
{
for (int i = 0; i < rels_.size(); i++)
for (size_t i = 0; i < rels_.size(); i++)
{
_rel & r = rels_[i];
@ -88,8 +95,7 @@ void oox_chart_context::dump_rels(rels & Rels)
r.rid,
L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",
r.is_internal ? std::wstring(L"../") + r.ref : r.ref,
(r.is_internal ? L"" : L"External")
)
(r.is_internal ? L"" : L"External"))
);
}
else if (r.type == typeHyperlink)
@ -101,6 +107,15 @@ void oox_chart_context::dump_rels(rels & Rels)
L"External")
);
}
else if (r.type == typeMsObject)
{
Rels.add(relationship(
r.rid,
L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package",
r.is_internal ? std::wstring(L"../") + r.ref : r.ref,
(r.is_internal ? L"" : L"External"))
);
}
}
}
@ -199,10 +214,21 @@ void oox_chart_context::serialize(std::wostream & strm)
}
}
}
if (externalDataId_.empty() == false)
{
CP_XML_NODE(L"c:externalData")
{
CP_XML_ATTR(L"r:id", externalDataId_);
CP_XML_NODE(L"c:autoUpdate")
{
CP_XML_ATTR(L"val", false);
}
}
}
}
}
}
oox_chart_context::~oox_chart_context()
{
}

View File

@ -82,6 +82,7 @@ public:
plot_area_.charts_[i]->is3D_ = val;
}
}
void set_externalData(const std::wstring & href);
void add_chart(int type)
{
plot_area_.add_chart(type);
@ -135,6 +136,7 @@ private:
cpdoccore::oox::oox_chart_legend legend_;
std::wstring pivot_source_;
std::wstring externalDataId_;
std::vector<odf_reader::_property> graphic_properties_;
_oox_fill fill_;

View File

@ -70,17 +70,12 @@ void oox_chart_series::setFormula(int ind, std::wstring &value, std::wstring & f
if (ind == 0)
{
if (std::wstring::npos != value.find(L"local-table")) return;
values_[ind].strRef_.formula = converter.convert_chart_distance(value);
values_[ind].strRef_.present = true;
values_[ind].present = true;
}
else
{
if (std::wstring::npos != value.find(L"local-table") && !bLocalTable_ ) return;
//в xlsx низя .... нужно сделать тогда отдельную table.xml
values_[ind].numRef_.formula = converter.convert_chart_distance(value);
values_[ind].numRef_.present = true;
values_[ind].numRef_.formatCode = formatCode;

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

@ -184,7 +184,7 @@ void oox_bar_chart::oox_serialize(std::wostream & _Wostream)
}
CP_XML_NODE(L"c:varyColors")
{
CP_XML_ATTR(L"val", 1);
CP_XML_ATTR(L"val", varyColors_ ? L"1" : L"0");
}
oox_serialize_common(CP_XML_STREAM());
@ -226,7 +226,7 @@ void oox_line_chart::oox_serialize(std::wostream & _Wostream)
{
CP_XML_NODE(L"c:varyColors")
{
CP_XML_ATTR(L"val", 1);
CP_XML_ATTR(L"val", varyColors_ ? L"1" : L"0");
}
oox_serialize_common(CP_XML_STREAM());
@ -259,7 +259,7 @@ void oox_area_chart::oox_serialize(std::wostream & _Wostream)
{
CP_XML_NODE(L"c:varyColors")
{
CP_XML_ATTR(L"val", 1);
CP_XML_ATTR(L"val", varyColors_ ? L"1" : L"0");
}
oox_serialize_common(CP_XML_STREAM());
@ -289,7 +289,7 @@ void oox_bubble_chart::oox_serialize(std::wostream & _Wostream)
{
CP_XML_NODE(L"c:varyColors")
{
CP_XML_ATTR(L"val", 1);
CP_XML_ATTR(L"val", varyColors_ ? L"1" : L"0");
}
oox_serialize_common(CP_XML_STREAM());
//CP_XML_NODE(L"c:bubbleScale")
@ -326,7 +326,7 @@ void oox_doughnut_chart::oox_serialize(std::wostream & _Wostream)
{
CP_XML_NODE(L"c:varyColors")
{
CP_XML_ATTR(L"val", 1);
CP_XML_ATTR(L"val", varyColors_ ? L"1" : L"0");
}
oox_serialize_common(CP_XML_STREAM());
@ -366,7 +366,7 @@ void oox_pie_chart::oox_serialize(std::wostream & _Wostream)
{
CP_XML_NODE(L"c:varyColors")
{
CP_XML_ATTR(L"val", 1);
CP_XML_ATTR(L"val", varyColors_ ? L"1" : L"0");
}
oox_serialize_common(CP_XML_STREAM());
}
@ -398,7 +398,7 @@ void oox_radar_chart::oox_serialize(std::wostream & _Wostream)
}
CP_XML_NODE(L"c:varyColors")
{
CP_XML_ATTR(L"val", 1);
CP_XML_ATTR(L"val", varyColors_ ? L"1" : L"0");
}
oox_serialize_common(CP_XML_STREAM());
@ -436,7 +436,7 @@ void oox_scatter_chart::oox_serialize(std::wostream & _Wostream)
}
CP_XML_NODE(L"c:varyColors")
{
CP_XML_ATTR(L"val", 1);
CP_XML_ATTR(L"val", varyColors_ ? L"1" : L"0");
}
oox_serialize_common(CP_XML_STREAM());

View File

@ -67,6 +67,7 @@ public:
is3D_ = false;
type_ = 0;
dispBlanksAs_ = L"zero";
varyColors_ = true;
}
~oox_chart(){}
@ -99,6 +100,7 @@ public:
int type_;
bool is3D_;
bool varyColors_;
std::wstring dispBlanksAs_;
std::vector<int> axisId_; // axId (Axis ID) §21.2.2.9
std::wstring grouping_; // clustered | percentStacked | stacked | standard

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

@ -212,7 +212,14 @@ void object_odf_context::docx_convert(oox::docx_conversion_context & Context)
oox_convert(chart_context);
chart_context.set_cache_only(true);
if (embeddedData.empty())
{
chart_context.set_cache_only(true);
}
else
{
chart_context.set_externalData(embeddedData);
}
Context.end_chart();
}
@ -259,7 +266,14 @@ void object_odf_context::pptx_convert(oox::pptx_conversion_context & Context)
oox_convert(chart_context);
chart_context.set_cache_only(true);
if (embeddedData.empty())
{
chart_context.set_cache_only(true);
}
else
{
chart_context.set_externalData(embeddedData);
}
Context.end_chart();
}
else if (object_type_ == 2 && office_text_)
@ -382,6 +396,11 @@ void object_odf_context::oox_convert(oox::oox_chart_context & chart_context)
if (!current) continue;
if (1 == series_.size())
{
current->varyColors_ = false;
}
current->set_properties(plot_area_.properties_);
current->set_additional_properties(chart_graphic_properties_);
@ -420,7 +439,8 @@ void object_odf_context::oox_convert(oox::oox_chart_context & chart_context)
formatCode = *strVal;
}
if (domain_cell_range_adress_.empty() == false)
if (domain_cell_range_adress_.empty() == false ||
last_set_type == chart_scatter)
{
if (last_set_type == chart_bubble)
{ //bubble(x)
@ -434,13 +454,19 @@ void object_odf_context::oox_convert(oox::oox_chart_context & chart_context)
}
else
{ //x
if (!bPivotChart_)
current->set_formula_series(2, domain_cell_range_adress_, formatCode, boolVal.get_value_or(true));
current->set_values_series (2, domain_cash);
if (false == domain_cash.empty())
{
if (!bPivotChart_)
current->set_formula_series(2, domain_cell_range_adress_, formatCode, boolVal.get_value_or(true));
current->set_values_series (2, domain_cash);
}
//y
if (!bPivotChart_)
current->set_formula_series(3, series_[i].cell_range_address_, formatCode, boolVal.get_value_or(true));
current->set_values_series (3, cell_cash);
if (false == cell_cash.empty())
{
if (!bPivotChart_)
current->set_formula_series(3, series_[i].cell_range_address_, formatCode, boolVal.get_value_or(true));
current->set_values_series (3, cell_cash);
}
}
}
else
@ -476,7 +502,7 @@ void object_odf_context::oox_convert(oox::oox_chart_context & chart_context)
is3D = true;
}
for (int i = 0; i < axises_.size(); i++)
for (size_t i = 0; i < axises_.size(); i++)
{
axis & a = axises_[i];
@ -667,7 +693,7 @@ void process_build_object::visit(office_body& val)
}
void process_build_object::visit(office_chart& val)
{
ACCEPT_ALL_CONTENT_CONST(val.content_);
ACCEPT_ALL_CONTENT(val.content_);
}
void process_build_object::visit(office_text& val)
{
@ -684,7 +710,7 @@ void process_build_object::visit(office_spreadsheet& val)
object_odf_context_.object_type_ = 4;
object_odf_context_.office_spreadsheet_ = &val; //конвертация будет уровнем выше
}
void process_build_object::visit(const chart_chart& val)
void process_build_object::visit(chart_chart& val)
{
object_odf_context_.object_type_ = 1;
@ -704,11 +730,11 @@ void process_build_object::visit(const chart_chart& val)
if (val.attlist_.loext_data_pilot_source_)
object_odf_context_.set_pivot_source(*val.attlist_.loext_data_pilot_source_);
ACCEPT_ALL_CONTENT_CONST(val.content_);
ACCEPT_ALL_CONTENT(val.content_);
}
void process_build_object::visit(const chart_title& val)
void process_build_object::visit(chart_title& val)
{
title t;
@ -735,7 +761,7 @@ void process_build_object::visit(const chart_title& val)
}
void process_build_object::visit(const chart_subtitle & val)
void process_build_object::visit(chart_subtitle & val)
{
title t;
std::wstringstream v;
@ -751,7 +777,7 @@ void process_build_object::visit(const chart_subtitle & val)
object_odf_context_.sub_title_ = t;
}
void process_build_object::visit(const chart_footer& val)
void process_build_object::visit(chart_footer& val)
{
object_odf_context_.footer_.bEnabled = true;
@ -760,7 +786,7 @@ void process_build_object::visit(const chart_footer& val)
ApplyTextProperties (val.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.footer_.text_properties_);
}
void process_build_object::visit(const chart_legend& val)
void process_build_object::visit(chart_legend& val)
{
object_odf_context_.legend_.bEnabled = true;
object_odf_context_.legend_.position = L"r";
@ -791,9 +817,9 @@ void process_build_object::visit(const chart_legend& val)
ApplyTextProperties (val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.legend_.text_properties_);
}
void process_build_object::visit(const chart_plot_area& val)
void process_build_object::visit(chart_plot_area& val)
{
ACCEPT_ALL_CONTENT_CONST(val.content_);
ACCEPT_ALL_CONTENT(val.content_);
object_odf_context_.plot_area_.cell_range_address_ = val.attlist_.table_cell_range_address_.get_value_or(L"");
@ -803,13 +829,13 @@ void process_build_object::visit(const chart_plot_area& val)
}
void process_build_object::visit(const chart_axis& val)
void process_build_object::visit(chart_axis& val)
{
object_odf_context_.start_axis(val.attlist_.chart_dimension_.get_value_or(L""),
val.attlist_.chart_name_.get_value_or(L""),
val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""));
ACCEPT_ALL_CONTENT_CONST(val.content_);
ACCEPT_ALL_CONTENT(val.content_);
std::wstring style_name = val.attlist_.common_attlist_.chart_style_name_.get_value_or(L"");
@ -820,7 +846,7 @@ void process_build_object::visit(const chart_axis& val)
object_odf_context_.end_axis();
}
void process_build_object::visit(const chart_series& val)
void process_build_object::visit(chart_series& val)
{
const chart_series_attlist & att = val.attlist_;
@ -834,7 +860,7 @@ void process_build_object::visit(const chart_series& val)
att.common_attlist_.chart_style_name_.get_value_or(L"")
);
ACCEPT_ALL_CONTENT_CONST(val.content_);
ACCEPT_ALL_CONTENT(val.content_);
ApplyChartProperties (att.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.series_.back().properties_);
ApplyGraphicProperties (att.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.series_.back().graphic_properties_,object_odf_context_.series_.back().fill_);
@ -842,14 +868,14 @@ void process_build_object::visit(const chart_series& val)
}
void process_build_object::visit(const chart_domain& val)
void process_build_object::visit(chart_domain& val)
{
if (object_odf_context_.domain_cell_range_adress_.empty())
object_odf_context_.domain_cell_range_adress_ = val.table_cell_range_address_.get_value_or(L"");
else
object_odf_context_.domain_cell_range_adress2_ = val.table_cell_range_address_.get_value_or(L"");
}
void process_build_object::visit(const chart_grid& val)
void process_build_object::visit(chart_grid& val)
{
object_odf_context_.add_grid(val.attlist_.chart_class_.get_value_or(L""),
val.attlist_.common_attlist_.chart_style_name_.get_value_or(L"") );
@ -859,7 +885,7 @@ void process_build_object::visit(const chart_grid& val)
ApplyGraphicProperties (val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""), (object_odf_context_.axises_.back()).grids_.back().graphic_properties_, fill);
}
void process_build_object::visit(const chart_wall& val)
void process_build_object::visit(chart_wall& val)
{
object_odf_context_.wall_.bEnabled = true;
@ -868,7 +894,7 @@ void process_build_object::visit(const chart_wall& val)
ApplyTextProperties (val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.wall_.text_properties_);
}
void process_build_object::visit(const chart_floor& val)
void process_build_object::visit(chart_floor& val)
{
object_odf_context_.floor_.bEnabled = true;
@ -877,7 +903,7 @@ void process_build_object::visit(const chart_floor& val)
ApplyTextProperties (val.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.floor_.text_properties_);
}
void process_build_object::visit(const chart_data_point & val)
void process_build_object::visit(chart_data_point & val)
{
object_odf_context_.add_point( val.attlist_.chart_repeated_.get_value_or(1));
@ -892,16 +918,16 @@ void process_build_object::visit(const chart_data_point & val)
}
}
void process_build_object::visit(const chart_mean_value & val)
void process_build_object::visit(chart_mean_value & val)
{
ApplyChartProperties (val.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.series_.back().mean_value_.properties_);
ApplyGraphicProperties (val.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.series_.back().mean_value_.graphic_properties_, object_odf_context_.series_.back().mean_value_.fill_);
}
void process_build_object::visit(const chart_error_indicator & val)
void process_build_object::visit(chart_error_indicator & val)
{
ApplyGraphicProperties (val.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.series_.back().error_indicator_.graphic_properties_,object_odf_context_.series_.back().error_indicator_.fill_ );
}
void process_build_object::visit(const chart_regression_curve & val)
void process_build_object::visit(chart_regression_curve & val)
{
oox::_oox_fill fill;
ApplyGraphicProperties (val.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.series_.back().regression_curve_.line_properties_, fill);
@ -913,7 +939,7 @@ void process_build_object::visit(const chart_regression_curve & val)
val.chart_equation_->accept(*this);
}
}
void process_build_object::visit(const chart_equation & val)
void process_build_object::visit(chart_equation & val)
{
if (object_odf_context_.series_.back().regression_curve_.bEquation == false)return;
@ -925,7 +951,7 @@ void process_build_object::visit(const chart_equation & val)
ApplyTextProperties (val.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.series_.back().regression_curve_.equation_properties_.text_properties_);
}
void process_build_object::visit(const chart_categories& val)
void process_build_object::visit(chart_categories& val)
{
if (object_odf_context_.in_axis_)
{
@ -936,49 +962,48 @@ void process_build_object::visit(const chart_categories& val)
if (val.table_cell_range_address_)
object_odf_context_.add_categories(*val.table_cell_range_address_);
}
void process_build_object::visit(const table_table& val)
void process_build_object::visit(table_table& val)
{
ACCEPT_ALL_CONTENT_CONST(val.table_columns_and_groups_.content_);
ACCEPT_ALL_CONTENT_CONST(val.table_rows_and_groups_.content_);
object_odf_context_.table_table_ = &val;
ACCEPT_ALL_CONTENT(val.table_columns_and_groups_.content_);
ACCEPT_ALL_CONTENT(val.table_rows_and_groups_.content_);
}
void process_build_object::visit(const table_table_rows& val)
{
ACCEPT_ALL_CONTENT_CONST(val.table_table_row_);
}
void process_build_object::visit(table_table_rows& val)
{
ACCEPT_ALL_CONTENT_CONST(val.table_table_row_);
ACCEPT_ALL_CONTENT(val.table_table_row_);
}
void process_build_object::visit(const table_table_row & val)
void process_build_object::visit(table_table_row & val)
{
unsigned int repeated = val.attlist_.table_number_rows_repeated_;
ACCEPT_ALL_CONTENT_CONST(val.content_);
ACCEPT_ALL_CONTENT(val.content_);
visit_rows(repeated);
}
void process_build_object::visit(const table_table_column& val)
void process_build_object::visit(table_table_column& val)
{
const unsigned int columnsRepeated = val.table_table_column_attlist_.table_number_columns_repeated_;
visit_column(columnsRepeated);
}
void process_build_object::visit(const table_table_row_group& val)
void process_build_object::visit(table_table_row_group& val)
{
ACCEPT_ALL_CONTENT_CONST(val.table_rows_and_groups_.content_);
ACCEPT_ALL_CONTENT(val.table_rows_and_groups_.content_);
}
void process_build_object::visit(const table_table_column_group& val)
void process_build_object::visit(table_table_column_group& val)
{
ACCEPT_ALL_CONTENT_CONST(val.table_columns_and_groups_.content_);
ACCEPT_ALL_CONTENT(val.table_columns_and_groups_.content_);
}
void process_build_object::visit(table_table_columns& val)
{
ACCEPT_ALL_CONTENT_CONST(val.table_table_column_);
ACCEPT_ALL_CONTENT(val.table_table_column_);
}
void process_build_object::visit(const table_columns_no_group& val)
void process_build_object::visit(table_columns_no_group& val)
{
if (val.table_columns_1_.table_table_columns_)
val.table_columns_1_.table_table_columns_->accept(*this);
ACCEPT_ALL_CONTENT_CONST(val.table_columns_1_.table_table_column_);
ACCEPT_ALL_CONTENT(val.table_columns_1_.table_table_column_);
if (val.table_table_header_columns_)
val.table_table_header_columns_->accept(*this);
@ -986,14 +1011,14 @@ void process_build_object::visit(const table_columns_no_group& val)
if (val.table_columns_2_.table_table_columns_)
val.table_columns_2_.table_table_columns_->accept(*this);
ACCEPT_ALL_CONTENT_CONST(val.table_columns_2_.table_table_column_);
ACCEPT_ALL_CONTENT(val.table_columns_2_.table_table_column_);
}
void process_build_object::visit(const table_rows_no_group& val)
void process_build_object::visit(table_rows_no_group& val)
{
if (val.table_rows_1_.table_table_rows_)
val.table_rows_1_.table_table_rows_->accept(*this);
else
ACCEPT_ALL_CONTENT_CONST(val.table_rows_1_.table_table_row_);
ACCEPT_ALL_CONTENT(val.table_rows_1_.table_table_row_);
if (val.table_table_header_rows_)
val.table_table_header_rows_->accept(*this);
@ -1001,9 +1026,9 @@ void process_build_object::visit(const table_rows_no_group& val)
if (val.table_rows_2_.table_table_rows_)
val.table_rows_2_.table_table_rows_->accept(*this);
else
ACCEPT_ALL_CONTENT_CONST(val.table_rows_2_.table_table_row_);
ACCEPT_ALL_CONTENT(val.table_rows_2_.table_table_row_);
}
void process_build_object::visit(const table_table_cell& val)
void process_build_object::visit(table_table_cell& val)
{
const table_table_cell_attlist & attlist = val.attlist_;
@ -1046,7 +1071,7 @@ void process_build_object::visit(const table_table_cell& val)
object_odf_context_.cash_pivot.insert(std::make_pair(cell_desc, cell_));
}
}
void process_build_object::visit(const table_covered_table_cell& val)
void process_build_object::visit(table_covered_table_cell& val)
{
unsigned int repeated = val.attlist_.table_number_columns_repeated_;
@ -1055,15 +1080,11 @@ void process_build_object::visit(const table_covered_table_cell& val)
}
void process_build_object::visit(table_table_header_columns& val)
{
ACCEPT_ALL_CONTENT_CONST(val.table_table_column_);
}
void process_build_object::visit(const table_table_header_rows& val)
{
ACCEPT_ALL_CONTENT_CONST(val.table_table_row_);
ACCEPT_ALL_CONTENT(val.table_table_column_);
}
void process_build_object::visit(table_table_header_rows& val)
{
ACCEPT_ALL_CONTENT_CONST(val.table_table_row_);
ACCEPT_ALL_CONTENT(val.table_table_row_);
}
}
}

View File

@ -120,6 +120,7 @@ public:
office_text_ (NULL),
office_math_ (NULL),
office_spreadsheet_ (NULL),
table_table_ (NULL),
baseRef_ (ref),
baseFontHeight_ (12)
{
@ -164,6 +165,7 @@ public:
office_text *office_text_;
office_math *office_math_;
office_spreadsheet *office_spreadsheet_;
table_table *table_table_;
int baseFontHeight_;
std::wstring baseRef_;
@ -203,6 +205,7 @@ public:
std::vector<_cell> cash_values;
std::map<std::wstring, _cell>cash_pivot;
std::wstring embeddedData;
//---------------------------------------
std::wstring target_table_;
std::wstring table_name_;
@ -234,48 +237,45 @@ class process_build_object
public visitor<office_math>,
public visitor<office_spreadsheet>,
public const_visitor<chart_chart>,
public visitor<chart_chart>,
public const_visitor<chart_title>,
public const_visitor<chart_subtitle>,
public const_visitor<chart_footer>,
public const_visitor<chart_legend>,
public visitor<chart_title>,
public visitor<chart_subtitle>,
public visitor<chart_footer>,
public visitor<chart_legend>,
public const_visitor<chart_plot_area>,
public visitor<chart_plot_area>,
public const_visitor<chart_axis>,
public const_visitor<chart_categories>,
public const_visitor<chart_grid>,
public visitor<chart_axis>,
public visitor<chart_categories>,
public visitor<chart_grid>,
public const_visitor<chart_series>,
public const_visitor<chart_domain>,
public const_visitor<chart_data_point>,
public const_visitor<chart_mean_value>,
public const_visitor<chart_regression_curve>,
public const_visitor<chart_equation>,
public const_visitor<chart_error_indicator>,
public const_visitor<chart_wall>,
public const_visitor<chart_floor>,
public visitor<chart_series>,
public visitor<chart_domain>,
public visitor<chart_data_point>,
public visitor<chart_mean_value>,
public visitor<chart_regression_curve>,
public visitor<chart_equation>,
public visitor<chart_error_indicator>,
public visitor<chart_wall>,
public visitor<chart_floor>,
public const_visitor<table_table>,
public visitor<table_table>,
public const_visitor<table_table_row_group>,
public const_visitor<table_rows_no_group>,
public const_visitor<table_table_header_rows>,
public const_visitor<table_table_rows>,
public const_visitor<table_table_row>,
public visitor<table_table_rows>,
public visitor<table_table_row_group>,
public visitor<table_rows_no_group>,
public visitor<table_table_header_rows>,
public visitor<table_table_rows>,
public visitor<table_table_row>,
public const_visitor<table_table_cell>,
public const_visitor<table_covered_table_cell>,
public visitor<table_table_cell>,
public visitor<table_covered_table_cell>,
public const_visitor<table_table_column_group>,
public visitor<table_table_column_group>,
public visitor<table_table_header_columns>,
public visitor<table_table_columns>,
public const_visitor<table_table_column>,
public const_visitor<table_columns_no_group>
public visitor<table_table_column>,
public visitor<table_columns_no_group>
{
public:
@ -303,44 +303,39 @@ public:
virtual void visit(office_math & val);
virtual void visit(office_spreadsheet & val);
virtual void visit(const chart_chart & val);
virtual void visit(const chart_title & val);
virtual void visit(const chart_subtitle & val);
virtual void visit(const chart_footer & val);
virtual void visit(const chart_legend & val);
virtual void visit(const chart_plot_area& val);
virtual void visit(const chart_axis & val);
virtual void visit(const chart_series & val);
virtual void visit(const chart_domain & val);
virtual void visit(const chart_data_point & val);
virtual void visit(const chart_mean_value & val);
virtual void visit(const chart_error_indicator & val);
virtual void visit(const chart_regression_curve & val);
virtual void visit(const chart_equation & val);
virtual void visit(const chart_categories & val);
virtual void visit(const chart_grid & val);
virtual void visit(const chart_wall & val);
virtual void visit(const chart_floor & val);
virtual void visit(const table_table & val);
virtual void visit(chart_chart & val);
virtual void visit(chart_title & val);
virtual void visit(chart_subtitle & val);
virtual void visit(chart_footer & val);
virtual void visit(chart_legend & val);
virtual void visit(chart_plot_area& val);
virtual void visit(chart_axis & val);
virtual void visit(chart_series & val);
virtual void visit(chart_domain & val);
virtual void visit(chart_data_point & val);
virtual void visit(chart_mean_value & val);
virtual void visit(chart_error_indicator & val);
virtual void visit(chart_regression_curve & val);
virtual void visit(chart_equation & val);
virtual void visit(chart_categories & val);
virtual void visit(chart_grid & val);
virtual void visit(chart_wall & val);
virtual void visit(chart_floor & val);
virtual void visit(table_table & val);
virtual void visit(const table_table_rows & val);
virtual void visit(const table_rows_no_group & val);
virtual void visit(const table_table_row_group & val);
virtual void visit(const table_table_header_rows& val);
virtual void visit(table_table_header_rows & val);
virtual void visit(table_table_rows & val);
virtual void visit(table_table_row & val);
virtual void visit(table_rows_no_group & val);
virtual void visit(table_table_row_group & val);
virtual void visit(table_table_header_rows & val);
virtual void visit(table_table_rows & val);
virtual void visit(const table_table_row & val);
virtual void visit(const table_columns_no_group & val);
virtual void visit(table_columns_no_group & val);
virtual void visit(table_table_header_columns & val);
virtual void visit(table_table_columns & val);
virtual void visit(const table_table_column_group& val);
virtual void visit(const table_table_column & val);
virtual void visit(const table_table_cell& val);
virtual void visit(const table_covered_table_cell& val);
virtual void visit(table_table_columns & val);
virtual void visit(table_table_column_group & val);
virtual void visit(table_table_column & val);
virtual void visit(table_table_cell & val);
virtual void visit(table_covered_table_cell & val);
private:
bool stop_;

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()));
}
}
@ -393,7 +393,7 @@ std::wstring draw_object::office_convert(odf_document_ptr odfDocument, int type)
std::wstring temp_file = folderPath + FILE_SEPARATOR_STR + href_result;
COfficeUtils oCOfficeUtils(NULL);
oCOfficeUtils.CompressFileOrDirectory(objectOutPath.c_str(), temp_file.c_str(), true);
oCOfficeUtils.CompressFileOrDirectory(objectOutPath, temp_file, true);
}
NSDirectory::DeleteDirectory(objectOutPath);

View File

@ -46,7 +46,10 @@
#include "odf_document_impl.h"
#include "draw_common.h"
#include "../docx/docx_drawing.h"
#include "../docx/xlsx_package.h"
#include "chart_build_oox.h"
#include "calcs_styles.h"
@ -55,6 +58,7 @@
#include "datatypes/borderstyle.h"
#include "../../../Common/DocxFormat/Source/XML/Utils.h"
#include "../../../OfficeUtils/src/OfficeUtils.h"
namespace cpdoccore {
@ -880,7 +884,7 @@ void common_draw_docx_convert(oox::docx_conversion_context & Context, union_comm
if ((drawing->fill.bitmap) && (drawing->fill.bitmap->rId.empty()))
{
std::wstring href = drawing->fill.bitmap->xlink_href_;
drawing->fill.bitmap->rId = Context.add_mediaitem(href, oox::typeImage, drawing->fill.bitmap->isInternal, href);
drawing->fill.bitmap->rId = Context.get_mediaitems().add_or_find(href, oox::typeImage, drawing->fill.bitmap->isInternal, href);
}
////////////////////////////////////////////////////
@ -1155,7 +1159,7 @@ void draw_image::docx_convert(oox::docx_conversion_context & Context)
drawing->fill.bitmap = oox::oox_bitmap_fill::create();
drawing->fill.type = 2;
drawing->fill.bitmap->isInternal = false;
drawing->fill.bitmap->rId = Context.add_mediaitem(href, oox::typeImage, drawing->fill.bitmap->isInternal, href);
drawing->fill.bitmap->rId = Context.get_mediaitems().add_or_find(href, oox::typeImage, drawing->fill.bitmap->isInternal, href);
drawing->fill.bitmap->bStretch = true;
const std::wstring styleName = frame->common_draw_attlists_.shape_with_text_and_styles_.
@ -1457,17 +1461,18 @@ void draw_object::docx_convert(oox::docx_conversion_context & Context)
{
try
{
std::wstring href = common_xlink_attlist_.href_.get_value_or(L"");
std::wstring href = common_xlink_attlist_.href_.get_value_or(L"");
std::wstring tempPath = Context.root()->get_temp_folder();
std::wstring odfPath = Context.root()->get_folder();
if (!odf_document_ && !href.empty())
{
std::wstring folderPath = Context.root()->get_folder();
std::wstring objectPath = folderPath + FILE_SEPARATOR_STR + href;
std::wstring objectPath = odfPath + 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;
@ -1480,6 +1485,30 @@ void draw_object::docx_convert(oox::docx_conversion_context & Context)
process_build_object process_build_object_(objectBuild, odf_document_->odf_context());
contentSubDoc->accept(process_build_object_);
if (objectBuild.table_table_)
{
oox::xlsx_conversion_context xlsx_context(odf_document_.get());
cpdoccore::oox::package::xlsx_document outputXlsx;
xlsx_context.set_output_document (&outputXlsx);
xlsx_context.start_document();
objectBuild.table_table_->xlsx_convert(xlsx_context);
xlsx_context.end_document();
std::wstring href_folder = tempPath + FILE_SEPARATOR_STR + L"temp_xlsx";
NSDirectory::CreateDirectory(href_folder);
outputXlsx.write(href_folder);
std::wstring href = L"Microsoft_Excel_Worksheet_" + std::to_wstring(Context.get_mediaitems().count_object + 1) + L".xlsx";
COfficeUtils oCOfficeUtils(NULL);
if (S_OK == oCOfficeUtils.CompressFileOrDirectory(href_folder, odfPath + FILE_SEPARATOR_STR + href, true))
{
objectBuild.embeddedData = href;
}
}
objectBuild.docx_convert(Context);
frame = Context.get_drawing_context().get_current_frame(); //owner
@ -1497,7 +1526,7 @@ void draw_object::docx_convert(oox::docx_conversion_context & Context)
drawing->type = oox::typeChart;
bool isMediaInternal = true;
drawing->objectId = Context.add_mediaitem(href, drawing->type, isMediaInternal, href);
drawing->objectId = Context.get_mediaitems().add_or_find(href, drawing->type, isMediaInternal, href);
}
else if (objectBuild.object_type_ == 2 ) //embedded text
{
@ -1555,7 +1584,7 @@ void draw_object::docx_convert(oox::docx_conversion_context & Context)
bool isMediaInternal = true;
href += FILE_SEPARATOR_STR + href_new;
drawing->objectId = Context.add_mediaitem(href, drawing->type, isMediaInternal, href);
drawing->objectId = Context.get_mediaitems().add_or_find(href, drawing->type, isMediaInternal, href);
drawing->objectProgId = L"Excel.Sheet.12";
}
}
@ -1593,7 +1622,7 @@ void draw_object_ole::docx_convert(oox::docx_conversion_context & Context)
drawing->type = oox::typeOleObject;
bool isMediaInternal = true;
drawing->objectId = Context.add_mediaitem(href, drawing->type, isMediaInternal, href);
drawing->objectId = Context.get_mediaitems().add_or_find(href, drawing->type, isMediaInternal, href);
drawing->objectProgId = detectObject(objectPath);
}

View File

@ -39,11 +39,10 @@
#include <boost/regex.h>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/odf/odf_document.h>
#include "serialize_elements.h"
#include <cpdoccore/odf/odf_document.h>
#include "style_graphic_properties.h"
@ -53,9 +52,11 @@
#include "odf_document_impl.h"
#include "calcs_styles.h"
#include "../docx/pptx_drawing.h"
#include "chart_build_oox.h"
#include "../docx/pptx_drawing.h"
#include "../docx/xlsx_package.h"
#include "datatypes/length.h"
#include "datatypes/borderstyle.h"
@ -257,17 +258,18 @@ void draw_object::pptx_convert(oox::pptx_conversion_context & Context)
{
try
{
std::wstring href = common_xlink_attlist_.href_.get_value_or(L"");
std::wstring tempPath = Context.root()->get_temp_folder();
std::wstring odfPath = Context.root()->get_folder();
std::wstring href = common_xlink_attlist_.href_.get_value_or(L"");
if (!odf_document_ && !href.empty())
{
std::wstring folderPath = Context.root()->get_folder();
std::wstring objectPath = folderPath + FILE_SEPARATOR_STR + href;
std::wstring objectPath = odfPath + 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;
@ -281,7 +283,30 @@ void draw_object::pptx_convert(oox::pptx_conversion_context & Context)
process_build_object process_build_object_(objectBuild, odf_document_->odf_context() );
contentSubDoc->accept(process_build_object_);
if (objectBuild.table_table_)
{
oox::xlsx_conversion_context xlsx_context(odf_document_.get());
cpdoccore::oox::package::xlsx_document outputXlsx;
xlsx_context.set_output_document (&outputXlsx);
xlsx_context.start_document();
objectBuild.table_table_->xlsx_convert(xlsx_context);
xlsx_context.end_document();
std::wstring href_folder = tempPath + FILE_SEPARATOR_STR + L"temp_xlsx";
NSDirectory::CreateDirectory(href_folder);
outputXlsx.write(href_folder);
std::wstring href = L"Microsoft_Excel_Worksheet_" + std::to_wstring(Context.get_mediaitems().count_object + 1) + L".xlsx";
COfficeUtils oCOfficeUtils(NULL);
if (S_OK == oCOfficeUtils.CompressFileOrDirectory(href_folder, odfPath + FILE_SEPARATOR_STR + href, true))
{
objectBuild.embeddedData = href;
}
}
//---------------------------------------------------------------------------------------------------------------------
if (objectBuild.object_type_ == 1)//диаграмма
{

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

@ -67,7 +67,6 @@ std::wstring office_binary_data::write_to(const std::wstring & path)
{
std::wstring result;
NSFile::CBase64Converter base64;
int nLength = 0;
unsigned char *pData = NULL;

View File

@ -126,7 +126,7 @@ void office_body::docx_convert(oox::docx_conversion_context & Context)
if ((fill.bitmap) && (fill.bitmap->rId.empty()))
{
std::wstring href = fill.bitmap->xlink_href_;
fill.bitmap->rId = Context.add_mediaitem(href, oox::typeImage, fill.bitmap->isInternal, href);
fill.bitmap->rId = Context.get_mediaitems().add_or_find(href, oox::typeImage, fill.bitmap->isInternal, href);
}
int id = Context.get_drawing_context().get_current_shape_id();
if (layout_properties->docx_background_serialize(Context.output_stream(), Context, fill, id))

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

@ -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_;

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