mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-17 13:25:58 +08:00
Compare commits
247 Commits
core-linux
...
core-linux
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ac71aff74 | |||
| 5ae7acb65c | |||
| 33f07d69ad | |||
| 187bf8823a | |||
| cd7c85967c | |||
| 045b00ad5a | |||
| 9b5784e344 | |||
| 2b6650dde1 | |||
| ff8ecb2d2f | |||
| 5893b93e3a | |||
| 92313e106d | |||
| c462f522d6 | |||
| 5feb4b7b82 | |||
| 678ec98721 | |||
| c17fa8462d | |||
| 04eda04870 | |||
| cd9cc22185 | |||
| f01eb91316 | |||
| b9216e9bdc | |||
| 0295ef2d54 | |||
| 797b745b35 | |||
| 253c24cf03 | |||
| 02e8649a61 | |||
| 447dc81426 | |||
| 0f3c883d24 | |||
| 0b16b9a7f9 | |||
| 37c276b736 | |||
| 7014faa9a1 | |||
| 93287c84c8 | |||
| dafcbacfaf | |||
| 41ea42459a | |||
| bc68323506 | |||
| 1c73ff0c3f | |||
| 5a8c9069be | |||
| 4ba2e1fa6d | |||
| 95af281145 | |||
| 00fb2ba7bb | |||
| 0f65e36517 | |||
| aa1af73fda | |||
| 1610978821 | |||
| 20faf24556 | |||
| ae90e4ae96 | |||
| 6fae9115ea | |||
| c14a21b2da | |||
| b952692225 | |||
| 23249e69f9 | |||
| 09f6c3f4e8 | |||
| 111ceff368 | |||
| 867b0634f3 | |||
| f9c27275a7 | |||
| dd12ee0b9e | |||
| de83971832 | |||
| 0d158e46b5 | |||
| dde6b8bdc7 | |||
| b66bb0d63f | |||
| d666da2697 | |||
| 8e35f9b063 | |||
| 25268b706d | |||
| 97ff1efba8 | |||
| 1879ce8dbb | |||
| 50ff5fc0b2 | |||
| 537e774f79 | |||
| 6d3761c20b | |||
| ee41b4ccb2 | |||
| 7b0f902c0f | |||
| e6039f7f6f | |||
| 1c2b86519e | |||
| 755119c825 | |||
| 3a73480437 | |||
| 323d1b44cd | |||
| a99a195c68 | |||
| 0d979b8033 | |||
| dd3b671e57 | |||
| 74bd059607 | |||
| 83fa44edcd | |||
| 80fe4c0164 | |||
| 04f7527f9e | |||
| d92aa1f793 | |||
| af4e135fe2 | |||
| a5ef8c01b3 | |||
| 1b7f35b317 | |||
| 4079dea224 | |||
| 2ead42a513 | |||
| 427046cb8f | |||
| f4c112d523 | |||
| b082ffe20c | |||
| c589a6c947 | |||
| e60cc05b6e | |||
| 15b08aeebf | |||
| 672129c242 | |||
| 92689a7a57 | |||
| 31ebd7b14c | |||
| 1695668a6f | |||
| 77dfd5c12a | |||
| e600fe93b7 | |||
| 889a1f827a | |||
| 8cd55fb9c4 | |||
| 01b9309f09 | |||
| d3a4f00f76 | |||
| f65196d95b | |||
| 3ee5d685c2 | |||
| c0cd75dbd5 | |||
| a69453af4b | |||
| 3adcfecfb9 | |||
| a7d2191649 | |||
| db50e87fe0 | |||
| 36bdc7376a | |||
| 1321211336 | |||
| 8c834c5041 | |||
| c75aacaed8 | |||
| a4445cacaa | |||
| d6ad9e84e2 | |||
| d9687387f9 | |||
| eaa01c7995 | |||
| 597f360336 | |||
| d502206726 | |||
| d0d90c641c | |||
| 14fa14de3f | |||
| cced8f4912 | |||
| 2e40b96ed9 | |||
| 50ee7d7cc1 | |||
| f9b54bffd4 | |||
| a52a8e982e | |||
| 128529ba80 | |||
| a571c88798 | |||
| 34bb84a792 | |||
| 92d0d0d7ea | |||
| 449e3fc131 | |||
| ce9fdb33b5 | |||
| 2591f0a202 | |||
| 6bc04fc06f | |||
| 047850dbd6 | |||
| 465b903ec5 | |||
| 6afa54ebef | |||
| 27a0e77ef1 | |||
| c7b45910f8 | |||
| ab1abb96fe | |||
| 566d9e68e4 | |||
| 243b8eccdd | |||
| 76b682063e | |||
| effdab1ff4 | |||
| 658040f77b | |||
| 48aa99af83 | |||
| a1b738fc42 | |||
| 00e9ce56df | |||
| 2a4ce1f93f | |||
| 261e48227d | |||
| 29e3f90ebf | |||
| d4a70d306f | |||
| b9b843f25d | |||
| d7e2bedc6b | |||
| 234459f37c | |||
| 58cd45f4ee | |||
| 33f7ee49df | |||
| e7ed48af49 | |||
| cbd79c902e | |||
| 40c24b1577 | |||
| 95a49140cb | |||
| aad12cf471 | |||
| f0ffb7f14c | |||
| da329135e1 | |||
| 60ca9a2347 | |||
| 5fdace28d2 | |||
| 85549c5b20 | |||
| 4c8bc2227a | |||
| 23ca735f23 | |||
| 4acefb020f | |||
| 684d697cae | |||
| 1aa604c584 | |||
| 51569b626f | |||
| 89d7eb559d | |||
| f6b3a78fe8 | |||
| 1900e2f0a0 | |||
| d0e1785086 | |||
| 221d1ecbb5 | |||
| 2fc3b140d0 | |||
| bdb2ca8241 | |||
| 4055201322 | |||
| 5b305ec75d | |||
| 433686c01f | |||
| ccfc921883 | |||
| 6b0d6fe890 | |||
| 5ae20c58ed | |||
| 7b45fb8931 | |||
| d0ffc6f555 | |||
| 54e5bb8419 | |||
| f7bb1766c0 | |||
| f0bb87ba14 | |||
| a484dc1fd7 | |||
| 19cc78060c | |||
| 2682eda9c6 | |||
| 8d750adb7b | |||
| c517b3ac19 | |||
| f57b28cd24 | |||
| b8215e9e82 | |||
| f6305fca21 | |||
| 4cb984684d | |||
| 903d903aad | |||
| fe53ae9b11 | |||
| 8ca218d600 | |||
| 87a9542fc7 | |||
| 48a1f01220 | |||
| 8a2923e534 | |||
| 0ab7e55add | |||
| cb1cb43a0b | |||
| 0ca3432d05 | |||
| 50208be48d | |||
| c796f4a0f6 | |||
| 618da3c8cc | |||
| 9b4568e81a | |||
| 752acf1e46 | |||
| d9afc49bb3 | |||
| 4c6ba8ed41 | |||
| a0b32c1523 | |||
| a2cc70233e | |||
| 42c35a9803 | |||
| a395420d59 | |||
| c4ca4b5613 | |||
| 8100a2860f | |||
| dd83971001 | |||
| c4abf6d149 | |||
| c749cbf081 | |||
| c7accf4370 | |||
| b49e43c4cb | |||
| 322bc72ad1 | |||
| 33bf2df39d | |||
| aa344408b0 | |||
| 2a5d29c874 | |||
| 50ae01723c | |||
| c05ea1bd21 | |||
| 887905570a | |||
| 3e9e70655c | |||
| ed9a6e7e5c | |||
| 284b04574a | |||
| 67eb5ac139 | |||
| 563014f8d7 | |||
| 290d845d7a | |||
| 935e9396af | |||
| 4de2649dcd | |||
| a8bcd38bce | |||
| 46bc4e5e96 | |||
| 56475b7e8a | |||
| 69a69d9fc2 | |||
| 7d2f96d284 | |||
| e753476826 | |||
| 983873d010 | |||
| af037642dd |
7
.gitignore
vendored
7
.gitignore
vendored
@ -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
|
||||
|
||||
@ -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)*/;
|
||||
|
||||
|
||||
@ -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!!!
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 )
|
||||
{
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 );
|
||||
}
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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 );
|
||||
|
||||
@ -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()
|
||||
{
|
||||
|
||||
@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
@ -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>();
|
||||
|
||||
|
||||
@ -177,8 +177,6 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
unsigned char numberOfColumns;
|
||||
|
||||
/// An array of 16-bit signed integer that specifies horizontal distance in twips.
|
||||
|
||||
@ -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 );
|
||||
}
|
||||
|
||||
@ -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();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 );
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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 );
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -39,6 +39,7 @@ namespace DocFileFormat
|
||||
{
|
||||
friend class Converter;
|
||||
friend class MainDocumentMapping;
|
||||
friend class DocumentMapping;
|
||||
friend class CommandTableMapping;
|
||||
friend class StyleSheetMapping;
|
||||
friend class NumberingMapping;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -39,7 +39,7 @@ namespace Writers
|
||||
{
|
||||
class DocumentWriter : public ContentWriter
|
||||
{
|
||||
XmlUtils::CStringWriter m_oWriter;
|
||||
NSStringUtils::CStringBuilder m_oWriter;
|
||||
HeaderFooterWriter& m_oHeaderFooterWriter;
|
||||
public:
|
||||
std::wstring m_sDir;
|
||||
|
||||
@ -40,9 +40,9 @@ namespace Writers
|
||||
class ContentWriter
|
||||
{
|
||||
public:
|
||||
XmlUtils::CStringWriter m_oBackground;
|
||||
XmlUtils::CStringWriter m_oContent;
|
||||
XmlUtils::CStringWriter m_oSecPr;
|
||||
NSStringUtils::CStringBuilder m_oBackground;
|
||||
NSStringUtils::CStringBuilder m_oContent;
|
||||
NSStringUtils::CStringBuilder m_oSecPr;
|
||||
};
|
||||
class HdrFtrItem
|
||||
{
|
||||
|
||||
@ -38,7 +38,7 @@ namespace Writers
|
||||
{
|
||||
class MediaWriter
|
||||
{
|
||||
XmlUtils::CStringWriter m_oWriter;
|
||||
NSStringUtils::CStringBuilder m_oWriter;
|
||||
std::wstring m_sDir;
|
||||
std::wstring m_sMediaDir;
|
||||
public:
|
||||
|
||||
@ -41,11 +41,11 @@ namespace Writers
|
||||
|
||||
class NumberingWriter
|
||||
{
|
||||
XmlUtils::CStringWriter m_oWriter;
|
||||
NSStringUtils::CStringBuilder m_oWriter;
|
||||
std::wstring m_sDir;
|
||||
public:
|
||||
XmlUtils::CStringWriter m_oANum;
|
||||
XmlUtils::CStringWriter m_oNumList;
|
||||
NSStringUtils::CStringBuilder m_oANum;
|
||||
NSStringUtils::CStringBuilder m_oNumList;
|
||||
|
||||
NumberingWriter( std::wstring sDir) : m_sDir(sDir)
|
||||
{
|
||||
|
||||
@ -516,7 +516,7 @@ public:
|
||||
bRStyle || bSpacing || bDStrikeout || bCaps || bSmallCaps || bPosition || bFontHint || bBoldCs || bItalicCs || bFontSizeCs || bCs || bRtl || bLang || bLangBidi || bLangEA || bThemeColor || bVanish ||
|
||||
!Outline.empty() || !Fill.empty() || !Del.empty() || !Ins.empty() || !MoveFrom.empty() || !MoveTo.empty() || !rPrChange.empty();
|
||||
}
|
||||
void Write(XmlUtils::CStringWriter* pCStringWriter)
|
||||
void Write(NSStringUtils::CStringBuilder* pCStringWriter)
|
||||
{
|
||||
pCStringWriter->WriteString(L"<w:rPr>");
|
||||
if(bRStyle)
|
||||
@ -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,24 +803,38 @@ 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)
|
||||
void Write(NSStringUtils::CStringBuilder* pCStringWriter)
|
||||
{
|
||||
std::wstring sType;
|
||||
switch(byteType)
|
||||
@ -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)
|
||||
@ -916,7 +990,7 @@ public:
|
||||
class tblStylePr
|
||||
{
|
||||
public:
|
||||
XmlUtils::CStringWriter Writer;
|
||||
NSStringUtils::CStringBuilder Writer;
|
||||
BYTE Type;
|
||||
bool bType;
|
||||
public:
|
||||
@ -976,7 +1050,7 @@ public:
|
||||
bHeight = false;
|
||||
bPaddings = false;
|
||||
}
|
||||
void Write(XmlUtils::CStringWriter* pCStringWriter)
|
||||
void Write(NSStringUtils::CStringBuilder* pCStringWriter)
|
||||
{
|
||||
if(bType)
|
||||
{
|
||||
@ -1037,7 +1111,7 @@ public:
|
||||
// tblPr()
|
||||
// {
|
||||
// }
|
||||
// void Write(CStringWriter* pCStringWriter)
|
||||
// void Write(NSStringUtils::CStringBuilder* pCStringWriter)
|
||||
// {
|
||||
// }
|
||||
//};
|
||||
@ -1057,7 +1131,7 @@ public:
|
||||
bW = false;
|
||||
bWDocx = false;
|
||||
}
|
||||
void Write(XmlUtils::CStringWriter& pCStringWriter, const std::wstring& sName)
|
||||
void Write(NSStringUtils::CStringBuilder& pCStringWriter, const std::wstring& sName)
|
||||
{
|
||||
pCStringWriter.WriteString(Write(sName));
|
||||
}
|
||||
@ -1111,7 +1185,7 @@ public:
|
||||
bValue = false;
|
||||
bThemeColor = false;
|
||||
}
|
||||
void Write(std::wstring sName, XmlUtils::CStringWriter* pCStringWriter, bool bCell)
|
||||
void Write(std::wstring sName, NSStringUtils::CStringBuilder* pCStringWriter, bool bCell)
|
||||
{
|
||||
if(bValue)
|
||||
{
|
||||
@ -1202,7 +1276,7 @@ public:
|
||||
{
|
||||
return !(bLeft || bTop || bRight || bBottom || bInsideV || bInsideH || bBetween);
|
||||
}
|
||||
void Write(XmlUtils::CStringWriter* pCStringWriter, bool bCell)
|
||||
void Write(NSStringUtils::CStringBuilder* pCStringWriter, bool bCell)
|
||||
{
|
||||
if(bLeft)
|
||||
oLeft.Write(L"w:left", pCStringWriter, bCell);
|
||||
@ -1237,16 +1311,24 @@ public:
|
||||
class docLvl
|
||||
{
|
||||
public:
|
||||
long ILvl;
|
||||
long Format;
|
||||
BYTE Jc;
|
||||
std::vector<docLvlText*> Text;
|
||||
long Restart;
|
||||
long Start;
|
||||
BYTE Suff;
|
||||
XmlUtils::CStringWriter ParaPr;
|
||||
XmlUtils::CStringWriter TextPr;
|
||||
NSStringUtils::CStringBuilder ParaPr;
|
||||
NSStringUtils::CStringBuilder TextPr;
|
||||
std::wstring PStyle;
|
||||
bool Tentative;
|
||||
unsigned long Tplc;
|
||||
bool IsLgl;
|
||||
bool Legacy;
|
||||
long LegacyIndent;
|
||||
unsigned long LegacySpace;
|
||||
|
||||
bool bILvl;
|
||||
bool bFormat;
|
||||
bool bJc;
|
||||
bool bText;
|
||||
@ -1256,8 +1338,17 @@ public:
|
||||
bool bParaPr;
|
||||
bool bTextPr;
|
||||
bool bPStyle;
|
||||
bool bTentative;
|
||||
bool bTplc;
|
||||
bool bIsLgl;
|
||||
bool bLvlLegacy;
|
||||
bool bLegacy;
|
||||
bool bLegacyIndent;
|
||||
bool bLegacySpace;
|
||||
|
||||
docLvl()
|
||||
{
|
||||
bILvl = false;
|
||||
bFormat = false;
|
||||
bJc = false;
|
||||
bText = false;
|
||||
@ -1267,6 +1358,13 @@ public:
|
||||
bParaPr = false;
|
||||
bTextPr = false;
|
||||
bPStyle = false;
|
||||
bTentative = false;
|
||||
bTplc = false;
|
||||
bIsLgl = false;
|
||||
bLvlLegacy = false;
|
||||
bLegacy = false;
|
||||
bLegacyIndent = false;
|
||||
bLegacySpace = false;
|
||||
}
|
||||
~docLvl()
|
||||
{
|
||||
@ -1275,9 +1373,27 @@ public:
|
||||
delete Text[i];
|
||||
}
|
||||
}
|
||||
void Write(XmlUtils::CStringWriter& oWriter, int index)
|
||||
void Write(NSStringUtils::CStringBuilder& 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"\"");
|
||||
}
|
||||
if(bTentative)
|
||||
{
|
||||
if(Tentative)
|
||||
oWriter.WriteString(L" w:tentative=\"1\"");
|
||||
else
|
||||
oWriter.WriteString(L" w:tentative=\"0\"");
|
||||
}
|
||||
if(bTplc)
|
||||
{
|
||||
oWriter.WriteString(L" w:tplc=\"");
|
||||
oWriter.WriteString(XmlUtils::IntToString(Tplc, L"%08X"));
|
||||
oWriter.WriteString(L"\"");
|
||||
}
|
||||
oWriter.WriteString(L">");
|
||||
if(bStart)
|
||||
{
|
||||
oWriter.WriteString(L"<w:start w:val=\"" + std::to_wstring(Start) + L"\"/>");
|
||||
@ -1310,6 +1426,13 @@ public:
|
||||
std::wstring sStyleName = XmlUtils::EncodeXmlString(PStyle);
|
||||
oWriter.WriteString(L"<w:pStyle w:val=\"" + sStyleName + L"\"/>");
|
||||
}
|
||||
if(bIsLgl)
|
||||
{
|
||||
if(IsLgl)
|
||||
oWriter.WriteString(L"<w:isLgl/>");
|
||||
else
|
||||
oWriter.WriteString(L"<w:isLgl w:val=\"false\"/>");
|
||||
}
|
||||
if(bSuff)
|
||||
{
|
||||
std::wstring sSuff;
|
||||
@ -1348,6 +1471,30 @@ public:
|
||||
|
||||
oWriter.WriteString(sTextXml);
|
||||
}
|
||||
if(bLvlLegacy)
|
||||
{
|
||||
oWriter.WriteString(L"<w:legacy");
|
||||
if(bLegacy)
|
||||
{
|
||||
if(Legacy)
|
||||
oWriter.WriteString(L" w:legacy=\"1\"");
|
||||
else
|
||||
oWriter.WriteString(L" w:legacy=\"0\"");
|
||||
}
|
||||
if(bLegacyIndent)
|
||||
{
|
||||
oWriter.WriteString(L" w:legacyIndent=\"");
|
||||
oWriter.WriteString(std::to_wstring(LegacyIndent));
|
||||
oWriter.WriteString(L"\"");
|
||||
}
|
||||
if(bLegacySpace)
|
||||
{
|
||||
oWriter.WriteString(L" w:legacySpace=\"");
|
||||
oWriter.WriteString(std::to_wstring(LegacySpace));
|
||||
oWriter.WriteString(L"\"");
|
||||
}
|
||||
oWriter.WriteString(L"/>");
|
||||
}
|
||||
if(bJc)
|
||||
{
|
||||
std::wstring sJc;
|
||||
@ -1374,6 +1521,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(NSStringUtils::CStringBuilder& 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:
|
||||
@ -1394,7 +1583,7 @@ public:
|
||||
delete Lvls[i];
|
||||
}
|
||||
}
|
||||
void Write(XmlUtils::CStringWriter& oWriterANum)
|
||||
void Write(NSStringUtils::CStringBuilder& oWriterANum)
|
||||
{
|
||||
if(bId)
|
||||
{
|
||||
@ -1411,7 +1600,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 +1611,7 @@ class docNum
|
||||
public:
|
||||
long AId;
|
||||
long Id;
|
||||
std::vector<docLvlOverride*> LvlOverrides;
|
||||
|
||||
bool bAId;
|
||||
bool bId;
|
||||
@ -1430,12 +1620,21 @@ public:
|
||||
bAId = false;
|
||||
bId = false;
|
||||
}
|
||||
void Write(XmlUtils::CStringWriter& oWriterNumList)
|
||||
~docNum()
|
||||
{
|
||||
for(size_t i = 0; i < LvlOverrides.size(); ++i){
|
||||
RELEASEOBJECT(LvlOverrides[i]);
|
||||
}
|
||||
}
|
||||
void Write(NSStringUtils::CStringBuilder& 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>");
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -1451,7 +1650,7 @@ public:
|
||||
sName = name;
|
||||
bGridAfter = false;
|
||||
}
|
||||
void Write(XmlUtils::CStringWriter& writer)
|
||||
void Write(NSStringUtils::CStringBuilder& writer)
|
||||
{
|
||||
if(bGridAfter && nGridAfter > 0)
|
||||
{
|
||||
@ -1468,7 +1667,7 @@ public:
|
||||
std::wstring href;
|
||||
std::wstring anchor;
|
||||
std::wstring tooltip;
|
||||
XmlUtils::CStringWriter writer;
|
||||
NSStringUtils::CStringBuilder writer;
|
||||
static WriteHyperlink* Parse(std::wstring fld)
|
||||
{
|
||||
WriteHyperlink* res = NULL;
|
||||
@ -1547,7 +1746,7 @@ public:
|
||||
}
|
||||
return res;
|
||||
}
|
||||
void Write(XmlUtils::CStringWriter& wr)
|
||||
void Write(NSStringUtils::CStringBuilder& wr)
|
||||
{
|
||||
if(false == rId.empty())
|
||||
{
|
||||
@ -1593,7 +1792,6 @@ public:
|
||||
};
|
||||
class CComment{
|
||||
private:
|
||||
typedef std::wstring (*funcArg)(CComment* pComment);
|
||||
IdCounter& m_oParaIdCounter;
|
||||
IdCounter& m_oFormatIdCounter;
|
||||
public:
|
||||
@ -1654,13 +1852,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)
|
||||
@ -1744,25 +1942,22 @@ public:
|
||||
sRes += L"\"";
|
||||
}
|
||||
sRes += L">";
|
||||
if(false == pComment->Text.empty())
|
||||
std::wstring sText = pComment->Text;
|
||||
|
||||
XmlUtils::replace_all(sText, L"\r", L"");
|
||||
|
||||
bool bFirst = true;
|
||||
int nPrevIndex = 0;
|
||||
for (int i = 0; i < (int)sText.length(); i++)
|
||||
{
|
||||
std::wstring sText = pComment->Text;
|
||||
|
||||
XmlUtils::replace_all(sText, L"\r", L"");
|
||||
|
||||
bool bFirst = true;
|
||||
int nPrevIndex = 0;
|
||||
for (int i = 0; i < (int)sText.length(); i++)
|
||||
wchar_t cToken = sText[i];
|
||||
if('\n' == cToken)
|
||||
{
|
||||
wchar_t cToken = sText[i];
|
||||
if('\n' == cToken)
|
||||
{
|
||||
bFirst = writeContentWritePart(pComment, sText, nPrevIndex, i, bFirst, sRes);
|
||||
nPrevIndex = i + 1;
|
||||
}
|
||||
bFirst = writeContentWritePart(pComment, sText, nPrevIndex, i, bFirst, sRes);
|
||||
nPrevIndex = i + 1;
|
||||
}
|
||||
writeContentWritePart(pComment, sText, nPrevIndex, (int)sText.length(), bFirst, sRes);
|
||||
}
|
||||
writeContentWritePart(pComment, sText, nPrevIndex, (int)sText.length(), bFirst, sRes);
|
||||
sRes += L"</w:comment>";
|
||||
return sRes;
|
||||
}
|
||||
@ -1852,7 +2047,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 +2056,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;
|
||||
}
|
||||
@ -2457,7 +2652,7 @@ public: CFramePr()
|
||||
{
|
||||
return !(bDropCap || bH || bHAnchor || bHRule || bHSpace || bLines || bVAnchor || bVSpace || bW || bWrap || bX || bXAlign || bY || bYAlign);
|
||||
}
|
||||
void Write(XmlUtils::CStringWriter& oStringWriter)
|
||||
void Write(NSStringUtils::CStringBuilder& oStringWriter)
|
||||
{
|
||||
oStringWriter.WriteString(L"<w:framePr");
|
||||
if(bDropCap)
|
||||
@ -2595,7 +2790,7 @@ public:
|
||||
std::wstring sDocLocation;
|
||||
std::wstring sTgtFrame;
|
||||
|
||||
XmlUtils::CStringWriter writer;
|
||||
NSStringUtils::CStringBuilder writer;
|
||||
|
||||
bool bHistory;
|
||||
public:
|
||||
@ -2603,7 +2798,7 @@ public:
|
||||
{
|
||||
bHistory = false;
|
||||
}
|
||||
void Write(XmlUtils::CStringWriter& wr)
|
||||
void Write(NSStringUtils::CStringBuilder& wr)
|
||||
{
|
||||
if(false == rId.empty())
|
||||
{
|
||||
@ -2634,12 +2829,12 @@ public:
|
||||
class CFldSimple{
|
||||
public:
|
||||
std::wstring sInstr;
|
||||
XmlUtils::CStringWriter writer;
|
||||
NSStringUtils::CStringBuilder writer;
|
||||
public:
|
||||
CFldSimple()
|
||||
{
|
||||
}
|
||||
void Write(XmlUtils::CStringWriter& wr)
|
||||
void Write(NSStringUtils::CStringBuilder& wr)
|
||||
{
|
||||
if(false == sInstr.empty())
|
||||
{
|
||||
@ -2664,14 +2859,14 @@ public:
|
||||
long* vMergeOrigin;
|
||||
|
||||
rPr* RPr;
|
||||
XmlUtils::CStringWriter* PPr;
|
||||
NSStringUtils::CStringBuilder* PPr;
|
||||
SectPr* sectPr;
|
||||
CWiterTblPr* tblPr;
|
||||
XmlUtils::CStringWriter* tblGridChange;
|
||||
XmlUtils::CStringWriter* trPr;
|
||||
XmlUtils::CStringWriter* tcPr;
|
||||
XmlUtils::CStringWriter* content;
|
||||
XmlUtils::CStringWriter* contentRun;
|
||||
NSStringUtils::CStringBuilder* tblGridChange;
|
||||
NSStringUtils::CStringBuilder* trPr;
|
||||
NSStringUtils::CStringBuilder* tcPr;
|
||||
NSStringUtils::CStringBuilder* content;
|
||||
NSStringUtils::CStringBuilder* contentRun;
|
||||
TrackRevision()
|
||||
{
|
||||
Id = NULL;
|
||||
@ -2708,11 +2903,11 @@ public:
|
||||
}
|
||||
std::wstring ToString(std::wstring sName)
|
||||
{
|
||||
XmlUtils::CStringWriter writer;
|
||||
NSStringUtils::CStringBuilder writer;
|
||||
Write(&writer, sName);
|
||||
return writer.GetData();
|
||||
}
|
||||
void Write(XmlUtils::CStringWriter* pCStringWriter, std::wstring sName)
|
||||
void Write(NSStringUtils::CStringBuilder* pCStringWriter, std::wstring sName)
|
||||
{
|
||||
if(IsNoEmpty())
|
||||
{
|
||||
|
||||
@ -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
@ -37,13 +37,13 @@
|
||||
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
|
||||
{
|
||||
std::wstring m_sDir;
|
||||
XmlUtils::CStringWriter m_oSettingWriter;
|
||||
NSStringUtils::CStringBuilder m_oSettingWriter;
|
||||
HeaderFooterWriter& m_oHeaderFooterWriter;
|
||||
public:
|
||||
SettingWriter(std::wstring sDir, HeaderFooterWriter& oHeaderFooterWriter):m_sDir(sDir),m_oHeaderFooterWriter(oHeaderFooterWriter)
|
||||
|
||||
@ -46,12 +46,12 @@ namespace Writers
|
||||
|
||||
class StylesWriter
|
||||
{
|
||||
XmlUtils::CStringWriter m_oWriter;
|
||||
NSStringUtils::CStringBuilder m_oWriter;
|
||||
std::wstring m_sDir;
|
||||
public:
|
||||
XmlUtils::CStringWriter m_Styles;
|
||||
XmlUtils::CStringWriter m_rPrDefault;
|
||||
XmlUtils::CStringWriter m_pPrDefault;
|
||||
NSStringUtils::CStringBuilder m_Styles;
|
||||
NSStringUtils::CStringBuilder m_rPrDefault;
|
||||
NSStringUtils::CStringBuilder m_pPrDefault;
|
||||
int m_nVersion;
|
||||
StylesWriter(std::wstring sDir, int nVersion):m_sDir(sDir),m_nVersion(nVersion)
|
||||
{
|
||||
|
||||
@ -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
|
||||
@ -44,34 +43,30 @@ namespace Writers
|
||||
|
||||
class FontTableWriter
|
||||
{
|
||||
XmlUtils::CStringWriter m_oWriter;
|
||||
NSStringUtils::CStringBuilder 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)
|
||||
|
||||
@ -201,7 +201,17 @@ extern int g_nCurFormatVersion;
|
||||
StyleLink = 23,
|
||||
lvl_NumFmt = 24,
|
||||
NumFmtVal = 25,
|
||||
NumFmtFormat = 26
|
||||
NumFmtFormat = 26,
|
||||
Num_LvlOverride = 27,
|
||||
StartOverride = 28,
|
||||
ILvl = 29,
|
||||
Tentative = 30,
|
||||
Tplc = 31,
|
||||
IsLgl = 32,
|
||||
LvlLegacy = 33,
|
||||
Legacy = 34,
|
||||
LegacyIndent = 35,
|
||||
LegacySpace = 36
|
||||
};}
|
||||
namespace c_oSerOtherTableTypes{enum c_oSerOtherTableTypes
|
||||
{
|
||||
@ -262,7 +272,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
@ -599,7 +599,7 @@ namespace BinXlsxRW{
|
||||
//как в CsvReader - подозрительный код
|
||||
WCHAR *pEndPtr;
|
||||
wcstod(val.c_str(), &pEndPtr);
|
||||
if (NULL != *pEndPtr)
|
||||
if (0 != *pEndPtr)
|
||||
{
|
||||
// Не число
|
||||
aSharedStrings.push_back(val);
|
||||
|
||||
@ -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>")));
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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 += \
|
||||
|
||||
@ -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 */,
|
||||
@ -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;
|
||||
};
|
||||
|
||||
@ -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,27 @@ 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}
|
||||
{50E20601-4A8D-4AFB-8870-63828D328429} = {50E20601-4A8D-4AFB-8870-63828D328429}
|
||||
{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}
|
||||
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C} = {C27E9A9F-3A17-4482-9C5F-BF15C01E747C}
|
||||
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 +48,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 +64,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 +80,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 +96,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 +112,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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "../include/cpdoccore/CPScopedPtr.h"
|
||||
#include "../include/CPScopedPtr.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace formulasconvert {
|
||||
|
||||
@ -1,44 +1,44 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
// поиск ближайшего цвета из
|
||||
// Black, Green, White, Blue, Magenta, Yellow, Cyan, Red
|
||||
std::wstring RGBToString(int r, int g, int b);
|
||||
|
||||
// разбор HEX-строки с цветом
|
||||
bool HEXStringToRGB(std::wstring const & str, int &r, int &g, int &b);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
// поиск ближайшего цвета из
|
||||
// Black, Green, White, Blue, Magenta, Yellow, Cyan, Red
|
||||
std::wstring RGBToString(int r, int g, int b);
|
||||
|
||||
// разбор HEX-строки с цветом
|
||||
bool HEXStringToRGB(std::wstring const & str, int &r, int &g, int &b);
|
||||
|
||||
}
|
||||
|
||||
@ -1,40 +1,40 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
typedef ::boost::noncopyable noncopyable;
|
||||
|
||||
} // namespace cpdoccore
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
typedef ::boost::noncopyable noncopyable;
|
||||
|
||||
} // namespace cpdoccore
|
||||
@ -1,48 +1,48 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/optional/optional_io.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
/// внешнее объявление для Optional, используем boost::optional
|
||||
|
||||
template <class T>
|
||||
struct optional
|
||||
{
|
||||
typedef T Base;
|
||||
typedef boost::optional<T> Type;
|
||||
};
|
||||
|
||||
|
||||
#define _CP_OPT(V) optional<V>::Type
|
||||
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/optional/optional_io.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
/// внешнее объявление для Optional, используем boost::optional
|
||||
|
||||
template <class T>
|
||||
struct optional
|
||||
{
|
||||
typedef T Base;
|
||||
typedef boost::optional<T> Type;
|
||||
};
|
||||
|
||||
|
||||
#define _CP_OPT(V) optional<V>::Type
|
||||
|
||||
@ -1,46 +1,46 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
template <class T>
|
||||
struct scoped_ptr
|
||||
{
|
||||
typedef ::boost::scoped_ptr<T> Type;
|
||||
};
|
||||
|
||||
#define _CP_SCOPED_PTR(T) scoped_ptr< T >::Type
|
||||
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
template <class T>
|
||||
struct scoped_ptr
|
||||
{
|
||||
typedef ::boost::scoped_ptr<T> Type;
|
||||
};
|
||||
|
||||
#define _CP_SCOPED_PTR(T) scoped_ptr< T >::Type
|
||||
|
||||
}
|
||||
@ -1,48 +1,48 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
template <class T>
|
||||
struct shared_ptr
|
||||
{
|
||||
typedef ::boost::shared_ptr<T> Type;
|
||||
};
|
||||
|
||||
#define _CP_PTR(T) shared_ptr< T >::Type
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
template <class T>
|
||||
struct shared_ptr
|
||||
{
|
||||
typedef ::boost::shared_ptr<T> Type;
|
||||
};
|
||||
|
||||
#define _CP_PTR(T) shared_ptr< T >::Type
|
||||
|
||||
}
|
||||
|
||||
@ -1,39 +1,39 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#include <string>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
std::string ansi_to_utf8(const std::string & _AnsiString);
|
||||
std::wstring utf8_to_utf16(const std::string & _Utf8String);
|
||||
std::string utf16_to_utf8(const std::wstring & _Utf16String);
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#include <string>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
std::string ansi_to_utf8(const std::string & _AnsiString);
|
||||
std::wstring utf8_to_utf16(const std::string & _Utf8String);
|
||||
std::string utf16_to_utf8(const std::wstring & _Utf16String);
|
||||
}
|
||||
@ -1,44 +1,44 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/weak_ptr.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
template <class T>
|
||||
struct weak_ptr
|
||||
{
|
||||
typedef ::boost::weak_ptr<T> Type;
|
||||
};
|
||||
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/weak_ptr.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
template <class T>
|
||||
struct weak_ptr
|
||||
{
|
||||
typedef ::boost::weak_ptr<T> Type;
|
||||
};
|
||||
|
||||
}
|
||||
@ -1,76 +1,76 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "../CPSharedPtr.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
namespace xml {
|
||||
|
||||
class sax;
|
||||
|
||||
class attributes;
|
||||
|
||||
typedef attributes attributes_wc;
|
||||
|
||||
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
|
||||
|
||||
}
|
||||
|
||||
namespace common {
|
||||
|
||||
// Базовый класс для элемента, который может быть прочитан sax-reader -ом
|
||||
// Для каждого элемента будут вызваны методы
|
||||
// add_attributes, add_child_element, add_text как колбеки для чтения соответствующих данных
|
||||
|
||||
class read_doc_element
|
||||
{
|
||||
public:
|
||||
bool read_sax( xml::sax * Reader);
|
||||
virtual ~read_doc_element() = 0;
|
||||
|
||||
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name) = 0;
|
||||
private:
|
||||
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes ) = 0;
|
||||
virtual void add_text (const std::wstring & Text) = 0;
|
||||
|
||||
};
|
||||
|
||||
inline read_doc_element::~read_doc_element()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "../CPSharedPtr.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
namespace xml {
|
||||
|
||||
class sax;
|
||||
|
||||
class attributes;
|
||||
|
||||
typedef attributes attributes_wc;
|
||||
|
||||
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
|
||||
|
||||
}
|
||||
|
||||
namespace common {
|
||||
|
||||
// Базовый класс для элемента, который может быть прочитан sax-reader -ом
|
||||
// Для каждого элемента будут вызваны методы
|
||||
// add_attributes, add_child_element, add_text как колбеки для чтения соответствующих данных
|
||||
|
||||
class read_doc_element
|
||||
{
|
||||
public:
|
||||
bool read_sax( xml::sax * Reader);
|
||||
virtual ~read_doc_element() = 0;
|
||||
|
||||
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name) = 0;
|
||||
private:
|
||||
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes ) = 0;
|
||||
virtual void add_text (const std::wstring & Text) = 0;
|
||||
|
||||
};
|
||||
|
||||
inline read_doc_element::~read_doc_element()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,45 +1,45 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include "logging.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace common {
|
||||
|
||||
template <class T, class StringT>
|
||||
typename optional<T>::Type read_string( const StringT & Value );
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../CPOptional.h"
|
||||
#include "logging.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace common {
|
||||
|
||||
template <class T, class StringT>
|
||||
typename optional<T>::Type read_string( const StringT & Value );
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,62 +1,62 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
namespace xml {
|
||||
|
||||
class sax;
|
||||
template <class StringT>
|
||||
class attributes;
|
||||
|
||||
typedef attributes< std::wstring > attributes_wc;
|
||||
|
||||
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
|
||||
}
|
||||
|
||||
namespace common {
|
||||
|
||||
class write_doc_element {
|
||||
public:
|
||||
virtual std::wostream & write_stream( std::wostream & _Wostream ) = 0;
|
||||
virtual ~write_doc_element() = 0;
|
||||
};
|
||||
|
||||
inline write_doc_element::~write_doc_element()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
namespace xml {
|
||||
|
||||
class sax;
|
||||
template <class StringT>
|
||||
class attributes;
|
||||
|
||||
typedef attributes< std::wstring > attributes_wc;
|
||||
|
||||
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
|
||||
}
|
||||
|
||||
namespace common {
|
||||
|
||||
class write_doc_element {
|
||||
public:
|
||||
virtual std::wostream & write_stream( std::wostream & _Wostream ) = 0;
|
||||
virtual ~write_doc_element() = 0;
|
||||
};
|
||||
|
||||
inline write_doc_element::~write_doc_element()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,88 +1,90 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "../CPSharedPtr.h"
|
||||
#include "../CPScopedPtr.h"
|
||||
|
||||
struct ProgressCallback;
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
namespace xml
|
||||
{
|
||||
class sax;
|
||||
}
|
||||
|
||||
namespace oox {
|
||||
class docx_conversion_context;
|
||||
class xlsx_conversion_context;
|
||||
class pptx_conversion_context;
|
||||
}
|
||||
|
||||
namespace odf_reader {
|
||||
|
||||
class odf_read_context;
|
||||
|
||||
class odf_document
|
||||
{
|
||||
public:
|
||||
odf_document(const std::wstring & Folder, const ProgressCallback* CallBack);
|
||||
odf_document(xml::sax * Reader);
|
||||
|
||||
~odf_document();
|
||||
|
||||
odf_read_context & odf_context();
|
||||
|
||||
bool docx_convert(oox::docx_conversion_context & Context);
|
||||
bool xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
bool pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
const std::wstring & get_folder() const;
|
||||
|
||||
int get_office_mime_type();
|
||||
bool get_encrypted();
|
||||
|
||||
class Impl;
|
||||
Impl * get_impl() { return impl_.get(); }
|
||||
|
||||
bool UpdateProgress(long Complete);
|
||||
|
||||
private:
|
||||
_CP_SCOPED_PTR(Impl) impl_;
|
||||
|
||||
};
|
||||
typedef shared_ptr<odf_document>::Type odf_document_ptr;
|
||||
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "../CPSharedPtr.h"
|
||||
#include "../CPScopedPtr.h"
|
||||
|
||||
struct ProgressCallback;
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
namespace xml
|
||||
{
|
||||
class sax;
|
||||
}
|
||||
|
||||
namespace oox {
|
||||
class docx_conversion_context;
|
||||
class xlsx_conversion_context;
|
||||
class pptx_conversion_context;
|
||||
}
|
||||
|
||||
namespace odf_reader {
|
||||
|
||||
class odf_read_context;
|
||||
|
||||
class odf_document
|
||||
{
|
||||
public:
|
||||
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();
|
||||
|
||||
odf_read_context & odf_context();
|
||||
|
||||
bool docx_convert(oox::docx_conversion_context & Context);
|
||||
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_temp_folder() const;
|
||||
|
||||
int get_office_mime_type();
|
||||
bool get_encrypted();
|
||||
bool get_error();
|
||||
|
||||
class Impl;
|
||||
Impl * get_impl() { return impl_.get(); }
|
||||
|
||||
bool UpdateProgress(long Complete);
|
||||
|
||||
private:
|
||||
_CP_SCOPED_PTR(Impl) impl_;
|
||||
|
||||
};
|
||||
typedef shared_ptr<odf_document>::Type odf_document_ptr;
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,35 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#ifndef _CPDOCCORE_ODFFORAMT_H_
|
||||
#define _CPDOCCORE_ODFFORMAT_H_
|
||||
|
||||
#endif // #ifndef _CPDOCCORE_ODFFORAMT_H_
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#ifndef _CPDOCCORE_ODFFORAMT_H_
|
||||
#define _CPDOCCORE_ODFFORMAT_H_
|
||||
|
||||
#endif // #ifndef _CPDOCCORE_ODFFORAMT_H_
|
||||
@ -1,34 +1,34 @@
|
||||
// Copyright 2006 Nemanja Trifunovic
|
||||
|
||||
/*
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
||||
#define UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
||||
|
||||
#include "utf8/checked.h"
|
||||
#include "utf8/unchecked.h"
|
||||
|
||||
#endif // header guard
|
||||
// Copyright 2006 Nemanja Trifunovic
|
||||
|
||||
/*
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
||||
#define UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
||||
|
||||
#include "utf8/checked.h"
|
||||
#include "utf8/unchecked.h"
|
||||
|
||||
#endif // header guard
|
||||
@ -161,12 +161,12 @@ namespace utf8
|
||||
|
||||
template <typename octet_iterator>
|
||||
uint32_t prior(octet_iterator& it, octet_iterator start)
|
||||
{
|
||||
{
|
||||
// can't do much if it == start
|
||||
if (it == start)
|
||||
if (it == start)
|
||||
throw not_enough_room();
|
||||
|
||||
octet_iterator end = it;
|
||||
octet_iterator end = it;
|
||||
// Go back until we hit either a lead octet or start
|
||||
while (internal::is_trail(*(--it)))
|
||||
if (it == start)
|
||||
@ -1,259 +1,259 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "../../cpdoccore/CPSharedPtr.h"
|
||||
#include "../../cpdoccore/CPOptional.h"
|
||||
#include "../../cpdoccore/xml/xmlchar.h"
|
||||
|
||||
#include "../../logging.h"
|
||||
|
||||
#include <boost/variant.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "../../../../Common/DocxFormat/Source/XML/Utils.h"
|
||||
|
||||
namespace cpdoccore
|
||||
{
|
||||
namespace odf_reader
|
||||
{
|
||||
struct _property
|
||||
{
|
||||
_property(std::wstring n, std::wstring s) { name_ = n; val_ = s;}
|
||||
_property(std::wstring n, bool b) { name_ = n; val_ = b;}
|
||||
_property(std::wstring n, int i) { name_ = n; val_ = i;}
|
||||
_property(std::wstring n, double d) {name_ = n;val_ = d;}
|
||||
|
||||
std::wstring name_;
|
||||
boost::variant<bool,std::wstring,double,int> val_;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
bool GetProperty(const std::vector<_property> & Heap, const std::wstring Name, T & Val)
|
||||
{
|
||||
typedef typename T::value_type T_value_type;
|
||||
|
||||
Val.reset();
|
||||
for (size_t i = 0 ; i < Heap.size(); i++)
|
||||
{
|
||||
if (Heap[i].name_ == Name )
|
||||
{
|
||||
try
|
||||
{
|
||||
Val = boost::get<T_value_type>(Heap[i].val_);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
_CP_LOG << L"[warning] : incorrect type convert \'" << Name << L"\'\n";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
namespace xml
|
||||
{
|
||||
|
||||
class sax;
|
||||
|
||||
class attributes
|
||||
{
|
||||
public:
|
||||
typedef optional<std::wstring>::Type value_type;
|
||||
typedef std::pair< std::wstring, std::wstring> key_value;
|
||||
|
||||
public:
|
||||
virtual value_type get(const std::wstring & QualifiedName) const = 0;
|
||||
|
||||
template <class V> typename optional<V>::Type get_val(const std::wstring & QualifiedName);
|
||||
|
||||
virtual const key_value & at(size_t _Pos) const = 0;
|
||||
virtual size_t size() const = 0;
|
||||
size_t length() const ;
|
||||
bool empty() const;
|
||||
|
||||
virtual void reset_check() const = 0;
|
||||
virtual bool check() const = 0;
|
||||
|
||||
virtual ~attributes() = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class V>
|
||||
class attributes_get_val_impl
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename optional<V>::Type optional_V_type;
|
||||
|
||||
static typename optional<V>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
try
|
||||
{
|
||||
return optional_V_type (boost::lexical_cast<V>( *val ) );
|
||||
//return common::read_string<V>( *val );
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
_CP_LOG << L"[warning] : could't read attribute \'" << QualifiedName << L"\'\n";
|
||||
}
|
||||
}
|
||||
|
||||
return optional_V_type();
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class attributes_get_val_impl<bool>
|
||||
{
|
||||
public:
|
||||
|
||||
typedef xml::xml_char<wchar_t> xml_char_value_type;
|
||||
|
||||
static optional<bool>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
std::wstring tmp = *val;
|
||||
tmp = XmlUtils::GetLower(tmp);
|
||||
return optional<bool>::Type((tmp == xml_char_value_type::trueVal));
|
||||
}
|
||||
else
|
||||
return optional<bool>::Type();
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class attributes_get_val_impl<char>
|
||||
{
|
||||
public:
|
||||
static optional<char>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
std::wstring tmp = *val;
|
||||
return optional<char>::Type( (tmp.size() > 0) ? tmp[0] : ' ');
|
||||
}
|
||||
else
|
||||
return optional<char>::Type();
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class attributes_get_val_impl<wchar_t>
|
||||
{
|
||||
public:
|
||||
static optional<wchar_t>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
std::wstring tmp = *val;
|
||||
return optional<wchar_t>::Type( (tmp.size() > 0) ? tmp[0] : L' ');
|
||||
}
|
||||
else
|
||||
return optional<wchar_t>::Type();
|
||||
}
|
||||
};
|
||||
|
||||
template <class V>
|
||||
inline typename optional<V>::Type attributes::get_val(const std::wstring & QualifiedName)
|
||||
{
|
||||
return attributes_get_val_impl<V>::get_val(*this, QualifiedName);
|
||||
}
|
||||
|
||||
inline attributes::~attributes()
|
||||
{}
|
||||
|
||||
inline size_t attributes::length() const
|
||||
{
|
||||
return this->size();
|
||||
}
|
||||
|
||||
inline bool attributes::empty() const
|
||||
{
|
||||
return (this->size() == 0);
|
||||
}
|
||||
|
||||
struct attributes_ptr
|
||||
{
|
||||
typedef shared_ptr< attributes >::Type Type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef attributes attributes_wc;
|
||||
|
||||
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
|
||||
|
||||
template <class T>
|
||||
static bool _cp_apply_attribute(xml::attributes_wc_ptr attr, const std::wstring & QualifiedName, T & Val)
|
||||
{
|
||||
Val = attr->get_val<typename T::value_type>(QualifiedName);
|
||||
return (!!Val);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static bool _cp_apply_attribute(xml::attributes_wc_ptr attr, const std::wstring & QualifiedName, T & Val, const T & Default)
|
||||
{
|
||||
typedef typename optional<T>::Type type_opt_t;
|
||||
type_opt_t tmp;
|
||||
try
|
||||
{
|
||||
tmp = attr->get_val<T>(QualifiedName);
|
||||
Val = tmp.get_value_or(Default);
|
||||
}catch(...)
|
||||
{
|
||||
}
|
||||
return (!!tmp);
|
||||
}
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#define CP_APPLY_ATTR(NAME, VAL, ...) _cp_apply_attribute(Attributes, (NAME), (VAL), __VA_ARGS__)
|
||||
#else
|
||||
#define CP_APPLY_ATTR(NAME, VAL, ...) _cp_apply_attribute(Attributes, (NAME), (VAL), ##__VA_ARGS__)
|
||||
#endif
|
||||
attributes_wc_ptr read_attributes(sax * SaxReader);
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "../CPSharedPtr.h"
|
||||
#include "../CPOptional.h"
|
||||
#include "../xml/xmlchar.h"
|
||||
|
||||
#include "../logging.h"
|
||||
|
||||
#include <boost/variant.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "../../../../Common/DocxFormat/Source/XML/Utils.h"
|
||||
|
||||
namespace cpdoccore
|
||||
{
|
||||
namespace odf_reader
|
||||
{
|
||||
struct _property
|
||||
{
|
||||
_property(std::wstring n, std::wstring s) { name_ = n; val_ = s;}
|
||||
_property(std::wstring n, bool b) { name_ = n; val_ = b;}
|
||||
_property(std::wstring n, int i) { name_ = n; val_ = i;}
|
||||
_property(std::wstring n, double d) {name_ = n;val_ = d;}
|
||||
|
||||
std::wstring name_;
|
||||
boost::variant<bool,std::wstring,double,int> val_;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
bool GetProperty(const std::vector<_property> & Heap, const std::wstring Name, T & Val)
|
||||
{
|
||||
typedef typename T::value_type T_value_type;
|
||||
|
||||
Val.reset();
|
||||
for (size_t i = 0 ; i < Heap.size(); i++)
|
||||
{
|
||||
if (Heap[i].name_ == Name )
|
||||
{
|
||||
try
|
||||
{
|
||||
Val = boost::get<T_value_type>(Heap[i].val_);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
_CP_LOG << L"[warning] : incorrect type convert \'" << Name << L"\'\n";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
namespace xml
|
||||
{
|
||||
|
||||
class sax;
|
||||
|
||||
class attributes
|
||||
{
|
||||
public:
|
||||
typedef optional<std::wstring>::Type value_type;
|
||||
typedef std::pair< std::wstring, std::wstring> key_value;
|
||||
|
||||
public:
|
||||
virtual value_type get(const std::wstring & QualifiedName) const = 0;
|
||||
|
||||
template <class V> typename optional<V>::Type get_val(const std::wstring & QualifiedName);
|
||||
|
||||
virtual const key_value & at(size_t _Pos) const = 0;
|
||||
virtual size_t size() const = 0;
|
||||
size_t length() const ;
|
||||
bool empty() const;
|
||||
|
||||
virtual void reset_check() const = 0;
|
||||
virtual bool check() const = 0;
|
||||
|
||||
virtual ~attributes() = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class V>
|
||||
class attributes_get_val_impl
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename optional<V>::Type optional_V_type;
|
||||
|
||||
static typename optional<V>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
try
|
||||
{
|
||||
return optional_V_type (boost::lexical_cast<V>( *val ) );
|
||||
//return common::read_string<V>( *val );
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
_CP_LOG << L"[warning] : could't read attribute \'" << QualifiedName << L"\'\n";
|
||||
}
|
||||
}
|
||||
|
||||
return optional_V_type();
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class attributes_get_val_impl<bool>
|
||||
{
|
||||
public:
|
||||
|
||||
typedef xml::xml_char<wchar_t> xml_char_value_type;
|
||||
|
||||
static optional<bool>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
std::wstring tmp = *val;
|
||||
tmp = XmlUtils::GetLower(tmp);
|
||||
return optional<bool>::Type((tmp == xml_char_value_type::trueVal));
|
||||
}
|
||||
else
|
||||
return optional<bool>::Type();
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class attributes_get_val_impl<char>
|
||||
{
|
||||
public:
|
||||
static optional<char>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
std::wstring tmp = *val;
|
||||
return optional<char>::Type( (tmp.size() > 0) ? tmp[0] : ' ');
|
||||
}
|
||||
else
|
||||
return optional<char>::Type();
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class attributes_get_val_impl<wchar_t>
|
||||
{
|
||||
public:
|
||||
static optional<wchar_t>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
std::wstring tmp = *val;
|
||||
return optional<wchar_t>::Type( (tmp.size() > 0) ? tmp[0] : L' ');
|
||||
}
|
||||
else
|
||||
return optional<wchar_t>::Type();
|
||||
}
|
||||
};
|
||||
|
||||
template <class V>
|
||||
inline typename optional<V>::Type attributes::get_val(const std::wstring & QualifiedName)
|
||||
{
|
||||
return attributes_get_val_impl<V>::get_val(*this, QualifiedName);
|
||||
}
|
||||
|
||||
inline attributes::~attributes()
|
||||
{}
|
||||
|
||||
inline size_t attributes::length() const
|
||||
{
|
||||
return this->size();
|
||||
}
|
||||
|
||||
inline bool attributes::empty() const
|
||||
{
|
||||
return (this->size() == 0);
|
||||
}
|
||||
|
||||
struct attributes_ptr
|
||||
{
|
||||
typedef shared_ptr< attributes >::Type Type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef attributes attributes_wc;
|
||||
|
||||
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
|
||||
|
||||
template <class T>
|
||||
static bool _cp_apply_attribute(xml::attributes_wc_ptr attr, const std::wstring & QualifiedName, T & Val)
|
||||
{
|
||||
Val = attr->get_val<typename T::value_type>(QualifiedName);
|
||||
return (!!Val);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static bool _cp_apply_attribute(xml::attributes_wc_ptr attr, const std::wstring & QualifiedName, T & Val, const T & Default)
|
||||
{
|
||||
typedef typename optional<T>::Type type_opt_t;
|
||||
type_opt_t tmp;
|
||||
try
|
||||
{
|
||||
tmp = attr->get_val<T>(QualifiedName);
|
||||
Val = tmp.get_value_or(Default);
|
||||
}catch(...)
|
||||
{
|
||||
}
|
||||
return (!!tmp);
|
||||
}
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#define CP_APPLY_ATTR(NAME, VAL, ...) _cp_apply_attribute(Attributes, (NAME), (VAL), __VA_ARGS__)
|
||||
#else
|
||||
#define CP_APPLY_ATTR(NAME, VAL, ...) _cp_apply_attribute(Attributes, (NAME), (VAL), ##__VA_ARGS__)
|
||||
#endif
|
||||
attributes_wc_ptr read_attributes(sax * SaxReader);
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,55 +1,55 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
enum NodeType
|
||||
{
|
||||
typeNone = 0,
|
||||
typeEOF,
|
||||
typeElement,
|
||||
typeAttribute,
|
||||
typeText,
|
||||
typeCDATA,
|
||||
typeProcessingInstruction,
|
||||
typeComment,
|
||||
typeDocumentType,
|
||||
typeWhitespace,
|
||||
typeEndElement,
|
||||
typeXmlDeclaration
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
enum NodeType
|
||||
{
|
||||
typeNone = 0,
|
||||
typeEOF,
|
||||
typeElement,
|
||||
typeAttribute,
|
||||
typeText,
|
||||
typeCDATA,
|
||||
typeProcessingInstruction,
|
||||
typeComment,
|
||||
typeDocumentType,
|
||||
typeWhitespace,
|
||||
typeEndElement,
|
||||
typeXmlDeclaration
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,114 +1,114 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <exception>
|
||||
#include <iosfwd>
|
||||
|
||||
#include "../CPSharedPtr.h"
|
||||
#include "nodetype.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
class sax;
|
||||
typedef _CP_PTR(sax) sax_ptr;
|
||||
|
||||
class sax
|
||||
{
|
||||
public:
|
||||
|
||||
struct error : virtual public std::exception
|
||||
{
|
||||
public:
|
||||
enum Code {
|
||||
no = 0,
|
||||
openFile,
|
||||
createReader,
|
||||
internalErr
|
||||
};
|
||||
|
||||
public:
|
||||
error(Code _code) : code_(_code){};
|
||||
Code code() const { return code_; }
|
||||
|
||||
private:
|
||||
Code code_;
|
||||
};
|
||||
|
||||
public:
|
||||
//virtual std::wstring baseURI() = 0;
|
||||
virtual unsigned int depth() = 0;
|
||||
|
||||
// <p:abc/>, returns "abc".
|
||||
virtual std::wstring nodeLocalName() = 0;
|
||||
|
||||
// <p:abc />, returns "p:abc".
|
||||
virtual std::wstring nodeQualifiedName() = 0;
|
||||
|
||||
// <xyz:abc xmlns:xyz="u://1" />, it returns "xyz".
|
||||
virtual std::wstring namespacePrefix() = 0;
|
||||
|
||||
//// Returns "u://1" for the element <xyz:abc xmlns:xyz="u://1" />.
|
||||
//virtual std::wstring namespaceUri() = 0;
|
||||
|
||||
virtual NodeType nodeType() = 0;
|
||||
virtual std::wstring value() = 0;
|
||||
|
||||
virtual unsigned int attrCount() = 0;
|
||||
//virtual std::wstring value() = 0;
|
||||
virtual bool attrDefault() = 0;
|
||||
|
||||
// <element attribute="123"></element> — false
|
||||
// <element attribute="123"/> - true
|
||||
virtual bool isEmptyElement() = 0;
|
||||
|
||||
virtual bool moveToAttrFirst() = 0;
|
||||
virtual bool moveToAttrNext() = 0;
|
||||
virtual bool moveToAttrOwner() = 0;
|
||||
|
||||
virtual NodeType next(int Depth) = 0;
|
||||
|
||||
virtual ~sax() = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
inline sax::~sax() {};
|
||||
|
||||
sax_ptr create_sax(const wchar_t * FileName);
|
||||
|
||||
} // namespace xml
|
||||
} // namespace cpdoccore
|
||||
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <exception>
|
||||
#include <iosfwd>
|
||||
|
||||
#include "../CPSharedPtr.h"
|
||||
#include "nodetype.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
class sax;
|
||||
typedef _CP_PTR(sax) sax_ptr;
|
||||
|
||||
class sax
|
||||
{
|
||||
public:
|
||||
|
||||
struct error : virtual public std::exception
|
||||
{
|
||||
public:
|
||||
enum Code {
|
||||
no = 0,
|
||||
openFile,
|
||||
createReader,
|
||||
internalErr
|
||||
};
|
||||
|
||||
public:
|
||||
error(Code _code) : code_(_code){};
|
||||
Code code() const { return code_; }
|
||||
|
||||
private:
|
||||
Code code_;
|
||||
};
|
||||
|
||||
public:
|
||||
//virtual std::wstring baseURI() = 0;
|
||||
virtual unsigned int depth() = 0;
|
||||
|
||||
// <p:abc/>, returns "abc".
|
||||
virtual std::wstring nodeLocalName() = 0;
|
||||
|
||||
// <p:abc />, returns "p:abc".
|
||||
virtual std::wstring nodeQualifiedName() = 0;
|
||||
|
||||
// <xyz:abc xmlns:xyz="u://1" />, it returns "xyz".
|
||||
virtual std::wstring namespacePrefix() = 0;
|
||||
|
||||
//// Returns "u://1" for the element <xyz:abc xmlns:xyz="u://1" />.
|
||||
//virtual std::wstring namespaceUri() = 0;
|
||||
|
||||
virtual NodeType nodeType() = 0;
|
||||
virtual std::wstring value() = 0;
|
||||
|
||||
virtual unsigned int attrCount() = 0;
|
||||
//virtual std::wstring value() = 0;
|
||||
virtual bool attrDefault() = 0;
|
||||
|
||||
// <element attribute="123"></element> — false
|
||||
// <element attribute="123"/> - true
|
||||
virtual bool isEmptyElement() = 0;
|
||||
|
||||
virtual bool moveToAttrFirst() = 0;
|
||||
virtual bool moveToAttrNext() = 0;
|
||||
virtual bool moveToAttrOwner() = 0;
|
||||
|
||||
virtual NodeType next(int Depth) = 0;
|
||||
|
||||
virtual ~sax() = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
inline sax::~sax() {};
|
||||
|
||||
sax_ptr create_sax(const wchar_t * FileName);
|
||||
|
||||
} // namespace xml
|
||||
} // namespace cpdoccore
|
||||
|
||||
@ -1,326 +1,326 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stack>
|
||||
#include <cassert>
|
||||
|
||||
namespace cpdoccore
|
||||
{
|
||||
|
||||
namespace xml
|
||||
{
|
||||
|
||||
namespace writer
|
||||
{
|
||||
|
||||
template <class T> struct chars { };
|
||||
|
||||
template <>
|
||||
struct chars<char>
|
||||
{
|
||||
static const char eq = '=';
|
||||
static const char quote = '\"';
|
||||
static const char space = ' ';
|
||||
static const char left_brocket = '<';
|
||||
static const char right_brocket = '>';
|
||||
static const char slash = '/';
|
||||
static const char colon = ':';
|
||||
static const char amp = '&';
|
||||
static const char apos = '\'';
|
||||
static const char * cdata_open() { return "<![CDATA["; }
|
||||
static const char * cdata_close() { return "]]>"; }
|
||||
static const char * amp_str(){ return "&"; }
|
||||
static const char * left_brocket_str() { return "<"; }
|
||||
static const char * right_brocket_str() { return ">"; }
|
||||
static const char * apos_str() { return "'"; }
|
||||
static const char * quote_str() { return """; }
|
||||
};
|
||||
|
||||
template <>
|
||||
struct chars<wchar_t>
|
||||
{
|
||||
static const wchar_t eq = L'=';
|
||||
static const wchar_t quote = L'\"';
|
||||
static const wchar_t space = L' ';
|
||||
static const wchar_t left_brocket = L'<';
|
||||
static const wchar_t right_brocket = L'>';
|
||||
static const wchar_t slash = L'/';
|
||||
static const wchar_t colon = L':';
|
||||
static const wchar_t amp = L'&';
|
||||
static const wchar_t apos = L'\'';
|
||||
static const wchar_t * cdata_open() { return L"<![CDATA["; }
|
||||
static const wchar_t * cdata_close() { return L"]]>"; }
|
||||
static const wchar_t * amp_str(){ return L"&"; }
|
||||
static const wchar_t * left_brocket_str() { return L"<"; }
|
||||
static const wchar_t * right_brocket_str() { return L">"; }
|
||||
static const wchar_t * apos_str() { return L"'"; }
|
||||
static const wchar_t * quote_str() { return L"""; }
|
||||
};
|
||||
|
||||
template <class V>
|
||||
class element;
|
||||
|
||||
//
|
||||
// xml::writer class
|
||||
//
|
||||
template <class T>
|
||||
class writer
|
||||
{
|
||||
public:
|
||||
// writer must be bound to an ostream
|
||||
writer(std::basic_ostream<T>& os, bool need_header = false) : level_(0), os_(os), need_header_(need_header) {}
|
||||
~writer(void) { assert(elements_.empty()); }
|
||||
|
||||
private:
|
||||
size_t level_;
|
||||
std::basic_ostream<T>& os_; // output stream
|
||||
bool need_header_; // have we written an XML header yet?
|
||||
std::stack<element<T>*> elements_; // stack of open element tags
|
||||
|
||||
|
||||
// write XML header, if necessary
|
||||
writer& header()
|
||||
{
|
||||
if (need_header_)
|
||||
{
|
||||
// TODO
|
||||
//os_ << "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
|
||||
need_header_ = false;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// write a single character to the output stream
|
||||
writer& putc(T c)
|
||||
{
|
||||
os_.put(c);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// write a string to the output stream
|
||||
writer& puts(const T* str) {
|
||||
os_ << str;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class V>
|
||||
friend class element;
|
||||
};
|
||||
|
||||
//
|
||||
// xml::element class
|
||||
//
|
||||
template <class T>
|
||||
class element
|
||||
{
|
||||
public:
|
||||
// create a new element tag, bound to an xml::writer
|
||||
element(writer<T>& wr, std::basic_string<T, std::char_traits<T>, std::allocator<T> > const & name) : wr_(wr), name_(name)
|
||||
{
|
||||
wr_.level_++;
|
||||
check_parent();
|
||||
wr_.header().putc('<').puts(name_.c_str());
|
||||
tagopen_ = true;
|
||||
wr_.elements_.push(this);
|
||||
}
|
||||
|
||||
// close the current element tag
|
||||
~element()
|
||||
{
|
||||
if (!wr_.elements_.empty() && wr_.elements_.top() == this)
|
||||
{
|
||||
wr_.elements_.pop();
|
||||
if (tagopen_)
|
||||
wr_.putc(chars<T>::slash)
|
||||
.putc(chars<T>::right_brocket);
|
||||
else
|
||||
wr_.putc(chars<T>::left_brocket)
|
||||
.putc(chars<T>::slash)
|
||||
.puts(name_.c_str())
|
||||
.putc(chars<T>::right_brocket);
|
||||
}
|
||||
wr_.level_--;
|
||||
}
|
||||
|
||||
// write an attribute for the current element
|
||||
element& attr(const T* name, const T* value)
|
||||
{
|
||||
assert(name != 0);
|
||||
assert(value != 0);
|
||||
assert(tagopen_);
|
||||
wr_.putc(chars<T>::space)
|
||||
.puts(name)
|
||||
.putc(chars<T>::eq)
|
||||
.putc(chars<T>::quote);
|
||||
qputs(value);
|
||||
wr_.putc(chars<T>::quote);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// attr() overload for std::string type
|
||||
element& attr(const T* name, const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& value)
|
||||
{
|
||||
return attr(name, value.c_str());
|
||||
}
|
||||
|
||||
// attr() function template for all streamable types
|
||||
template <class V>
|
||||
element& attr(const T* name, V value)
|
||||
{
|
||||
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
|
||||
ss << value;
|
||||
attr(name, ss.str());
|
||||
return *this;
|
||||
}
|
||||
|
||||
// write text content for the current element
|
||||
element& contents(const T* str)
|
||||
{
|
||||
assert(str != 0);
|
||||
check_parent();
|
||||
qputs(str);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// contents() overload for std::string type
|
||||
element& contents(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
|
||||
{
|
||||
return contents(str.c_str());
|
||||
}
|
||||
|
||||
// contents() function template for all streamable types
|
||||
template <class V>
|
||||
element& contents(V value)
|
||||
{
|
||||
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
|
||||
ss << value;
|
||||
contents(ss.str());
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::basic_ostream<T>& stream()
|
||||
{
|
||||
check_parent();
|
||||
return wr_.os_;
|
||||
}
|
||||
|
||||
// write CDATA section
|
||||
element& cdata(const T * str)
|
||||
{
|
||||
assert(str != 0);
|
||||
check_parent();
|
||||
wr_.puts(chars<T>::cdata_open());
|
||||
wr_.puts(str);
|
||||
wr_.puts(chars<T>::cdata_close());
|
||||
return *this;
|
||||
}
|
||||
|
||||
// cdata() overload for std::string type
|
||||
element& cdata(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
|
||||
{
|
||||
return cdata(str.c_str());
|
||||
}
|
||||
|
||||
private:
|
||||
writer<T>& wr_; // bound XML writer
|
||||
//const T* name_; // name of current element
|
||||
const std::basic_string<T, std::char_traits<T>, std::allocator<T> > name_;
|
||||
bool tagopen_; // is the element tag for this element still open?
|
||||
|
||||
// write a string quoting characters which have meaning in xml
|
||||
element& qputs(const T* str)
|
||||
{
|
||||
for (; *str; ++str)
|
||||
{
|
||||
switch (*str)
|
||||
{
|
||||
case chars<T>::amp:
|
||||
wr_.puts(chars<T>::amp_str()); break;
|
||||
|
||||
case chars<T>::left_brocket:
|
||||
wr_.puts(chars<T>::left_brocket_str()); break;
|
||||
|
||||
case chars<T>::right_brocket:
|
||||
wr_.puts(chars<T>::right_brocket_str()); break;
|
||||
|
||||
case chars<T>::apos:
|
||||
wr_.puts(chars<T>::apos_str()); break;
|
||||
|
||||
case chars<T>::quote:
|
||||
wr_.puts(chars<T>::quote_str()); break;
|
||||
|
||||
default:
|
||||
wr_.putc(*str); break;
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// check to see if we have a parent tag which needs to be closed
|
||||
void check_parent()
|
||||
{
|
||||
if (!wr_.elements_.empty() && wr_.elements_.top()->tagopen_)
|
||||
{
|
||||
wr_.putc(chars<T>::right_brocket);
|
||||
wr_.elements_.top()->tagopen_ = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
typedef xml::writer::writer<wchar_t> xml_writer;
|
||||
typedef xml::writer::element<wchar_t> xml_element;
|
||||
|
||||
#define CP_XML_WRITER(STRM) if (bool _b_ = false) {} else for (xml_writer _xml_wr_((STRM));!_b_;_b_=true)
|
||||
#define CP_XML_NODE(NAME) if (bool _b_ = false) {} else for (xml_element _xml_node_(_xml_wr_, (NAME));!_b_;_b_=true)
|
||||
#define CP_XML_ATTR(NAME, VAL) _xml_node_.attr((NAME),(VAL))
|
||||
#define CP_XML_CONTENT(VAL) _xml_node_.contents((VAL))
|
||||
#define CP_XML_STREAM() _xml_node_.stream()
|
||||
|
||||
#define CP_GET_XML_NODE() _xml_node_
|
||||
|
||||
#define CP_ATTR_NODE xml_element & _xml_node_
|
||||
|
||||
|
||||
|
||||
#define CP_XML_ATTR_OPT(NAME, VAL) if (VAL)CP_XML_ATTR(NAME, (*VAL))
|
||||
|
||||
#define CP_XML_NODE_SIMPLE() std::wstring NS_NAME = std::wstring(ns) + std::wstring(L":") + std::wstring(name); CP_XML_NODE(NS_NAME)
|
||||
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stack>
|
||||
#include <cassert>
|
||||
|
||||
namespace cpdoccore
|
||||
{
|
||||
|
||||
namespace xml
|
||||
{
|
||||
|
||||
namespace writer
|
||||
{
|
||||
|
||||
template <class T> struct chars { };
|
||||
|
||||
template <>
|
||||
struct chars<char>
|
||||
{
|
||||
static const char eq = '=';
|
||||
static const char quote = '\"';
|
||||
static const char space = ' ';
|
||||
static const char left_brocket = '<';
|
||||
static const char right_brocket = '>';
|
||||
static const char slash = '/';
|
||||
static const char colon = ':';
|
||||
static const char amp = '&';
|
||||
static const char apos = '\'';
|
||||
static const char * cdata_open() { return "<![CDATA["; }
|
||||
static const char * cdata_close() { return "]]>"; }
|
||||
static const char * amp_str(){ return "&"; }
|
||||
static const char * left_brocket_str() { return "<"; }
|
||||
static const char * right_brocket_str() { return ">"; }
|
||||
static const char * apos_str() { return "'"; }
|
||||
static const char * quote_str() { return """; }
|
||||
};
|
||||
|
||||
template <>
|
||||
struct chars<wchar_t>
|
||||
{
|
||||
static const wchar_t eq = L'=';
|
||||
static const wchar_t quote = L'\"';
|
||||
static const wchar_t space = L' ';
|
||||
static const wchar_t left_brocket = L'<';
|
||||
static const wchar_t right_brocket = L'>';
|
||||
static const wchar_t slash = L'/';
|
||||
static const wchar_t colon = L':';
|
||||
static const wchar_t amp = L'&';
|
||||
static const wchar_t apos = L'\'';
|
||||
static const wchar_t * cdata_open() { return L"<![CDATA["; }
|
||||
static const wchar_t * cdata_close() { return L"]]>"; }
|
||||
static const wchar_t * amp_str(){ return L"&"; }
|
||||
static const wchar_t * left_brocket_str() { return L"<"; }
|
||||
static const wchar_t * right_brocket_str() { return L">"; }
|
||||
static const wchar_t * apos_str() { return L"'"; }
|
||||
static const wchar_t * quote_str() { return L"""; }
|
||||
};
|
||||
|
||||
template <class V>
|
||||
class element;
|
||||
|
||||
//
|
||||
// xml::writer class
|
||||
//
|
||||
template <class T>
|
||||
class writer
|
||||
{
|
||||
public:
|
||||
// writer must be bound to an ostream
|
||||
writer(std::basic_ostream<T>& os, bool need_header = false) : level_(0), os_(os), need_header_(need_header) {}
|
||||
~writer(void) { assert(elements_.empty()); }
|
||||
|
||||
private:
|
||||
size_t level_;
|
||||
std::basic_ostream<T>& os_; // output stream
|
||||
bool need_header_; // have we written an XML header yet?
|
||||
std::stack<element<T>*> elements_; // stack of open element tags
|
||||
|
||||
|
||||
// write XML header, if necessary
|
||||
writer& header()
|
||||
{
|
||||
if (need_header_)
|
||||
{
|
||||
// TODO
|
||||
//os_ << "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
|
||||
need_header_ = false;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// write a single character to the output stream
|
||||
writer& putc(T c)
|
||||
{
|
||||
os_.put(c);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// write a string to the output stream
|
||||
writer& puts(const T* str) {
|
||||
os_ << str;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class V>
|
||||
friend class element;
|
||||
};
|
||||
|
||||
//
|
||||
// xml::element class
|
||||
//
|
||||
template <class T>
|
||||
class element
|
||||
{
|
||||
public:
|
||||
// create a new element tag, bound to an xml::writer
|
||||
element(writer<T>& wr, std::basic_string<T, std::char_traits<T>, std::allocator<T> > const & name) : wr_(wr), name_(name)
|
||||
{
|
||||
wr_.level_++;
|
||||
check_parent();
|
||||
wr_.header().putc('<').puts(name_.c_str());
|
||||
tagopen_ = true;
|
||||
wr_.elements_.push(this);
|
||||
}
|
||||
|
||||
// close the current element tag
|
||||
~element()
|
||||
{
|
||||
if (!wr_.elements_.empty() && wr_.elements_.top() == this)
|
||||
{
|
||||
wr_.elements_.pop();
|
||||
if (tagopen_)
|
||||
wr_.putc(chars<T>::slash)
|
||||
.putc(chars<T>::right_brocket);
|
||||
else
|
||||
wr_.putc(chars<T>::left_brocket)
|
||||
.putc(chars<T>::slash)
|
||||
.puts(name_.c_str())
|
||||
.putc(chars<T>::right_brocket);
|
||||
}
|
||||
wr_.level_--;
|
||||
}
|
||||
|
||||
// write an attribute for the current element
|
||||
element& attr(const T* name, const T* value)
|
||||
{
|
||||
assert(name != 0);
|
||||
assert(value != 0);
|
||||
assert(tagopen_);
|
||||
wr_.putc(chars<T>::space)
|
||||
.puts(name)
|
||||
.putc(chars<T>::eq)
|
||||
.putc(chars<T>::quote);
|
||||
qputs(value);
|
||||
wr_.putc(chars<T>::quote);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// attr() overload for std::string type
|
||||
element& attr(const T* name, const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& value)
|
||||
{
|
||||
return attr(name, value.c_str());
|
||||
}
|
||||
|
||||
// attr() function template for all streamable types
|
||||
template <class V>
|
||||
element& attr(const T* name, V value)
|
||||
{
|
||||
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
|
||||
ss << value;
|
||||
attr(name, ss.str());
|
||||
return *this;
|
||||
}
|
||||
|
||||
// write text content for the current element
|
||||
element& contents(const T* str)
|
||||
{
|
||||
assert(str != 0);
|
||||
check_parent();
|
||||
qputs(str);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// contents() overload for std::string type
|
||||
element& contents(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
|
||||
{
|
||||
return contents(str.c_str());
|
||||
}
|
||||
|
||||
// contents() function template for all streamable types
|
||||
template <class V>
|
||||
element& contents(V value)
|
||||
{
|
||||
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
|
||||
ss << value;
|
||||
contents(ss.str());
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::basic_ostream<T>& stream()
|
||||
{
|
||||
check_parent();
|
||||
return wr_.os_;
|
||||
}
|
||||
|
||||
// write CDATA section
|
||||
element& cdata(const T * str)
|
||||
{
|
||||
assert(str != 0);
|
||||
check_parent();
|
||||
wr_.puts(chars<T>::cdata_open());
|
||||
wr_.puts(str);
|
||||
wr_.puts(chars<T>::cdata_close());
|
||||
return *this;
|
||||
}
|
||||
|
||||
// cdata() overload for std::string type
|
||||
element& cdata(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
|
||||
{
|
||||
return cdata(str.c_str());
|
||||
}
|
||||
|
||||
private:
|
||||
writer<T>& wr_; // bound XML writer
|
||||
//const T* name_; // name of current element
|
||||
const std::basic_string<T, std::char_traits<T>, std::allocator<T> > name_;
|
||||
bool tagopen_; // is the element tag for this element still open?
|
||||
|
||||
// write a string quoting characters which have meaning in xml
|
||||
element& qputs(const T* str)
|
||||
{
|
||||
for (; *str; ++str)
|
||||
{
|
||||
switch (*str)
|
||||
{
|
||||
case chars<T>::amp:
|
||||
wr_.puts(chars<T>::amp_str()); break;
|
||||
|
||||
case chars<T>::left_brocket:
|
||||
wr_.puts(chars<T>::left_brocket_str()); break;
|
||||
|
||||
case chars<T>::right_brocket:
|
||||
wr_.puts(chars<T>::right_brocket_str()); break;
|
||||
|
||||
case chars<T>::apos:
|
||||
wr_.puts(chars<T>::apos_str()); break;
|
||||
|
||||
case chars<T>::quote:
|
||||
wr_.puts(chars<T>::quote_str()); break;
|
||||
|
||||
default:
|
||||
wr_.putc(*str); break;
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// check to see if we have a parent tag which needs to be closed
|
||||
void check_parent()
|
||||
{
|
||||
if (!wr_.elements_.empty() && wr_.elements_.top()->tagopen_)
|
||||
{
|
||||
wr_.putc(chars<T>::right_brocket);
|
||||
wr_.elements_.top()->tagopen_ = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
typedef xml::writer::writer<wchar_t> xml_writer;
|
||||
typedef xml::writer::element<wchar_t> xml_element;
|
||||
|
||||
#define CP_XML_WRITER(STRM) if (bool _b_ = false) {} else for (xml_writer _xml_wr_((STRM));!_b_;_b_=true)
|
||||
#define CP_XML_NODE(NAME) if (bool _b_ = false) {} else for (xml_element _xml_node_(_xml_wr_, (NAME));!_b_;_b_=true)
|
||||
#define CP_XML_ATTR(NAME, VAL) _xml_node_.attr((NAME),(VAL))
|
||||
#define CP_XML_CONTENT(VAL) _xml_node_.contents((VAL))
|
||||
#define CP_XML_STREAM() _xml_node_.stream()
|
||||
|
||||
#define CP_GET_XML_NODE() _xml_node_
|
||||
|
||||
#define CP_ATTR_NODE xml_element & _xml_node_
|
||||
|
||||
|
||||
|
||||
#define CP_XML_ATTR_OPT(NAME, VAL) if (VAL)CP_XML_ATTR(NAME, (*VAL))
|
||||
|
||||
#define CP_XML_NODE_SIMPLE() std::wstring NS_NAME = std::wstring(ns) + std::wstring(L":") + std::wstring(name); CP_XML_NODE(NS_NAME)
|
||||
|
||||
}
|
||||
@ -1,70 +1,70 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
namespace utils {
|
||||
|
||||
namespace details {
|
||||
std::wstring replace_text_to_xml_ImplRegEx(const std::wstring & Text);
|
||||
std::string replace_text_to_xml_ImplRegEx(const std::string & Text);
|
||||
|
||||
std::wstring replace_xml_to_text_ImplRegEx(const std::wstring & Text);
|
||||
std::string replace_xml_to_text_ImplRegEx(const std::string & Text);
|
||||
|
||||
std::wstring replace_text_to_xml_ImplReplace(const std::wstring & Text);
|
||||
std::string replace_text_to_xml_ImplReplace(const std::string & Text);
|
||||
|
||||
std::wstring replace_amp_text_to_xml_ImplReplace(const std::wstring & Text);
|
||||
std::string replace_amp_text_to_xml_ImplReplace(const std::string & Text);
|
||||
|
||||
std::wstring replace_xml_to_text_ImplReplace(const std::wstring & Text);
|
||||
std::string replace_xml_to_text_ImplReplace(const std::string & Text);
|
||||
}
|
||||
|
||||
std::wstring replace_text_to_xml(const std::wstring & Text);
|
||||
std::string replace_text_to_xml(const std::string & Text);
|
||||
|
||||
std::wstring replace_amp_text_to_xml(const std::wstring & Text);
|
||||
|
||||
std::wstring replace_lt_gt(const std::wstring & Text);
|
||||
|
||||
std::wstring replace_xml_to_text(const std::wstring & Text);
|
||||
std::string replace_xml_to_text(const std::string & Text);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
namespace utils {
|
||||
|
||||
namespace details {
|
||||
std::wstring replace_text_to_xml_ImplRegEx(const std::wstring & Text);
|
||||
std::string replace_text_to_xml_ImplRegEx(const std::string & Text);
|
||||
|
||||
std::wstring replace_xml_to_text_ImplRegEx(const std::wstring & Text);
|
||||
std::string replace_xml_to_text_ImplRegEx(const std::string & Text);
|
||||
|
||||
std::wstring replace_text_to_xml_ImplReplace(const std::wstring & Text);
|
||||
std::string replace_text_to_xml_ImplReplace(const std::string & Text);
|
||||
|
||||
std::wstring replace_amp_text_to_xml_ImplReplace(const std::wstring & Text);
|
||||
std::string replace_amp_text_to_xml_ImplReplace(const std::string & Text);
|
||||
|
||||
std::wstring replace_xml_to_text_ImplReplace(const std::wstring & Text);
|
||||
std::string replace_xml_to_text_ImplReplace(const std::string & Text);
|
||||
}
|
||||
|
||||
std::wstring replace_text_to_xml(const std::wstring & Text);
|
||||
std::string replace_text_to_xml(const std::string & Text);
|
||||
|
||||
std::wstring replace_amp_text_to_xml(const std::wstring & Text);
|
||||
|
||||
std::wstring replace_lt_gt(const std::wstring & Text);
|
||||
|
||||
std::wstring replace_xml_to_text(const std::wstring & Text);
|
||||
std::string replace_xml_to_text(const std::string & Text);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,101 +1,101 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
template <class ElemT>
|
||||
class xml_char
|
||||
{
|
||||
public:
|
||||
//static const ElemT eq;
|
||||
//static const ElemT quote;
|
||||
//static const ElemT space;
|
||||
//static const ElemT left_brocket;
|
||||
//static const ElemT right_brocket;
|
||||
//static const ElemT slash;
|
||||
//static const ElemT colon;
|
||||
//static const ElemT * openTag;
|
||||
//static const ElemT * closeTag;
|
||||
//static const ElemT * endTag;
|
||||
//static const ElemT * trueVal;
|
||||
//static const ElemT * falseVal;
|
||||
};
|
||||
|
||||
template <>
|
||||
class xml_char<char>
|
||||
{
|
||||
public:
|
||||
static const char eq;
|
||||
static const char quote;
|
||||
static const char space;
|
||||
static const char left_brocket;
|
||||
static const char right_brocket;
|
||||
static const char slash;
|
||||
static const char colon;
|
||||
static const char * openTag;
|
||||
static const char * closeTag;
|
||||
static const char * endTag;
|
||||
static const char * trueVal;
|
||||
static const char * falseVal;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <>
|
||||
class xml_char<wchar_t>
|
||||
{
|
||||
public:
|
||||
static const wchar_t eq;
|
||||
static const wchar_t quote;
|
||||
static const wchar_t space;
|
||||
static const wchar_t left_brocket;
|
||||
static const wchar_t right_brocket;
|
||||
static const wchar_t slash;
|
||||
static const wchar_t colon;
|
||||
static const wchar_t * openTag;
|
||||
static const wchar_t * closeTag;
|
||||
static const wchar_t * endTag;
|
||||
static const wchar_t * trueVal;
|
||||
static const wchar_t * falseVal;
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef xml_char<char> xml_char_c;
|
||||
typedef xml_char<wchar_t> xml_char_wc;
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
template <class ElemT>
|
||||
class xml_char
|
||||
{
|
||||
public:
|
||||
//static const ElemT eq;
|
||||
//static const ElemT quote;
|
||||
//static const ElemT space;
|
||||
//static const ElemT left_brocket;
|
||||
//static const ElemT right_brocket;
|
||||
//static const ElemT slash;
|
||||
//static const ElemT colon;
|
||||
//static const ElemT * openTag;
|
||||
//static const ElemT * closeTag;
|
||||
//static const ElemT * endTag;
|
||||
//static const ElemT * trueVal;
|
||||
//static const ElemT * falseVal;
|
||||
};
|
||||
|
||||
template <>
|
||||
class xml_char<char>
|
||||
{
|
||||
public:
|
||||
static const char eq;
|
||||
static const char quote;
|
||||
static const char space;
|
||||
static const char left_brocket;
|
||||
static const char right_brocket;
|
||||
static const char slash;
|
||||
static const char colon;
|
||||
static const char * openTag;
|
||||
static const char * closeTag;
|
||||
static const char * endTag;
|
||||
static const char * trueVal;
|
||||
static const char * falseVal;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <>
|
||||
class xml_char<wchar_t>
|
||||
{
|
||||
public:
|
||||
static const wchar_t eq;
|
||||
static const wchar_t quote;
|
||||
static const wchar_t space;
|
||||
static const wchar_t left_brocket;
|
||||
static const wchar_t right_brocket;
|
||||
static const wchar_t slash;
|
||||
static const wchar_t colon;
|
||||
static const wchar_t * openTag;
|
||||
static const wchar_t * closeTag;
|
||||
static const wchar_t * endTag;
|
||||
static const wchar_t * trueVal;
|
||||
static const wchar_t * falseVal;
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef xml_char<char> xml_char_c;
|
||||
typedef xml_char<wchar_t> xml_char_wc;
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,102 +1,102 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <iosfwd>
|
||||
#include <sstream>
|
||||
|
||||
#include "nodetype.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
class attributes;
|
||||
|
||||
template <class CharT>
|
||||
class element
|
||||
{
|
||||
public:
|
||||
virtual const CharT * get_ns() const = 0;
|
||||
virtual const CharT * get_name() const = 0;
|
||||
virtual NodeType get_xml_type() const = 0;
|
||||
|
||||
virtual std::basic_ostream<CharT> & text_to_stream(std::basic_ostream<CharT> & _Wostream) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
virtual std::basic_ostream<CharT> & xml_to_stream(std::basic_ostream<CharT> & _Wostream) const = 0;
|
||||
|
||||
std::basic_string<CharT> text_to_string() const;
|
||||
std::basic_string<CharT> xml_to_string() const;
|
||||
|
||||
virtual ~element() = 0;
|
||||
|
||||
// virtual const attributes< std::basic_string<CharT> > * get_attributes() const = 0;
|
||||
};
|
||||
|
||||
template <class CharT>
|
||||
inline element<CharT>::~element()
|
||||
{}
|
||||
|
||||
typedef element<char> element_c;
|
||||
typedef element<wchar_t> element_wc;
|
||||
|
||||
template <class Element, class CharT = wchar_t>
|
||||
class element_impl : public element<CharT>
|
||||
{
|
||||
public:
|
||||
virtual const CharT * get_ns() const { return Element::ns; }
|
||||
virtual const CharT * get_name() const { return Element::name; }
|
||||
virtual NodeType get_xml_type() const { return Element::xml_type; };
|
||||
// virtual const attributes< std::basic_string<CharT> > * get_attributes() const = 0;
|
||||
};
|
||||
|
||||
template <class CharT>
|
||||
inline std::basic_string<CharT> element<CharT>::text_to_string() const
|
||||
{
|
||||
std::basic_stringstream<CharT> strm;
|
||||
text_to_stream(strm);
|
||||
return strm.str();
|
||||
}
|
||||
|
||||
template <class CharT>
|
||||
inline std::basic_string<CharT> element<CharT>::xml_to_string() const
|
||||
{
|
||||
std::basic_stringstream<CharT> strm;
|
||||
xml_to_stream(strm);
|
||||
return strm.str();
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <iosfwd>
|
||||
#include <sstream>
|
||||
|
||||
#include "nodetype.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
class attributes;
|
||||
|
||||
template <class CharT>
|
||||
class element
|
||||
{
|
||||
public:
|
||||
virtual const CharT * get_ns() const = 0;
|
||||
virtual const CharT * get_name() const = 0;
|
||||
virtual NodeType get_xml_type() const = 0;
|
||||
|
||||
virtual std::basic_ostream<CharT> & text_to_stream(std::basic_ostream<CharT> & _Wostream) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
virtual std::basic_ostream<CharT> & xml_to_stream(std::basic_ostream<CharT> & _Wostream) const = 0;
|
||||
|
||||
std::basic_string<CharT> text_to_string() const;
|
||||
std::basic_string<CharT> xml_to_string() const;
|
||||
|
||||
virtual ~element() = 0;
|
||||
|
||||
// virtual const attributes< std::basic_string<CharT> > * get_attributes() const = 0;
|
||||
};
|
||||
|
||||
template <class CharT>
|
||||
inline element<CharT>::~element()
|
||||
{}
|
||||
|
||||
typedef element<char> element_c;
|
||||
typedef element<wchar_t> element_wc;
|
||||
|
||||
template <class Element, class CharT = wchar_t>
|
||||
class element_impl : public element<CharT>
|
||||
{
|
||||
public:
|
||||
virtual const CharT * get_ns() const { return Element::ns; }
|
||||
virtual const CharT * get_name() const { return Element::name; }
|
||||
virtual NodeType get_xml_type() const { return Element::xml_type; };
|
||||
// virtual const attributes< std::basic_string<CharT> > * get_attributes() const = 0;
|
||||
};
|
||||
|
||||
template <class CharT>
|
||||
inline std::basic_string<CharT> element<CharT>::text_to_string() const
|
||||
{
|
||||
std::basic_stringstream<CharT> strm;
|
||||
text_to_stream(strm);
|
||||
return strm.str();
|
||||
}
|
||||
|
||||
template <class CharT>
|
||||
inline std::basic_string<CharT> element<CharT>::xml_to_string() const
|
||||
{
|
||||
std::basic_stringstream<CharT> strm;
|
||||
xml_to_stream(strm);
|
||||
return strm.str();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
@ -78,9 +73,11 @@ SOURCES += \
|
||||
../src/odf/office_event_listeners.cpp \
|
||||
../src/odf/office_presentation.cpp \
|
||||
../src/odf/office_scripts.cpp \
|
||||
../src/odf/office_forms.cpp \
|
||||
../src/odf/office_settings.cpp \
|
||||
../src/odf/office_spreadsheet.cpp \
|
||||
../src/odf/office_text.cpp \
|
||||
../src/odf/office_meta.cpp \
|
||||
../src/odf/paragraph_elements.cpp \
|
||||
../src/odf/ruby.cpp \
|
||||
../src/odf/search_table_cell.cpp \
|
||||
@ -189,6 +186,7 @@ SOURCES += \
|
||||
../src/odf/datatypes/styleverticalrel.cpp \
|
||||
../src/odf/datatypes/stylewrap.cpp \
|
||||
../src/odf/datatypes/stylewrapcontourmode.cpp \
|
||||
../src/odf/datatypes/stylenumformat.cpp \
|
||||
../src/odf/datatypes/tablealign.cpp \
|
||||
../src/odf/datatypes/tablecentering.cpp \
|
||||
../src/odf/datatypes/tablemode.cpp \
|
||||
@ -216,6 +214,8 @@ SOURCES += \
|
||||
../src/odf/datatypes/tablefunction.cpp \
|
||||
../src/odf/datatypes/tableorder.cpp \
|
||||
../src/odf/datatypes/dategroup.cpp \
|
||||
../src/odf/datatypes/bibliography \
|
||||
../src/odfcommandtype.cpp \
|
||||
../src/docx/xlsx_conditionalFormatting.cpp \
|
||||
../src/docx/xlsx_dxfs.cpp \
|
||||
../src/docx/docx_content_type.cpp \
|
||||
@ -340,9 +340,11 @@ HEADERS += \
|
||||
../src/odf/office_event_listeners.h \
|
||||
../src/odf/office_presentation.h \
|
||||
../src/odf/office_scripts.h \
|
||||
../src/odf/office_forms.h \
|
||||
../src/odf/office_settings.h \
|
||||
../src/odf/office_spreadsheet.h \
|
||||
../src/odf/office_text.h \
|
||||
../src/odf/office_meta.h \
|
||||
../src/odf/paragraph_elements.h \
|
||||
../src/odf/ruby.h \
|
||||
../src/odf/search_table_cell.h \
|
||||
@ -377,6 +379,7 @@ HEADERS += \
|
||||
../src/odf/datatypes/mathvariant.h \
|
||||
../src/odf/calcext_elements.h \
|
||||
../src/odf/table_database_ranges.h \
|
||||
../src/odfcommandtype.h \
|
||||
../src/odf/datatypes/anchortype.h \
|
||||
../src/odf/datatypes/backgroundcolor.h \
|
||||
../src/odf/datatypes/bool.h \
|
||||
@ -450,6 +453,7 @@ HEADERS += \
|
||||
../src/odf/datatypes/styleverticalpos.h \
|
||||
../src/odf/datatypes/styleverticalrel.h \
|
||||
../src/odf/datatypes/stylewrap.h \
|
||||
../src/odf/datatypes/stylenumformat.h \
|
||||
../src/odf/datatypes/stylewrapcontourmode.h \
|
||||
../src/odf/datatypes/tablealign.h \
|
||||
../src/odf/datatypes/tablecentering.h \
|
||||
@ -553,27 +557,27 @@ HEADERS += \
|
||||
../src/docx/xlsx_utils.h \
|
||||
../src/docx/xlsx_xf.h \
|
||||
../include/logging.h \
|
||||
../include/cpdoccore/CPColorUtils.h \
|
||||
../include/cpdoccore/CPNoncopyable.h \
|
||||
../include/cpdoccore/CPOptional.h \
|
||||
../include/cpdoccore/CPScopedPtr.h \
|
||||
../include/cpdoccore/CPSharedPtr.h \
|
||||
../include/cpdoccore/CPString.h \
|
||||
../include/cpdoccore/CPWeakPtr.h \
|
||||
../include/cpdoccore/common/readdocelement.h \
|
||||
../include/cpdoccore/common/readstring.h \
|
||||
../include/cpdoccore/common/writedocelement.h \
|
||||
../include/cpdoccore/odf/odf_document.h \
|
||||
../include/cpdoccore/odf/odfformat.h \
|
||||
../include/cpdoccore/utf8cpp/utf8/checked.h \
|
||||
../include/cpdoccore/utf8cpp/utf8/core.h \
|
||||
../include/cpdoccore/utf8cpp/utf8/unchecked.h \
|
||||
../include/cpdoccore/utf8cpp/utf8.h \
|
||||
../include/cpdoccore/xml/attributes.h \
|
||||
../include/cpdoccore/xml/nodetype.h \
|
||||
../include/cpdoccore/xml/sax.h \
|
||||
../include/cpdoccore/xml/simple_xml_writer.h \
|
||||
../include/cpdoccore/xml/utils.h \
|
||||
../include/cpdoccore/xml/xmlchar.h \
|
||||
../include/cpdoccore/xml/xmlelement.h
|
||||
../include/CPColorUtils.h \
|
||||
../include/CPNoncopyable.h \
|
||||
../include/CPOptional.h \
|
||||
../include/CPScopedPtr.h \
|
||||
../include/CPSharedPtr.h \
|
||||
../include/CPString.h \
|
||||
../include/CPWeakPtr.h \
|
||||
../include/common/readdocelement.h \
|
||||
../include/common/readstring.h \
|
||||
../include/common/writedocelement.h \
|
||||
../include/odf/odf_document.h \
|
||||
../include/odf/odfformat.h \
|
||||
../include/utf8cpp/utf8/checked.h \
|
||||
../include/utf8cpp/utf8/core.h \
|
||||
../include/utf8cpp/utf8/unchecked.h \
|
||||
../include/utf8cpp/utf8.h \
|
||||
../include/xml/attributes.h \
|
||||
../include/xml/nodetype.h \
|
||||
../include/xml/sax.h \
|
||||
../include/xml/simple_xml_writer.h \
|
||||
../include/xml/utils.h \
|
||||
../include/xml/xmlchar.h \
|
||||
../include/xml/xmlelement.h
|
||||
|
||||
|
||||
@ -63,9 +63,11 @@
|
||||
#include "../src/odf/office_event_listeners.cpp"
|
||||
#include "../src/odf/office_presentation.cpp"
|
||||
#include "../src/odf/office_scripts.cpp"
|
||||
#include "../src/odf/office_forms.cpp"
|
||||
#include "../src/odf/office_settings.cpp"
|
||||
#include "../src/odf/office_spreadsheet.cpp"
|
||||
#include "../src/odf/office_text.cpp"
|
||||
#include "../src/odf/office_meta.cpp"
|
||||
#include "../src/odf/paragraph_elements.cpp"
|
||||
#include "../src/odf/ruby.cpp"
|
||||
#include "../src/odf/search_table_cell.cpp"
|
||||
|
||||
@ -127,3 +127,6 @@
|
||||
#include "../src/odf/datatypes/tablefunction.cpp"
|
||||
#include "../src/odf/datatypes/tableorder.cpp"
|
||||
#include "../src/odf/datatypes/dategroup.cpp"
|
||||
#include "../src/odf/datatypes/commandtype.cpp"
|
||||
#include "../src/odf/datatypes/stylenumformat.cpp"
|
||||
#include "../src/odf/datatypes/bibliography.cpp"
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
#include "../src/docx/pptx_conversion_context.h"
|
||||
#include "../src/docx/xlsxconversioncontext.h"
|
||||
|
||||
#include "../include/cpdoccore/odf/odf_document.h"
|
||||
#include "../include/odf/odf_document.h"
|
||||
|
||||
int ConvertOds2Xlsx(cpdoccore::odf_reader::odf_document & inputOdf, const std::wstring & dstPath, const std::wstring & fontsPath)
|
||||
{
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#include "../../include/cpdoccore/CPString.h"
|
||||
#include "../../include/CPString.h"
|
||||
#include "../../../DesktopEditor/common/File.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -30,9 +30,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../include/cpdoccore/common/readdocelement.h"
|
||||
#include "../../include/cpdoccore/xml/attributes.h"
|
||||
#include "../../include/cpdoccore/xml/sax.h"
|
||||
#include "../../include/common/readdocelement.h"
|
||||
#include "../../include/xml/attributes.h"
|
||||
#include "../../include/xml/sax.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace common {
|
||||
|
||||
@ -31,8 +31,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <cpdoccore/xml/attributes.h>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/attributes.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "docx_content_type.h"
|
||||
#include "namespaces.h"
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/xml/xmlelement.h>
|
||||
#include <xml/xmlelement.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
@ -35,13 +35,15 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <cpdoccore/xml/utils.h>
|
||||
#include <cpdoccore/odf/odf_document.h>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/utils.h>
|
||||
#include <odf/odf_document.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "docx_conversion_context.h"
|
||||
|
||||
#include "../odf/odfcontext.h"
|
||||
#include "../odf/text_content.h"
|
||||
#include "../odf/calcs_styles.h"
|
||||
#include "../odf/style_paragraph_properties.h"
|
||||
#include "../odf/style_text_properties.h"
|
||||
#include "../odf/style_table_properties.h"
|
||||
@ -51,7 +53,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;
|
||||
@ -100,7 +102,7 @@ void text_tracked_context::start_change (std::wstring id)
|
||||
}
|
||||
void text_tracked_context::end_change ()
|
||||
{
|
||||
mapChanges_.insert( std::pair<std::wstring, _state>(current_state_.id, current_state_));
|
||||
mapChanges_.insert( std::make_pair(current_state_.id, current_state_));
|
||||
|
||||
current_state_.clear();
|
||||
}
|
||||
@ -130,7 +132,54 @@ text_tracked_context::_state & text_tracked_context::get_tracked_change(std::wst
|
||||
return current_state_; //empty
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
void text_forms_context::start_element (int type)
|
||||
{
|
||||
current_state_.clear();
|
||||
|
||||
current_state_.type = type;
|
||||
}
|
||||
void text_forms_context::set_id (const std::wstring& id)
|
||||
{
|
||||
current_state_.id = id;
|
||||
}
|
||||
void text_forms_context::set_name (const std::wstring& name)
|
||||
{
|
||||
current_state_.name = name;
|
||||
}
|
||||
void text_forms_context::set_label (const std::wstring& label)
|
||||
{
|
||||
current_state_.label = label;
|
||||
}
|
||||
void text_forms_context::set_uuid (const std::wstring& uuid)
|
||||
{
|
||||
current_state_.uuid = uuid;
|
||||
}
|
||||
void text_forms_context::set_value (const std::wstring &value)
|
||||
{
|
||||
current_state_.value = value;
|
||||
}
|
||||
void text_forms_context::set_element(odf_reader::form_element *elm)
|
||||
{
|
||||
current_state_.element = elm;
|
||||
}
|
||||
void text_forms_context::end_element ()
|
||||
{
|
||||
mapElements_.insert( std::make_pair(current_state_.id, current_state_));
|
||||
|
||||
current_state_.clear();
|
||||
}
|
||||
text_forms_context::_state& text_forms_context::get_state_element (std::wstring id)
|
||||
{
|
||||
std::map<std::wstring, _state>::iterator it = mapElements_.find(id);
|
||||
|
||||
if (it != mapElements_.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
else
|
||||
return current_state_; //empty
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
docx_conversion_context::docx_conversion_context(odf_reader::odf_document * OdfDocument) :
|
||||
next_dump_page_properties_ (false),
|
||||
page_break_ (false),
|
||||
@ -141,6 +190,7 @@ docx_conversion_context::docx_conversion_context(odf_reader::odf_document * OdfD
|
||||
in_paragraph_ (false),
|
||||
in_header_ (false),
|
||||
in_drawing_content_ (false),
|
||||
in_table_content_ (false),
|
||||
text_tracked_context_ (*this),
|
||||
table_context_ (*this),
|
||||
output_document_ (NULL),
|
||||
@ -158,7 +208,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()
|
||||
{
|
||||
@ -254,20 +304,21 @@ void docx_conversion_context::finish_paragraph()
|
||||
|
||||
void docx_conversion_context::finish_run()
|
||||
{
|
||||
if (in_run_)
|
||||
{
|
||||
output_stream() << L"</w:r>";
|
||||
in_run_ = false;
|
||||
if (get_comments_context().state()==2)
|
||||
{
|
||||
output_stream()<< L"<w:commentRangeEnd w:id=\"" << get_comments_context().current_id() << L"\" />";
|
||||
|
||||
add_element_to_run();
|
||||
output_stream()<< L"<w:commentReference w:id=\"" << get_comments_context().current_id() << L"\" />";
|
||||
get_comments_context().state(0);
|
||||
finish_run();
|
||||
}
|
||||
}
|
||||
if (false == in_run_) return;
|
||||
|
||||
output_stream() << L"</w:r>";
|
||||
in_run_ = false;
|
||||
|
||||
if (get_comments_context().state()==2)
|
||||
{
|
||||
output_stream()<< L"<w:commentRangeEnd w:id=\"" << get_comments_context().current_id() << L"\"/>";
|
||||
|
||||
add_element_to_run();
|
||||
output_stream()<< L"<w:commentReference w:id=\"" << get_comments_context().current_id() << L"\"/>";
|
||||
get_comments_context().state(0);
|
||||
finish_run();
|
||||
}
|
||||
|
||||
}
|
||||
void docx_conversion_context::start_math_formula()
|
||||
{
|
||||
@ -283,6 +334,215 @@ void docx_conversion_context::end_math_formula()
|
||||
output_stream() << L"<m:oMath>" << math_content << L"</m:oMath>";
|
||||
}
|
||||
}
|
||||
void docx_conversion_context::start_sdt(int type)
|
||||
{
|
||||
in_table_content_ = true;
|
||||
|
||||
table_content_context_.type_table_content = type;
|
||||
|
||||
if (table_content_context_.type_table_content < 4)
|
||||
{
|
||||
output_stream() << L"<w:sdt><w:sdtPr>";
|
||||
if (table_content_context_.type_table_content == 3)
|
||||
{
|
||||
output_stream() << L"<w:bibliography/>";
|
||||
}
|
||||
else
|
||||
{
|
||||
output_stream() << L"<w:docPartObj><w:docPartGallery w:val=\"";
|
||||
|
||||
if (table_content_context_.type_table_content == 1) output_stream() << L"Table of Contents";
|
||||
if (table_content_context_.type_table_content == 2) output_stream() << L"List od Illustrations";
|
||||
|
||||
output_stream() << L"\"/><w:docPartUnique/></w:docPartObj>";
|
||||
|
||||
}
|
||||
output_stream() << L"</w:sdtPr><w:sdtContent>";
|
||||
}
|
||||
}
|
||||
|
||||
void docx_conversion_context::start_index_content()
|
||||
{
|
||||
if (!in_table_content_) return;
|
||||
|
||||
start_paragraph(false);
|
||||
|
||||
std::wstring sInstrText;
|
||||
|
||||
switch(table_content_context_.type_table_content)
|
||||
{
|
||||
case 1: sInstrText += L" TOC \\f \\h \\u"; break;
|
||||
case 2:
|
||||
case 4:
|
||||
case 6:
|
||||
case 7: sInstrText += L" TOC \\h \\z"; break;
|
||||
case 5: sInstrText += L" INDEX \\z"; break;
|
||||
case 3: sInstrText += L" BIBLIOGRAPHY"; break;
|
||||
}
|
||||
|
||||
if (table_content_context_.min_outline_level > 0)
|
||||
{
|
||||
if (table_content_context_.max_outline_level > 9)
|
||||
table_content_context_.max_outline_level = 9;
|
||||
|
||||
sInstrText += L" \\o \"" + std::to_wstring(table_content_context_.min_outline_level) + L"-" +
|
||||
std::to_wstring(table_content_context_.max_outline_level) + L"\" ";
|
||||
}
|
||||
/*\\l 1-3*/
|
||||
if (!table_content_context_.caption_sequence_name.empty())
|
||||
{
|
||||
sInstrText += L" \\c \"" + table_content_context_.caption_sequence_name + L"\"";
|
||||
}
|
||||
|
||||
output_stream() << L"<w:r>";
|
||||
output_stream() << L"<w:fldChar w:fldCharType=\"begin\"/>";
|
||||
output_stream() << L"</w:r>";
|
||||
output_stream() << L"<w:r>";
|
||||
output_stream() << L"<w:instrText xml:space=\"preserve\">" << sInstrText << L" </w:instrText>";
|
||||
output_stream() << L"</w:r>";
|
||||
output_stream() << L"<w:r>";
|
||||
//output_stream() << L"<w:rPr>
|
||||
//output_stream() << L"<w:rFonts w:ascii="Minion Pro" w:eastAsia="DejaVuSans" w:hAnsi="Minion Pro"/>
|
||||
//output_stream() << L"<w:bCs w:val="0"/>
|
||||
//output_stream() << L"<w:sz w:val="21"/>
|
||||
//output_stream() << L"<w:szCs w:val="24"/>
|
||||
//output_stream() << L"</w:rPr>
|
||||
output_stream() << L"<w:fldChar w:fldCharType=\"separate\"/>";
|
||||
output_stream() << L"</w:r>";
|
||||
|
||||
finish_paragraph();
|
||||
}
|
||||
void docx_conversion_context::end_index_content()
|
||||
{
|
||||
if (!in_table_content_) return;
|
||||
|
||||
start_paragraph(false);
|
||||
output_stream() << L"<w:r>";
|
||||
//output_stream() << L"<w:rPr>";
|
||||
//output_stream() << L"<w:rFonts w:ascii="Minion Pro" w:hAnsi="Minion Pro"/>";
|
||||
//output_stream() << L"<w:sz w:val="20"/>
|
||||
//output_stream() << L"</w:rPr>";
|
||||
output_stream() << L"<w:fldChar w:fldCharType=\"end\"/>";
|
||||
output_stream() << L"</w:r>";
|
||||
|
||||
finish_paragraph();
|
||||
}
|
||||
void docx_conversion_context::end_sdt()
|
||||
{
|
||||
if (!in_table_content_) return;
|
||||
|
||||
if (table_content_context_.type_table_content < 4)
|
||||
{
|
||||
output_stream() << L"</w:sdtContent></w:sdt>";
|
||||
}
|
||||
in_table_content_ = false;
|
||||
table_content_context_.clear_all();
|
||||
}
|
||||
void docx_conversion_context::start_index_element()
|
||||
{
|
||||
table_content_context_.clear_current_content_template_index();
|
||||
}
|
||||
void docx_conversion_context::end_index_element()
|
||||
{
|
||||
table_content_context_.clear_current_content_template_index();
|
||||
}
|
||||
void docx_conversion_context::add_bibliography_item (const std::wstring & item)
|
||||
{
|
||||
arBibliography.push_back(item);
|
||||
}
|
||||
void docx_conversion_context::start_bookmark (const std::wstring &name)
|
||||
{
|
||||
std::map<std::wstring, int>::iterator pFind = mapBookmarks.find(name);
|
||||
|
||||
int id = -1;
|
||||
if (pFind == mapBookmarks.end())
|
||||
{
|
||||
id = mapBookmarks.size() + 1;
|
||||
mapBookmarks.insert(std::make_pair(name, id));
|
||||
}
|
||||
else
|
||||
{
|
||||
id = pFind->second;
|
||||
}
|
||||
|
||||
finish_run();
|
||||
output_stream() << L"<w:bookmarkStart w:id=\"" << std::to_wstring(id) << L"\" w:name=\"" << name << L"\"/>";
|
||||
}
|
||||
|
||||
void docx_conversion_context::end_bookmark (const std::wstring &name)
|
||||
{
|
||||
std::map<std::wstring, int>::iterator pFind = mapBookmarks.find(name);
|
||||
|
||||
int id = -1;
|
||||
if (pFind == mapBookmarks.end())
|
||||
{
|
||||
return; //???
|
||||
}
|
||||
else
|
||||
{
|
||||
id = pFind->second;
|
||||
}
|
||||
finish_run();
|
||||
output_stream() << L"<w:bookmarkEnd w:id=\"" << std::to_wstring(id) << L"\"/>";
|
||||
}
|
||||
|
||||
void docx_conversion_context::start_alphabetical_index (const std::wstring &id)
|
||||
{
|
||||
std::map<std::wstring, std::vector<odf_reader::office_element_ptr>>::iterator pFind = mapAlphabeticals.find(id);
|
||||
|
||||
if (pFind != mapAlphabeticals.end()) return;
|
||||
|
||||
std::vector<odf_reader::office_element_ptr> texts;
|
||||
mapAlphabeticals.insert(std::make_pair(id, texts));
|
||||
|
||||
current_alphabetic_index_ = id;
|
||||
}
|
||||
void docx_conversion_context::add_alphabetical_index_text (odf_reader::office_element_ptr & elem)
|
||||
{
|
||||
std::map<std::wstring, std::vector<odf_reader::office_element_ptr>>::iterator pFind = mapAlphabeticals.find(current_alphabetic_index_);
|
||||
if (pFind == mapAlphabeticals.end())
|
||||
{
|
||||
return;
|
||||
}
|
||||
pFind->second.push_back(elem);
|
||||
}
|
||||
void docx_conversion_context::end_alphabetical_index (const std::wstring &id)
|
||||
{
|
||||
std::map<std::wstring, std::vector<odf_reader::office_element_ptr>>::iterator pFind = mapAlphabeticals.find(id);
|
||||
|
||||
if (pFind == mapAlphabeticals.end())
|
||||
{
|
||||
return;
|
||||
}
|
||||
finish_run();
|
||||
|
||||
output_stream() << L"<w:r><w:fldChar w:fldCharType=\"begin\"/></w:r>";
|
||||
output_stream() << L"<w:r><w:instrText>XE \"";
|
||||
|
||||
ElementType type;
|
||||
for (size_t i = 0; i < pFind->second.size(); i++)
|
||||
{
|
||||
type = pFind->second[i]->get_type();
|
||||
pFind->second[i]->text_to_stream(output_stream());
|
||||
}
|
||||
|
||||
output_stream() << L"\"</w:instrText></w:r>";
|
||||
|
||||
output_stream() << L"<w:r><w:fldChar w:fldCharType=\"end\"/></w:r>";
|
||||
|
||||
for (size_t i = 0; i < pFind->second.size(); i++)
|
||||
{
|
||||
pFind->second[i]->docx_convert(*this);
|
||||
}
|
||||
|
||||
mapAlphabeticals.erase(pFind);
|
||||
|
||||
if (mapAlphabeticals.empty())
|
||||
current_alphabetic_index_.clear();
|
||||
else
|
||||
current_alphabetic_index_ = mapAlphabeticals.begin()->first; // todooo vector+map+level
|
||||
}
|
||||
|
||||
|
||||
void docx_conversion_context::start_chart(std::wstring name)
|
||||
{
|
||||
@ -333,17 +593,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 +607,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_);
|
||||
@ -381,7 +629,11 @@ void docx_conversion_context::start_document()
|
||||
output_stream() << L"xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\" ";
|
||||
output_stream() << L"xmlns:wps=\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\" ";
|
||||
output_stream() << L"xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" ";
|
||||
output_stream() << L"mc:Ignorable=\"w14 wp14\">";
|
||||
output_stream() << L"xmlns:cx=\"http://schemas.microsoft.com/office/drawing/2014/chartex\" ";
|
||||
output_stream() << L"xmlns:cx1=\"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex\" ";
|
||||
output_stream() << L"xmlns:w15=\"http://schemas.microsoft.com/office/word/2012/wordml\" ";
|
||||
output_stream() << L"xmlns:w16se=\"http://schemas.microsoft.com/office/word/2015/wordml/symex\" ";
|
||||
output_stream() << L"mc:Ignorable=\"w14 w15 w16se wne wp14\">";
|
||||
|
||||
|
||||
//apply page-default prop
|
||||
@ -394,7 +646,7 @@ void docx_conversion_context::end_document()
|
||||
output_stream() << L"</w:document>";
|
||||
|
||||
output_document_->get_word_files().set_document ( package::simple_element::create(L"document.xml", document_xml_.str()) );
|
||||
output_document_->get_word_files().set_settings ( package::simple_element::create(L"settings.xml",dump_settings_document()));
|
||||
output_document_->get_word_files().set_settings ( package::simple_element::create(L"settings.xml", dump_settings_document()));
|
||||
output_document_->get_word_files().set_media ( mediaitems_, applicationFonts_);
|
||||
output_document_->get_word_files().set_comments ( comments_context_);
|
||||
output_document_->get_word_files().set_headers_footers( headers_footers_);
|
||||
@ -403,6 +655,7 @@ void docx_conversion_context::end_document()
|
||||
content_file_.set_media( mediaitems_);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
dump_bibliography();
|
||||
dump_hyperlinks (notes_context_.footnotesRels(), hyperlinks::footnote_place);
|
||||
dump_hyperlinks (notes_context_.endnotesRels(), hyperlinks::endnote_place);
|
||||
|
||||
@ -419,13 +672,66 @@ void docx_conversion_context::end_document()
|
||||
|
||||
}
|
||||
////////////////////////////////
|
||||
//content->add_rel(relationship(dId, kType, dName));
|
||||
|
||||
output_document_->get_word_files().update_rels(*this);
|
||||
/////////////////////////////////////
|
||||
|
||||
}
|
||||
void docx_conversion_context::dump_bibliography()
|
||||
{
|
||||
if (arBibliography.empty()) return;
|
||||
|
||||
std::wstringstream output(L"");
|
||||
CP_XML_WRITER(output)
|
||||
{
|
||||
CP_XML_NODE(L"b:Sources")
|
||||
{
|
||||
CP_XML_ATTR(L"Version", 6);
|
||||
CP_XML_ATTR(L"StyleName", L"APA");
|
||||
CP_XML_ATTR(L"SelectedStyle", L"\\APASixthEditionOfficeOnline.xsl");
|
||||
CP_XML_ATTR(L"xmlns", L"http://schemas.openxmlformats.org/officeDocument/2006/bibliography");
|
||||
CP_XML_ATTR(L"xmlns:b", L"http://schemas.openxmlformats.org/officeDocument/2006/bibliography");
|
||||
|
||||
for (size_t i = 0; i < arBibliography.size(); i++)
|
||||
{
|
||||
CP_XML_NODE(L"b:Source")
|
||||
{
|
||||
CP_XML_STREAM() << arBibliography[i];
|
||||
CP_XML_NODE(L"b:RefOrder")
|
||||
{
|
||||
CP_XML_STREAM() << std::to_wstring(i + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
std::wstringstream output_props(L"");
|
||||
CP_XML_WRITER(output_props)
|
||||
{
|
||||
CP_XML_NODE(L"ds:datastoreItem")
|
||||
{
|
||||
CP_XML_ATTR(L"xmlns:ds", L"http://schemas.openxmlformats.org/officeDocument/2006/customXml");
|
||||
CP_XML_ATTR(L"ds:itemID", L"{28C8D49A-D84A-4837-A0AC-8E2C3AE46B82}");
|
||||
|
||||
CP_XML_NODE(L"ds:schemaRefs")
|
||||
{
|
||||
CP_XML_NODE(L"ds:schemaRef")
|
||||
{
|
||||
CP_XML_ATTR(L"ds:uri", L"http://schemas.openxmlformats.org/officeDocument/2006/bibliography");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
package::customXml_content_ptr content = package::customXml_content::create(output.str(), output_props.str());
|
||||
int id = output_document_->add_customXml(content);
|
||||
|
||||
const std::wstring sRId = std::wstring(L"cstId") + std::to_wstring(id);
|
||||
const std::wstring sRel = L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml";
|
||||
const std::wstring sFileRef = std::wstring(L"../customXml/item") + std::to_wstring(id) + L".xml";
|
||||
|
||||
output_document_->get_word_files().add_rels(relationship(sRId, sRel, sFileRef));
|
||||
|
||||
}
|
||||
|
||||
std::wstring docx_conversion_context::dump_settings_document()
|
||||
{
|
||||
@ -449,21 +755,25 @@ std::wstring docx_conversion_context::dump_settings_document()
|
||||
_CP_OPT(std::wstring) strVal;
|
||||
_CP_OPT(int) intVal;
|
||||
|
||||
if (odf_reader::GetProperty(settings_properties_,L"evenAndOddHeaders",boolVal))
|
||||
if (odf_reader::GetProperty(settings_properties_,L"evenAndOddHeaders", boolVal))
|
||||
{
|
||||
CP_XML_NODE(L"w:evenAndOddHeaders");
|
||||
}
|
||||
if (odf_reader::GetProperty(settings_properties_,L"displayBackgroundShape",boolVal))
|
||||
if (odf_reader::GetProperty(settings_properties_,L"displayBackgroundShape", boolVal))
|
||||
{
|
||||
CP_XML_NODE(L"w:displayBackgroundShape");
|
||||
}
|
||||
if (odf_reader::GetProperty(settings_properties_,L"zoom",intVal))
|
||||
if (odf_reader::GetProperty(settings_properties_,L"zoom", intVal))
|
||||
{
|
||||
CP_XML_NODE(L"w:zoom")
|
||||
{
|
||||
CP_XML_ATTR(L"w:percent",intVal.get());
|
||||
}
|
||||
}
|
||||
if (odf_reader::GetProperty(settings_properties_,L"mirrorMargins", boolVal))
|
||||
{
|
||||
CP_XML_NODE(L"w:mirrorMargins");
|
||||
}
|
||||
}
|
||||
}
|
||||
return output.str();
|
||||
@ -843,7 +1153,7 @@ bool docx_conversion_context::process_page_properties(std::wostream & strm)
|
||||
|
||||
if (page_layout_instance_)
|
||||
{
|
||||
page_layout_instance_->docx_serialize(strm, *this);
|
||||
page_layout_instance_->docx_serialize(strm, *this);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -868,13 +1178,13 @@ bool docx_conversion_context::process_page_properties(std::wostream & strm)
|
||||
|
||||
void docx_conversion_context::end_process_style_content(bool in_styles)
|
||||
{
|
||||
docx_serialize_paragraph_style(output_stream(), automatic_parent_style_, in_styles);
|
||||
serialize_paragraph_style(output_stream(), automatic_parent_style_, in_styles);
|
||||
|
||||
if (automatic_parent_style_.empty())
|
||||
styles_context_.docx_serialize_text_style( output_stream(), L"", text_tracked_context_.dumpRPr_);
|
||||
}
|
||||
|
||||
void docx_conversion_context::docx_serialize_paragraph_style(std::wostream & strm, const std::wstring & ParentId, bool in_styles)
|
||||
void docx_conversion_context::serialize_paragraph_style(std::wostream & strm, const std::wstring & ParentId, bool in_styles)
|
||||
//in_styles = true -> styles.xml
|
||||
//почему то конструкция <pPr><rPr/></pPr><rPr/> "не работает" в части в rPr в ms2010 )
|
||||
{
|
||||
@ -919,7 +1229,7 @@ void docx_conversion_context::docx_serialize_paragraph_style(std::wostream & str
|
||||
}
|
||||
}
|
||||
CP_XML_STREAM() << paragraph_style.str();
|
||||
docx_serialize_list_properties(CP_XML_STREAM());
|
||||
serialize_list_properties(CP_XML_STREAM());
|
||||
|
||||
|
||||
if ((run_style.tellp() > 0 && in_styles == false) || !get_text_tracked_context().dumpRPrInsDel_.empty())
|
||||
@ -952,7 +1262,8 @@ void docx_conversion_context::start_automatic_style(const std::wstring & ParentI
|
||||
void docx_conversion_context::end_automatic_style()
|
||||
{
|
||||
in_automatic_style_ = false;
|
||||
automatic_parent_style_ = L"";
|
||||
automatic_parent_style_.clear();
|
||||
tabs_context_.clear();
|
||||
}
|
||||
|
||||
bool docx_conversion_context::in_automatic_style()
|
||||
@ -1125,8 +1436,215 @@ std::wstring docx_conversion_context::find_list_rename(const std::wstring & List
|
||||
void docx_conversion_context::end_list_item()
|
||||
{
|
||||
}
|
||||
int docx_conversion_context::process_text_attr(odf_reader::text::paragraph_attrs *Attr)
|
||||
{
|
||||
if ( Attr->text_style_name_.empty() ) return 0;
|
||||
|
||||
void docx_conversion_context::docx_serialize_list_properties(std::wostream & strm)
|
||||
odf_reader::style_instance * styleInst =
|
||||
root()->odf_context().styleContainer().style_by_name(Attr->text_style_name_, odf_types::style_family::Paragraph, process_headers_footers_);
|
||||
|
||||
if (!styleInst) return 0;
|
||||
|
||||
if (false == styleInst->is_automatic()) return 0;
|
||||
|
||||
odf_reader::style_content *styleContent = styleInst->content();
|
||||
|
||||
if (!styleContent) return 0;
|
||||
|
||||
push_text_properties(styleContent->get_style_text_properties());
|
||||
return 1;
|
||||
}
|
||||
int docx_conversion_context::process_paragraph_attr(odf_reader::text::paragraph_attrs *Attr)
|
||||
{
|
||||
if (!Attr) return 0;
|
||||
|
||||
bool in_drawing = false;
|
||||
|
||||
if (get_drawing_context().get_current_shape() || get_drawing_context().get_current_frame())
|
||||
{
|
||||
in_drawing = true;
|
||||
}
|
||||
|
||||
if (false == Attr->text_style_name_.empty())
|
||||
{
|
||||
if (in_table_content_ && Attr->text_style_name_.empty())
|
||||
{
|
||||
table_content_context_.set_current_level(Attr->text_style_name_);
|
||||
}
|
||||
if (odf_reader::style_instance * styleInst =
|
||||
root()->odf_context().styleContainer().style_by_name(Attr->text_style_name_, odf_types::style_family::Paragraph, process_headers_footers_)
|
||||
)
|
||||
{
|
||||
process_page_break_after(styleInst);
|
||||
if (styleInst->is_automatic())
|
||||
{
|
||||
if (odf_reader::style_content * styleContent = styleInst->content())
|
||||
{
|
||||
std::wstring id;
|
||||
//office_element_ptr parent_tab_stops_;
|
||||
if (const odf_reader::style_instance * parentStyleContent = styleInst->parent())
|
||||
{
|
||||
std::wstring parent_name = parentStyleContent->name();
|
||||
id = styles_map_.get( parent_name, parentStyleContent->type() );
|
||||
|
||||
if (in_table_content_ && table_content_context_.empty_current_table_content_level_index())
|
||||
{
|
||||
table_content_context_.set_current_level(parent_name);
|
||||
}
|
||||
}
|
||||
|
||||
start_automatic_style(id);
|
||||
|
||||
odf_reader::calc_tab_stops(styleInst, get_tabs_context());
|
||||
|
||||
//вытаскивает rtl c цепочки стилей !! - просто прописать в наследуемом НЕЛЬЗЯ !!
|
||||
odf_reader::paragraph_format_properties properties = odf_reader::calc_paragraph_properties_content(styleInst);
|
||||
if (properties.style_writing_mode_)
|
||||
{
|
||||
odf_types::writing_mode::type type = properties.style_writing_mode_->get_type();
|
||||
switch(type)
|
||||
{
|
||||
case odf_types::writing_mode::RlTb:
|
||||
case odf_types::writing_mode::TbRl:
|
||||
case odf_types::writing_mode::Rl:
|
||||
set_rtl(true);
|
||||
break;
|
||||
default:
|
||||
set_rtl(false);
|
||||
}
|
||||
}
|
||||
set_margin_left(properties.fo_margin_left_? 20.0 * properties.fo_margin_left_->get_length().get_value_unit(odf_types::length::pt) : 0);
|
||||
|
||||
styleContent->docx_convert(*this);
|
||||
|
||||
end_automatic_style();
|
||||
|
||||
push_text_properties(styleContent->get_style_text_properties());
|
||||
|
||||
if (!get_section_context().dump_.empty()
|
||||
&& !get_table_context().in_table()
|
||||
&& (get_process_note() == oox::docx_conversion_context::noNote)
|
||||
&& !in_drawing)
|
||||
{
|
||||
output_stream() << L"<w:pPr>";
|
||||
if (is_paragraph_header() )
|
||||
{
|
||||
output_stream() << get_section_context().dump_;
|
||||
get_section_context().dump_.clear();
|
||||
|
||||
output_stream() << L"</w:pPr>";
|
||||
finish_paragraph();
|
||||
start_paragraph();
|
||||
}
|
||||
else
|
||||
{
|
||||
output_stream() << get_section_context().dump_;
|
||||
get_section_context().dump_.clear();
|
||||
output_stream() << L"</w:pPr>";
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const std::wstring id = styles_map_.get( styleInst->name(), styleInst->type() );
|
||||
output_stream() << L"<w:pPr>";
|
||||
//todooo причесать
|
||||
if (!get_section_context().dump_.empty()
|
||||
&& !get_table_context().in_table()
|
||||
&& (get_process_note() == oox::docx_conversion_context::noNote)
|
||||
&& !in_drawing)
|
||||
{
|
||||
if (is_paragraph_header() )
|
||||
{
|
||||
output_stream() << get_section_context().dump_;
|
||||
get_section_context().dump_.clear();
|
||||
|
||||
output_stream() << L"</w:pPr>";
|
||||
finish_paragraph();
|
||||
start_paragraph();
|
||||
output_stream() << L"<w:pPr>";
|
||||
}
|
||||
else
|
||||
{
|
||||
output_stream() << get_section_context().dump_;
|
||||
get_section_context().dump_.clear();
|
||||
}
|
||||
}
|
||||
|
||||
output_stream() << L"<w:pStyle w:val=\"" << id << L"\" />";
|
||||
|
||||
if (!get_text_tracked_context().dumpPPr_.empty())
|
||||
{
|
||||
output_stream() << get_text_tracked_context().dumpPPr_;
|
||||
get_text_tracked_context().dumpPPr_.clear();
|
||||
}
|
||||
|
||||
serialize_list_properties(output_stream());
|
||||
|
||||
if ((Attr->outline_level_) && (*Attr->outline_level_ > 0))
|
||||
{
|
||||
output_stream() << L"<w:outlineLvl w:val=\"" << *Attr->outline_level_ - 1 << L"\" />";
|
||||
}
|
||||
|
||||
if (!get_text_tracked_context().dumpRPrInsDel_.empty())
|
||||
{
|
||||
output_stream() << L"<w:rPr>";
|
||||
output_stream() << get_text_tracked_context().dumpRPrInsDel_;
|
||||
get_text_tracked_context().dumpRPrInsDel_.clear();
|
||||
output_stream() << L"</w:rPr>";
|
||||
}
|
||||
output_stream() << L"</w:pPr>";
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!get_section_context().dump_.empty()
|
||||
&& !get_table_context().in_table()
|
||||
&& (get_process_note() == oox::docx_conversion_context::noNote)
|
||||
&& !in_drawing)
|
||||
{
|
||||
output_stream() << L"<w:pPr>";
|
||||
output_stream() << get_section_context().dump_;
|
||||
get_section_context().dump_.clear();
|
||||
//todooo выяснить реальны ли заголовки без стилей и свойств
|
||||
output_stream() << L"</w:pPr>";
|
||||
return 3;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void docx_conversion_context::process_page_break_after(const odf_reader::style_instance * styleInst)
|
||||
{
|
||||
if (styleInst)
|
||||
{
|
||||
const odf_reader::style_instance * inst = styleInst;
|
||||
while (inst)
|
||||
{
|
||||
if (inst->content() && inst->content()->get_style_paragraph_properties())
|
||||
{
|
||||
_CP_OPT(odf_types::fo_break) fo_break_val = inst->content()->get_style_paragraph_properties()->content_.fo_break_after_;
|
||||
if (fo_break_val)
|
||||
{
|
||||
if (fo_break_val->get_type() == odf_types::fo_break::Page)
|
||||
{
|
||||
set_page_break_after(true);
|
||||
break;
|
||||
}
|
||||
else if (fo_break_val->get_type() == odf_types::fo_break::Auto)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
inst = inst->parent();
|
||||
}
|
||||
}
|
||||
}
|
||||
void docx_conversion_context::serialize_list_properties(std::wostream & strm)
|
||||
{
|
||||
if (!list_style_stack_.empty())
|
||||
{
|
||||
@ -1203,7 +1721,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);
|
||||
@ -1312,7 +1830,7 @@ void docx_conversion_context::add_note_reference ()
|
||||
|
||||
typedef std::map<std::wstring, text_tracked_context::_state>::iterator map_changes_iterator;
|
||||
|
||||
void docx_conversion_context::start_text_changes (std::wstring id)
|
||||
void docx_conversion_context::start_text_changes (const std::wstring &id)
|
||||
{
|
||||
text_tracked_context::_state &state_add = text_tracked_context_.get_tracked_change(id);
|
||||
if (state_add.id != id) return;
|
||||
@ -1479,7 +1997,7 @@ void docx_conversion_context::end_changes()
|
||||
text_tracked_context_.dumpPPr_.clear();
|
||||
text_tracked_context_.dumpRPr_.clear();
|
||||
}
|
||||
void docx_conversion_context::end_text_changes (std::wstring id)
|
||||
void docx_conversion_context::end_text_changes (const std::wstring &id)
|
||||
{
|
||||
if (map_current_changes_.empty()) return;
|
||||
|
||||
@ -1504,6 +2022,7 @@ void docx_conversion_context::add_user_field(const std::wstring & name, const st
|
||||
{
|
||||
map_user_fields.insert(std::make_pair(name, value));
|
||||
}
|
||||
|
||||
std::wstring docx_conversion_context::get_user_field(const std::wstring & name)
|
||||
{
|
||||
std::map<std::wstring, std::wstring>::iterator pFind = map_user_fields.find(name);
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -62,12 +62,15 @@ namespace cpdoccore {
|
||||
class style_text_properties;
|
||||
class draw_frame;
|
||||
class draw_shape;
|
||||
class draw_control;
|
||||
class office_element;
|
||||
class style_columns;
|
||||
class form_element;
|
||||
|
||||
namespace text
|
||||
{
|
||||
class note_citation;
|
||||
class paragraph_attrs;
|
||||
}
|
||||
}
|
||||
|
||||
@ -117,8 +120,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_;
|
||||
};
|
||||
|
||||
@ -164,7 +165,16 @@ public:
|
||||
current_object_name_ = L"";
|
||||
current_shape_ = drawShape;
|
||||
}
|
||||
void start_group()
|
||||
void start_control(odf_reader::draw_control * drawControl)
|
||||
{
|
||||
current_level_++;
|
||||
objects_count_++;
|
||||
|
||||
current_shape_id_ = objects_count_;
|
||||
current_object_name_ = L"";
|
||||
current_control_ = drawControl;
|
||||
}
|
||||
void start_group()
|
||||
{
|
||||
current_level_++;
|
||||
objects_count_++;
|
||||
@ -212,6 +222,7 @@ public:
|
||||
{
|
||||
current_level_--;
|
||||
frames_.pop_back();
|
||||
caption_.clear();
|
||||
}
|
||||
|
||||
std::wstring & get_text_stream_frame()
|
||||
@ -228,7 +239,6 @@ public:
|
||||
else
|
||||
throw;
|
||||
}
|
||||
|
||||
std::wstring & get_text_stream_shape()
|
||||
{
|
||||
return shape_text_content_;
|
||||
@ -239,15 +249,24 @@ public:
|
||||
}
|
||||
void clear_stream_frame()
|
||||
{
|
||||
if (frames_.size()>0)
|
||||
frames_.back().text_content=L"";
|
||||
if (!frames_.empty())
|
||||
frames_.back().text_content.clear();
|
||||
}
|
||||
void stop_shape()
|
||||
{
|
||||
current_level_--;
|
||||
current_shape_ = NULL;
|
||||
shape_text_content_=L"";
|
||||
current_shape_id_ =0;
|
||||
shape_text_content_.clear();
|
||||
current_shape_id_ = 0;
|
||||
caption_.clear();
|
||||
}
|
||||
void stop_control()
|
||||
{
|
||||
current_level_--;
|
||||
current_control_ = NULL;
|
||||
shape_text_content_.clear();
|
||||
current_shape_id_ = 0;
|
||||
caption_.clear();
|
||||
}
|
||||
void stop_group()
|
||||
{
|
||||
@ -257,10 +276,10 @@ public:
|
||||
|
||||
int get_current_frame_id() const
|
||||
{
|
||||
if (frames_.size()>0) return frames_.back().id;
|
||||
if (!frames_.empty()) return frames_.back().id;
|
||||
else return 0;
|
||||
}
|
||||
bool in_group() { return groups_.size() > 0; }
|
||||
bool in_group() { return !groups_.empty(); }
|
||||
int get_current_level() const { return current_level_; }
|
||||
int get_current_shape_id() const { return current_shape_id_; }
|
||||
|
||||
@ -268,10 +287,15 @@ public:
|
||||
|
||||
odf_reader::draw_frame * get_current_frame() const
|
||||
{
|
||||
if (frames_.size()>0) return frames_.back().ptr;
|
||||
if (!frames_.empty()) return frames_.back().ptr;
|
||||
else return NULL;
|
||||
}
|
||||
odf_reader::draw_shape * get_current_shape() const { return current_shape_; }
|
||||
|
||||
void set_next_object_caption(const std::wstring & value)
|
||||
{
|
||||
caption_ = value;
|
||||
}
|
||||
|
||||
private:
|
||||
std::wstring shape_text_content_;
|
||||
@ -284,10 +308,13 @@ private:
|
||||
std::vector<_group> groups_;
|
||||
std::vector<_frame> frames_;
|
||||
|
||||
odf_reader::draw_shape * current_shape_;
|
||||
odf_reader::draw_shape *current_shape_;
|
||||
size_t current_shape_id_;
|
||||
|
||||
odf_reader::draw_control*current_control_;
|
||||
|
||||
std::wstring zero_string_;
|
||||
std::wstring caption_;
|
||||
|
||||
};
|
||||
|
||||
@ -544,6 +571,194 @@ private:
|
||||
|
||||
std::map<std::wstring, _state> mapChanges_;
|
||||
};
|
||||
|
||||
class text_forms_context
|
||||
{
|
||||
public:
|
||||
struct _state
|
||||
{
|
||||
std::wstring id;
|
||||
std::wstring name;
|
||||
int type = 0; //enum?
|
||||
std::wstring label;
|
||||
std::wstring uuid;
|
||||
std::wstring value;
|
||||
odf_reader::form_element* element = NULL;
|
||||
|
||||
void clear()
|
||||
{
|
||||
type = 0;
|
||||
id.clear();
|
||||
name.clear();
|
||||
label.clear();
|
||||
value.clear();
|
||||
uuid.clear();
|
||||
element = NULL;
|
||||
}
|
||||
};
|
||||
text_forms_context(){}
|
||||
|
||||
void start_element (int type);
|
||||
void set_id (const std::wstring& id);
|
||||
void set_name (const std::wstring& name);
|
||||
void set_label (const std::wstring& label);
|
||||
void set_uuid (const std::wstring& uuid);
|
||||
void set_value (const std::wstring& value);
|
||||
void set_element(odf_reader::form_element *elm);
|
||||
void end_element ();
|
||||
|
||||
_state& get_state_element (std::wstring id);
|
||||
|
||||
private:
|
||||
_state current_state_;
|
||||
std::map<std::wstring, _state> mapElements_;
|
||||
};
|
||||
class table_content_context
|
||||
{
|
||||
public:
|
||||
table_content_context()
|
||||
{
|
||||
clear_all();
|
||||
}
|
||||
enum template_type
|
||||
{
|
||||
TableContent = 1,
|
||||
Illustrations = 2,
|
||||
Bibliography = 3,
|
||||
Tables = 4
|
||||
};
|
||||
enum level_type
|
||||
{
|
||||
Span = 1,
|
||||
Text = 2,
|
||||
LinkStart = 3,
|
||||
LinkEnd = 4,
|
||||
TabStop = 5,
|
||||
PageNumber = 6,
|
||||
Chapter = 7
|
||||
};
|
||||
|
||||
struct _state
|
||||
{
|
||||
std::wstring name;
|
||||
int outline_level = -1;
|
||||
std::vector<int> content;
|
||||
|
||||
void clear()
|
||||
{
|
||||
name.clear();
|
||||
content.clear();
|
||||
outline_level = -1;
|
||||
}
|
||||
};
|
||||
void start_template(int type)
|
||||
{
|
||||
current_template.clear();
|
||||
type_table_content = type;
|
||||
}
|
||||
void end_template()
|
||||
{
|
||||
}
|
||||
|
||||
void start_level(const std::wstring& style_name)
|
||||
{
|
||||
current_state.name = style_name;
|
||||
}
|
||||
void add_level_content(int type)
|
||||
{
|
||||
current_state.content.push_back(type);
|
||||
}
|
||||
void set_outline_level(int level)
|
||||
{
|
||||
if (min_outline_level == -1 || min_outline_level > level)
|
||||
min_outline_level = level;
|
||||
|
||||
if (max_outline_level == -1 || max_outline_level < level)
|
||||
max_outline_level = level;
|
||||
|
||||
current_state.outline_level = level;
|
||||
}
|
||||
void end_level()
|
||||
{
|
||||
current_template.insert(std::make_pair(current_state.name, current_state));
|
||||
current_state.clear();
|
||||
}
|
||||
void set_current_level(const std::wstring &name)
|
||||
{
|
||||
std::map<std::wstring, _state>::iterator pFind = current_template.find(name);
|
||||
if (pFind == current_template.end())
|
||||
{
|
||||
current_content_template_.clear();
|
||||
}
|
||||
current_content_template_ = pFind->second.content;
|
||||
current_content_template_index_ = 0;
|
||||
}
|
||||
|
||||
void next_level_index()
|
||||
{
|
||||
current_content_template_index_++;
|
||||
}
|
||||
int get_type_current_content_template_index()
|
||||
{
|
||||
if (current_content_template_index_ < (int)current_content_template_.size() && current_content_template_index_ >= 0)
|
||||
return current_content_template_[current_content_template_index_];
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void clear_current_content_template_index()
|
||||
{
|
||||
current_content_template_index_ = 0;
|
||||
current_content_template_.clear();
|
||||
}
|
||||
|
||||
bool empty_current_table_content_level_index()
|
||||
{
|
||||
return current_content_template_.empty();
|
||||
}
|
||||
void clear_all()
|
||||
{
|
||||
type_table_content = 0;
|
||||
current_content_template_index_ = 0;
|
||||
current_content_template_.clear();
|
||||
current_template.clear();
|
||||
current_state.clear();
|
||||
caption_sequence_name.clear();
|
||||
min_outline_level = -1;
|
||||
max_outline_level = -1;
|
||||
}
|
||||
void add_sequence(const std::wstring & name, int outline_level)
|
||||
{
|
||||
//sequences.insert(std::make_pair(name, outline_level));
|
||||
sequences.push_back(name);
|
||||
}
|
||||
|
||||
std::wstring get_sequence (const std::wstring & ref)
|
||||
{
|
||||
for (size_t i = 0; i < sequences.size(); i++)
|
||||
{
|
||||
if (std::wstring:: npos != ref.find(sequences[i]))
|
||||
{
|
||||
return sequences[i];
|
||||
}
|
||||
}
|
||||
return L"";
|
||||
}
|
||||
|
||||
std::wstring caption_sequence_name;
|
||||
int type_table_content;
|
||||
int min_outline_level;
|
||||
int max_outline_level;
|
||||
|
||||
private:
|
||||
std::vector<int> current_content_template_;
|
||||
int current_content_template_index_;
|
||||
|
||||
std::map<std::wstring, _state> current_template;
|
||||
_state current_state;
|
||||
//std::map<std::wstring, int> sequences;
|
||||
std::vector<std::wstring> sequences;
|
||||
};
|
||||
//---------------------------------------------------------------------------------------------------------
|
||||
class docx_conversion_context : boost::noncopyable
|
||||
{
|
||||
@ -564,10 +779,11 @@ public:
|
||||
return temp_stream_;
|
||||
}
|
||||
|
||||
void add_bibliography_item (const std::wstring & item);
|
||||
void add_user_field (const std::wstring & name, const std::wstring & value);
|
||||
std::wstring get_user_field (const std::wstring & name);
|
||||
|
||||
void add_element_to_run (std::wstring parenStyleId = _T(""));
|
||||
void add_element_to_run (std::wstring parenStyleId = _T(""));
|
||||
void finish_run ();
|
||||
void add_new_run (std::wstring parentStyleId = _T(""));
|
||||
bool get_run_state () { return in_run_; }
|
||||
@ -576,11 +792,14 @@ public:
|
||||
void start_paragraph (bool is_header = false);
|
||||
void finish_paragraph ();
|
||||
|
||||
bool is_alphabetical_index () { return false == mapAlphabeticals.empty();}
|
||||
bool is_table_content () { return in_table_content_; }
|
||||
bool is_paragraph_header () { return in_header_; }
|
||||
bool get_paragraph_state () { return in_paragraph_; }
|
||||
void set_paragraph_state (bool val) { in_paragraph_ = val; }
|
||||
bool get_paragraph_keep () { return is_paragraph_keep_;}
|
||||
void set_paragraph_keep (bool val) { is_paragraph_keep_ = val; }
|
||||
|
||||
bool get_delete_text_state () { return is_delete_text_; }
|
||||
void set_delete_text_state (bool Val) { is_delete_text_ = Val; }
|
||||
|
||||
@ -591,12 +810,10 @@ 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;
|
||||
|
||||
void dump_bibliography();
|
||||
std::wstring dump_settings_document();
|
||||
|
||||
bool next_dump_page_properties_;
|
||||
@ -616,7 +833,16 @@ public:
|
||||
void start_office_text ();
|
||||
void end_office_text ();
|
||||
|
||||
void process_styles ();
|
||||
void start_sdt (int type);
|
||||
void end_sdt ();
|
||||
|
||||
void start_index_content();
|
||||
void end_index_content();
|
||||
|
||||
void start_index_element();
|
||||
void end_index_element();
|
||||
|
||||
void process_styles ();
|
||||
void process_fonts ();
|
||||
|
||||
void process_list_styles ();
|
||||
@ -624,6 +850,10 @@ public:
|
||||
void process_comments ();
|
||||
bool process_page_properties(std::wostream & strm);
|
||||
void process_section (std::wostream & strm, odf_reader::style_columns * columns = NULL);
|
||||
|
||||
int process_paragraph_attr (odf_reader::text::paragraph_attrs *attr);
|
||||
int process_text_attr (odf_reader::text::paragraph_attrs *Attr);
|
||||
void process_page_break_after(const odf_reader::style_instance *styleInst);
|
||||
|
||||
std::vector<odf_reader::_property> & get_settings_properties ();
|
||||
void set_settings_property (const odf_reader::_property & prop);
|
||||
@ -670,13 +900,14 @@ public:
|
||||
void start_list_item (bool restart = false);
|
||||
void end_list_item ();
|
||||
|
||||
void docx_serialize_list_properties(std::wostream & strm);
|
||||
void docx_serialize_paragraph_style(std::wostream & strm, const std::wstring & ParentId, bool in_styles = false);
|
||||
void serialize_list_properties(std::wostream & strm);
|
||||
void serialize_paragraph_style(std::wostream & strm, const std::wstring & ParentId, bool in_styles = false);
|
||||
|
||||
std::wstring find_list_rename(const std::wstring & ListStyleName) const;
|
||||
|
||||
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_; }
|
||||
@ -684,6 +915,10 @@ public:
|
||||
section_context & get_section_context() { return section_context_; }
|
||||
notes_context & get_notes_context() { return notes_context_; }
|
||||
text_tracked_context& get_text_tracked_context(){ return text_tracked_context_; }
|
||||
text_forms_context & get_forms_context() { return text_forms_context_; }
|
||||
tabs_context & get_tabs_context() { return tabs_context_;}
|
||||
|
||||
table_content_context & get_table_content_context() { return table_content_context_;}
|
||||
|
||||
void docx_convert_delayed ();
|
||||
void add_delayed_element (odf_reader::office_element * Elm);
|
||||
@ -714,9 +949,16 @@ public:
|
||||
void start_math_formula ();
|
||||
void end_math_formula ();
|
||||
|
||||
void start_text_changes (std::wstring id);
|
||||
void end_text_changes (std::wstring id);
|
||||
void start_text_changes (const std::wstring &id);
|
||||
void end_text_changes (const std::wstring &id);
|
||||
|
||||
void start_bookmark (const std::wstring &name);
|
||||
void end_bookmark (const std::wstring &name);
|
||||
|
||||
void start_alphabetical_index (const std::wstring &id);
|
||||
void end_alphabetical_index (const std::wstring &id);
|
||||
void add_alphabetical_index_text (odf_reader::office_element_ptr & elem);
|
||||
|
||||
void set_process_headers_footers(bool Val) { process_headers_footers_ = Val; }
|
||||
headers_footers & get_headers_footers() { return headers_footers_; }
|
||||
header_footer_context & get_header_footer_context() { return header_footer_context_; }
|
||||
@ -742,6 +984,7 @@ private:
|
||||
std::wstringstream footer_xml_;
|
||||
std::wstringstream header_xml_;
|
||||
std::wstringstream settings_xml_;
|
||||
std::wstringstream meta_xml_;
|
||||
|
||||
styles_context styles_context_;
|
||||
math_context math_context_;
|
||||
@ -753,12 +996,15 @@ private:
|
||||
header_footer_context header_footer_context_;
|
||||
notes_context notes_context_;
|
||||
text_tracked_context text_tracked_context_;
|
||||
text_forms_context text_forms_context_;
|
||||
tabs_context tabs_context_;
|
||||
table_content_context table_content_context_;
|
||||
|
||||
boost::shared_ptr<streams_man> streams_man_;
|
||||
|
||||
package::docx_document * output_document_;
|
||||
odf_reader::odf_document * odf_document_;
|
||||
CApplicationFonts * applicationFonts_;
|
||||
NSFonts::IApplicationFonts * applicationFonts_;
|
||||
|
||||
std::vector<odf_reader::_property> settings_properties_;
|
||||
|
||||
@ -779,6 +1025,7 @@ private:
|
||||
|
||||
bool in_automatic_style_;
|
||||
bool in_drawing_content_;
|
||||
bool in_table_content_;
|
||||
bool in_paragraph_;
|
||||
bool in_run_;
|
||||
bool in_header_;
|
||||
@ -786,17 +1033,23 @@ private:
|
||||
bool is_rtl_; // right-to-left
|
||||
bool is_paragraph_keep_;
|
||||
|
||||
std::wstring current_alphabetic_index_;
|
||||
int current_margin_left_;
|
||||
int new_list_style_number_; // счетчик для нумерации имен созданных в процессе конвертации стилей
|
||||
NoteType process_note_;
|
||||
|
||||
std::vector<odf_reader::office_element*> delayed_elements_;
|
||||
std::vector<odf_reader::office_element*> delayed_elements_;
|
||||
|
||||
std::vector< const odf_reader::style_text_properties*> text_properties_stack_;
|
||||
std::map<std::wstring, text_tracked_context::_state> map_current_changes_;
|
||||
boost::unordered_map<std::wstring, std::wstring> list_style_renames_;// цепочки переименований нумераций
|
||||
std::vector< const odf_reader::style_text_properties*> text_properties_stack_;
|
||||
std::map<std::wstring, text_tracked_context::_state> map_current_changes_;
|
||||
boost::unordered_map<std::wstring, std::wstring> list_style_renames_;// цепочки переименований нумераций
|
||||
|
||||
std::map<std::wstring, std::wstring> map_user_fields;
|
||||
std::map<std::wstring, std::wstring> map_user_fields;
|
||||
std::map<std::wstring, int> mapBookmarks;
|
||||
std::map<std::wstring, std::vector<odf_reader::office_element_ptr>> mapAlphabeticals;
|
||||
|
||||
std::vector<std::wstring> arBibliography;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "docx_drawing.h"
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
#include "../odf/datatypes/custom_shape_types_convert.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
@ -209,8 +209,8 @@ void docx_serialize_image_child(std::wostream & strm, _docx_drawing & val)
|
||||
CP_XML_NODE(L"pic:cNvPr")
|
||||
{
|
||||
//CP_XML_ATTR(L"desc text",L"");
|
||||
CP_XML_ATTR(L"id",val.id);
|
||||
CP_XML_ATTR(L"name",val.name);
|
||||
CP_XML_ATTR(L"id", val.id + 1);
|
||||
CP_XML_ATTR(L"name", val.name);
|
||||
}
|
||||
CP_XML_NODE(L"pic:cNvPicPr")
|
||||
{
|
||||
@ -316,7 +316,7 @@ void docx_serialize_common(std::wostream & strm, _docx_drawing & val)
|
||||
CP_XML_NODE(L"wp:docPr")
|
||||
{
|
||||
CP_XML_ATTR(L"name", val.name);
|
||||
CP_XML_ATTR(L"id", val.id + 1);
|
||||
CP_XML_ATTR(L"id", 0xf000 + val.id + 1);
|
||||
|
||||
oox_serialize_action(CP_XML_STREAM(), val.action);
|
||||
}
|
||||
@ -398,8 +398,8 @@ void docx_serialize_wps(std::wostream & strm, _docx_drawing & val)
|
||||
CP_XML_ATTR(L"cy", val.cy);
|
||||
}
|
||||
|
||||
serialize_null_extent(CP_XML_STREAM());
|
||||
}
|
||||
serialize_null_extent(CP_XML_STREAM());
|
||||
}
|
||||
else//anchor
|
||||
{
|
||||
@ -607,6 +607,42 @@ void docx_serialize_object(std::wostream & strm, _docx_drawing & val)
|
||||
}
|
||||
}
|
||||
|
||||
void docx_serialize_control(std::wostream & strm, _docx_drawing & val)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(L"w:pict")
|
||||
{
|
||||
CP_XML_NODE(L"v:shape")
|
||||
{
|
||||
CP_XML_ATTR(L"id", L"control_" + val.objectId);
|
||||
|
||||
std::wstring style_str; // = L"width:730.6pt; height:261.8pt";
|
||||
|
||||
style_str += L"width:" + boost::lexical_cast<std::wstring>(val.cx / 12700.) + L"pt;";
|
||||
style_str += L"height:" + boost::lexical_cast<std::wstring>(val.cy / 12700.) + L"pt;";
|
||||
|
||||
CP_XML_ATTR(L"style", style_str);
|
||||
|
||||
if (val.fill.bitmap)
|
||||
{
|
||||
CP_XML_NODE(L"v:imagedata")
|
||||
{
|
||||
CP_XML_ATTR(L"o:title", val.name);
|
||||
CP_XML_ATTR(L"r:id", val.fill.bitmap->rId);
|
||||
}
|
||||
}
|
||||
}
|
||||
CP_XML_NODE(L"w:control")
|
||||
{
|
||||
CP_XML_ATTR(L"w:name", val.name);
|
||||
CP_XML_ATTR(L"w:shapeid", L"control_" + val.objectId);
|
||||
CP_XML_ATTR(L"r:id", val.objectId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void _docx_drawing::serialize(std::wostream & strm/*, bool insideOtherDrawing*/)
|
||||
{
|
||||
if (type == typeUnknown) return;
|
||||
@ -619,6 +655,10 @@ void _docx_drawing::serialize(std::wostream & strm/*, bool insideOtherDrawing*/)
|
||||
{
|
||||
docx_serialize_object(strm, *this);
|
||||
}
|
||||
else if (type == typeControl)
|
||||
{
|
||||
docx_serialize_control(strm, *this);
|
||||
}
|
||||
else
|
||||
{
|
||||
//if (insideOtherDrawing)
|
||||
|
||||
@ -33,9 +33,9 @@
|
||||
|
||||
#include <iosfwd>
|
||||
#include <iostream>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/xml/attributes.h>
|
||||
#include <CPScopedPtr.h>
|
||||
#include <CPOptional.h>
|
||||
#include <xml/attributes.h>
|
||||
|
||||
#include "oox_drawing.h"
|
||||
#include "mediaitems.h"
|
||||
|
||||
@ -124,7 +124,7 @@ void word_files::write(const std::wstring & RootPath)
|
||||
charts_files_.set_main_document(get_main_document());
|
||||
charts_files_.write(path);
|
||||
}
|
||||
|
||||
|
||||
if (notes_)
|
||||
{
|
||||
notes_->write( path );
|
||||
@ -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)
|
||||
{
|
||||
@ -206,7 +207,50 @@ void word_files::set_comments(comments_context & commentsContext)
|
||||
elm->set_main_document( get_main_document() );
|
||||
comments_ = element_ptr( elm );
|
||||
}
|
||||
///////////////////
|
||||
void word_files::add_rels(relationship const & r)
|
||||
{
|
||||
rels_files_.add(r);
|
||||
|
||||
}
|
||||
//----------------------------------------------------------
|
||||
int customXml_files::add_customXml(customXml_content_ptr customXml)
|
||||
{
|
||||
customXmls_.push_back(customXml);
|
||||
return customXmls_.size();
|
||||
}
|
||||
|
||||
void customXml_files::write(const std::wstring & RootPath)
|
||||
{
|
||||
std::wstring path = RootPath + FILE_SEPARATOR_STR + L"customXml";
|
||||
NSDirectory::CreateDirectory(path.c_str());
|
||||
|
||||
std::wstring path_rels = path + FILE_SEPARATOR_STR + L"_rels";
|
||||
NSDirectory::CreateDirectory(path_rels.c_str());
|
||||
|
||||
for (size_t i = 0 ; i < customXmls_.size(); i++)
|
||||
{
|
||||
if (!customXmls_[i]) continue;
|
||||
|
||||
const std::wstring fileNameItem = std::wstring(L"item") + std::to_wstring(i+1) + L".xml";
|
||||
const std::wstring fileNameProps = std::wstring(L"itemProps") + std::to_wstring(i+1) + L".xml";
|
||||
|
||||
content_type_content * contentTypes = get_main_document()->get_content_types_file().content();
|
||||
contentTypes->add_override(std::wstring(L"/customXml/") + fileNameProps,
|
||||
L"application/vnd.openxmlformats-officedocument.customXmlProperties+xml");
|
||||
|
||||
package::simple_element(fileNameItem, customXmls_[i]->item()).write(path);
|
||||
package::simple_element(fileNameProps, customXmls_[i]->props()).write(path);
|
||||
|
||||
rels_file_ptr rels_file = rels_file::create(fileNameItem + L".rels");
|
||||
|
||||
rels_file->get_rels().add(relationship(L"rId1",
|
||||
L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",
|
||||
fileNameProps));
|
||||
|
||||
rels_file->write(path_rels);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------
|
||||
void docx_charts_files::add_chart(chart_content_ptr chart)
|
||||
{
|
||||
charts_.push_back(chart);
|
||||
@ -219,7 +263,7 @@ void docx_charts_files::write(const std::wstring & RootPath)
|
||||
|
||||
size_t count = 0;
|
||||
|
||||
for (int i = 0 ; i < charts_.size(); i++)
|
||||
for (size_t i = 0 ; i < charts_.size(); i++)
|
||||
{
|
||||
if (!charts_[i]) continue;
|
||||
|
||||
@ -433,8 +477,10 @@ void comments_elements::write(const std::wstring & RootPath)
|
||||
docx_document::docx_document()
|
||||
{
|
||||
this->set_main_document(this);
|
||||
word_files_.set_main_document(this);
|
||||
|
||||
word_files_.set_main_document(this);
|
||||
customXml_files_.set_main_document(this);
|
||||
|
||||
rels_file_ptr relFile = rels_file_ptr( new rels_file(L".rels") );
|
||||
relFile->get_rels().relationships().push_back(
|
||||
relationship(L"rId1", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties", L"docProps/app.xml" )
|
||||
@ -449,16 +495,18 @@ docx_document::docx_document()
|
||||
rels_files_.add_rel_file( relFile );
|
||||
|
||||
}
|
||||
|
||||
int docx_document::add_customXml(customXml_content_ptr customXml)
|
||||
{
|
||||
return customXml_files_.add_customXml(customXml);
|
||||
}
|
||||
void docx_document::write(const std::wstring & RootPath)
|
||||
{
|
||||
|
||||
if (word_files_.has_numbering())
|
||||
{
|
||||
content_type_file_.content()->get_override().push_back( override_content_type(L"/word/numbering.xml",
|
||||
L"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml") );
|
||||
}
|
||||
|
||||
customXml_files_.write (RootPath);
|
||||
word_files_.write (RootPath);
|
||||
rels_files_.write (RootPath);
|
||||
docProps_files_.write (RootPath);
|
||||
|
||||
@ -34,13 +34,13 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <CPSharedPtr.h>
|
||||
|
||||
#include "oox_rels.h"
|
||||
#include "docx_content_type.h"
|
||||
#include "oox_package.h"
|
||||
|
||||
class CApplicationFonts;
|
||||
#include "../../../DesktopEditor/graphics/pro/Fonts.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
@ -103,8 +103,17 @@ private:
|
||||
|
||||
};
|
||||
|
||||
// xl_charts_files
|
||||
class docx_charts_files : public element
|
||||
class customXml_files : public element
|
||||
{
|
||||
public:
|
||||
customXml_files(){}
|
||||
|
||||
int add_customXml(customXml_content_ptr customXml);
|
||||
virtual void write(const std::wstring & RootPath);
|
||||
|
||||
std::vector<customXml_content_ptr> customXmls_;
|
||||
};
|
||||
class docx_charts_files : public element
|
||||
{
|
||||
public:
|
||||
docx_charts_files(){}
|
||||
@ -130,13 +139,15 @@ 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);
|
||||
|
||||
void add_charts(chart_content_ptr chart);
|
||||
|
||||
void add_rels(relationship const & r);
|
||||
|
||||
private:
|
||||
docx_charts_files charts_files_;
|
||||
rels_files rels_files_;
|
||||
@ -165,11 +176,13 @@ public:
|
||||
word_files & get_word_files() { return word_files_; }
|
||||
virtual content_types_file & get_content_types_file() { return content_type_file_; }
|
||||
|
||||
virtual void write(const std::wstring & RootPath);
|
||||
void write(const std::wstring & RootPath);
|
||||
int add_customXml(customXml_content_ptr customXml);
|
||||
|
||||
private:
|
||||
docx_content_types_file content_type_file_;
|
||||
word_files word_files_;
|
||||
customXml_files customXml_files_;
|
||||
rels_files rels_files_;
|
||||
docProps_files docProps_files_;
|
||||
};
|
||||
|
||||
@ -33,16 +33,15 @@
|
||||
#include "docx_conversion_context.h"
|
||||
#include "logging.h"
|
||||
#include <iostream>
|
||||
#include <cpdoccore/odf/odf_document.h>
|
||||
#include <odf/odf_document.h>
|
||||
#include "../odf/odfcontext.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
/**/
|
||||
|
||||
docx_table_state::docx_table_state(docx_conversion_context & Context,
|
||||
const std::wstring & StyleName) : context_(Context),
|
||||
docx_table_state::docx_table_state(docx_conversion_context & Context, const std::wstring & StyleName) :
|
||||
context_(Context),
|
||||
table_style_(StyleName),
|
||||
current_table_column_(-1),
|
||||
columns_spanned_num_(0),
|
||||
@ -93,6 +92,19 @@ std::wstring docx_table_state::current_row_style() const
|
||||
return L"";
|
||||
}
|
||||
|
||||
double docx_table_state::get_current_cell_width()
|
||||
{
|
||||
if (current_table_column_ < columns_width_.size())
|
||||
return columns_width_[current_table_column_];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
void docx_table_state::add_column_width(double width)
|
||||
{
|
||||
columns_width_.push_back(width);
|
||||
}
|
||||
|
||||
void docx_table_state::start_cell()
|
||||
{
|
||||
current_table_column_++;
|
||||
@ -102,7 +114,6 @@ void docx_table_state::start_cell()
|
||||
|
||||
void docx_table_state::end_cell()
|
||||
{}
|
||||
|
||||
bool docx_table_state::start_covered_cell(docx_conversion_context & Context)
|
||||
{
|
||||
std::wostream & _Wostream = context_.output_stream();
|
||||
|
||||
@ -70,6 +70,8 @@ public:
|
||||
void set_rows_spanned(unsigned int Column, unsigned int Val, unsigned int ColumnsSpanned, const std::wstring & Style);
|
||||
unsigned int current_rows_spanned(unsigned int Column) const;
|
||||
|
||||
double get_current_cell_width();
|
||||
void add_column_width(double width);
|
||||
private:
|
||||
docx_conversion_context & context_;
|
||||
std::wstring table_style_;
|
||||
@ -81,7 +83,8 @@ private:
|
||||
std::vector<table_row_spanned> rows_spanned_;
|
||||
bool close_table_covered_cell_;
|
||||
std::vector<unsigned int> columns_;
|
||||
std::vector<std::wstring> columnsDefaultCellStyleName_;
|
||||
std::vector<double> columns_width_;
|
||||
std::vector<std::wstring> columnsDefaultCellStyleName_;
|
||||
|
||||
};
|
||||
|
||||
@ -135,6 +138,14 @@ public:
|
||||
{
|
||||
return table_states_.back().start_cell();
|
||||
}
|
||||
double get_current_cell_width()
|
||||
{
|
||||
return table_states_.back().get_current_cell_width();
|
||||
}
|
||||
void add_column_width(double width)
|
||||
{
|
||||
table_states_.back().add_column_width(width);
|
||||
}
|
||||
|
||||
void end_cell()
|
||||
{
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
#include "hyperlinks.h"
|
||||
#include "oox_rels.h"
|
||||
|
||||
#include <cpdoccore/xml/utils.h>
|
||||
#include <xml/utils.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
#include <cpdoccore/xml/utils.h>
|
||||
#include <xml/utils.h>
|
||||
|
||||
#include "../../Common/DocxFormat/Source/Base/Base.h"
|
||||
#include "../../Common/DocxFormat/Source/SystemUtility/File.h"
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
#include "oox_chart_axis.h"
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "oox_title.h"
|
||||
#include "oox_chart_shape.h"
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <CPOptional.h>
|
||||
#include <CPSharedPtr.h>
|
||||
|
||||
#include "oox_chart_shape.h"
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
#include <vector>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "oox_rels.h"
|
||||
#include "oox_chart_context.h"
|
||||
@ -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()
|
||||
{
|
||||
}
|
||||
|
||||
@ -32,10 +32,10 @@
|
||||
#pragma once
|
||||
#include "oox_package.h"
|
||||
|
||||
#include <cpdoccore/CPNoncopyable.h>
|
||||
#include <CPNoncopyable.h>
|
||||
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <CPScopedPtr.h>
|
||||
#include <CPSharedPtr.h>
|
||||
|
||||
#include "oox_title.h"
|
||||
#include "oox_plot_area.h"
|
||||
@ -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_;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user