mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-18 05:46:08 +08:00
Compare commits
63 Commits
core-linux
...
core-linux
| Author | SHA1 | Date | |
|---|---|---|---|
| b8215e9e82 | |||
| f6305fca21 | |||
| 87a9542fc7 | |||
| 48a1f01220 | |||
| 8a2923e534 | |||
| 0ab7e55add | |||
| cb1cb43a0b | |||
| 0ca3432d05 | |||
| 50208be48d | |||
| c796f4a0f6 | |||
| 618da3c8cc | |||
| 9b4568e81a | |||
| 752acf1e46 | |||
| d9afc49bb3 | |||
| 4c6ba8ed41 | |||
| a395420d59 | |||
| c4ca4b5613 | |||
| dd83971001 | |||
| b49e43c4cb | |||
| 50ae01723c | |||
| c05ea1bd21 | |||
| 887905570a | |||
| ce76a7b075 | |||
| 6dda731502 | |||
| a8bcd38bce | |||
| b470120075 | |||
| 0de5fb6bfc | |||
| 68122490bf | |||
| 4833c652d8 | |||
| af0e9be136 | |||
| d987233335 | |||
| 5f100d4ea0 | |||
| d4e34e244f | |||
| 4b8bc2c8e7 | |||
| b04f44ee2c | |||
| fb3b6aff47 | |||
| 531460e37d | |||
| 09407b08ba | |||
| 83bc1b18b6 | |||
| 56279f7465 | |||
| 566eeb06ae | |||
| 7dc6d70b8a | |||
| f5c359650f | |||
| d665d9449e | |||
| 3c93563027 | |||
| b525e1deb4 | |||
| d5b80e2fa3 | |||
| 2bc2039c01 | |||
| a0fdb1cbcc | |||
| 664007983d | |||
| a15aee3244 | |||
| 5e034e2877 | |||
| 8d77cdaf24 | |||
| e73b5c29b2 | |||
| 6a3b4d12a5 | |||
| 992e62b8c8 | |||
| 021e01af4e | |||
| 55a1a2ca59 | |||
| e644ef4062 | |||
| 45d51a0002 | |||
| 247f0a7d89 | |||
| 7c621a4a81 | |||
| 62ba68aaa8 |
@ -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;
|
||||
|
||||
|
||||
@ -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 );
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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 );
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -455,7 +455,7 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\UnicodeConverter\UnicodeConverter.cpp"
|
||||
RelativePath="..\..\build\lib\win_32\DEBUG\UnicodeConverter.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
||||
@ -69,7 +69,7 @@ namespace Writers
|
||||
{
|
||||
rewind(pFile);
|
||||
BYTE* pData = new BYTE[size];
|
||||
DWORD dwSizeRead = (DWORD)fread((void*)pData, 1, size, pFile);
|
||||
_UINT32 dwSizeRead = (_UINT32)fread((void*)pData, 1, size, pFile);
|
||||
if(dwSizeRead > 0)
|
||||
{
|
||||
std::wstring sNewImagePath = AddImageGetNewPath();
|
||||
|
||||
@ -314,7 +314,7 @@
|
||||
17E17ED41AC453F800BEA2EA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0900;
|
||||
LastUpgradeCheck = 0930;
|
||||
ORGANIZATIONNAME = "Ascensio System SIA";
|
||||
};
|
||||
buildConfigurationList = 17E17ED71AC453F800BEA2EA /* Build configuration list for PBXProject "ASCOfficeDocxFile2Lib" */;
|
||||
@ -446,12 +446,14 @@
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
@ -497,12 +499,14 @@
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
|
||||
@ -8,8 +8,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml_wrapper", "..\win32\cpx
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormatReaderLib", "..\win32\cpodf.vcproj", "{50E20601-4A8D-4AFB-8870-63828D328429}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{609ED938-3CA8-4BED-B363-25096D4C4812} = {609ED938-3CA8-4BED-B363-25096D4C4812}
|
||||
{94954A67-A853-43B1-A727-6EF2774C5A6A} = {94954A67-A853-43B1-A727-6EF2774C5A6A}
|
||||
{609ED938-3CA8-4BED-B363-25096D4C4812} = {609ED938-3CA8-4BED-B363-25096D4C4812}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfCommon", "..\win32\cpcommon.vcproj", "{609ED938-3CA8-4BED-B363-25096D4C4812}"
|
||||
@ -21,17 +21,18 @@ 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
|
||||
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C} = {C27E9A9F-3A17-4482-9C5F-BF15C01E747C}
|
||||
{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}
|
||||
{50E20601-4A8D-4AFB-8870-63828D328429} = {50E20601-4A8D-4AFB-8870-63828D328429}
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
|
||||
{94954A67-A853-43B1-A727-6EF2774C5A6A} = {94954A67-A853-43B1-A727-6EF2774C5A6A}
|
||||
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\..\DesktopEditor\graphics\graphics_vs2005.vcproj", "{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}"
|
||||
@ -48,20 +49,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "..\..\DesktopEd
|
||||
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}
|
||||
{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}
|
||||
{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}
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
|
||||
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470} = {818753F2-DBB9-4D3B-898A-A604309BE470}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jasper", "..\..\DesktopEditor\cximage\jasper\jasper_vs2005.vcproj", "{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}"
|
||||
@ -88,10 +89,21 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeUtilsLib", "..\..\Off
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml2", "..\..\DesktopEditor\xml\build\vs2005\libxml2.vcproj", "{21663823-DE45-479B-91D0-B4FEF4916EF0}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeFileCrypt", "..\..\OfficeCryptReader\win32\ECMACryptReader.vcproj", "{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF} = {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cryptlib", "..\..\Common\3dParty\cryptopp\cryptlib.vcproj", "{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
DLL-Import Debug|Win32 = DLL-Import Debug|Win32
|
||||
DLL-Import Debug|x64 = DLL-Import Debug|x64
|
||||
DLL-Import Release|Win32 = DLL-Import Release|Win32
|
||||
DLL-Import Release|x64 = DLL-Import Release|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
@ -100,6 +112,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 +128,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 +144,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 +160,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,6 +176,14 @@ 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
|
||||
@ -140,6 +192,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -148,6 +208,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -156,6 +224,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -164,6 +240,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -172,6 +256,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{BC52A07C-A797-423D-8C4F-8678805BBB36}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -180,6 +272,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -188,6 +288,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -196,6 +304,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{818753F2-DBB9-4D3B-898A-A604309BE470}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -204,6 +320,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -212,6 +336,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{40A69F40-063E-43FD-8543-455495D8733E}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -220,6 +352,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -228,6 +368,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{DF861D33-9BC1-418C-82B1-581F590FE169}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -236,6 +384,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{0588563C-F05C-428C-B21A-DD74756628B3}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -244,6 +400,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -252,6 +416,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -260,6 +432,14 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F8274B05-168E-4D6E-B843-AA7510725363}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{F8274B05-168E-4D6E-B843-AA7510725363}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{F8274B05-168E-4D6E-B843-AA7510725363}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{F8274B05-168E-4D6E-B843-AA7510725363}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{F8274B05-168E-4D6E-B843-AA7510725363}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{F8274B05-168E-4D6E-B843-AA7510725363}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{F8274B05-168E-4D6E-B843-AA7510725363}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
@ -268,10 +448,50 @@ Global
|
||||
{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}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.DLL-Import Debug|x64.Build.0 = Debug|x64
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.DLL-Import Release|Win32.Build.0 = Release|Win32
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.DLL-Import Release|x64.ActiveCfg = Release|x64
|
||||
{21663823-DE45-479B-91D0-B4FEF4916EF0}.DLL-Import Release|x64.Build.0 = Release|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
|
||||
|
||||
@ -77,6 +77,7 @@ HRESULT convert_single(std::wstring srcFileName)
|
||||
std::wstring outputDir = NSDirectory::GetFolderPath(dstPath);
|
||||
std::wstring dstTempPath = NSDirectory::CreateDirectoryWithUniqueName(outputDir);
|
||||
std::wstring srcTempPath;
|
||||
std::wstring srcTempPath2 = NSDirectory::CreateDirectoryWithUniqueName(outputDir);
|
||||
|
||||
if (fileChecker.nFileType == AVS_OFFICESTUDIO_FILE_DOCUMENT_ODT ||
|
||||
fileChecker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_ODS ||
|
||||
@ -96,12 +97,13 @@ HRESULT convert_single(std::wstring srcFileName)
|
||||
}
|
||||
_CP_LOG << L"[info] " << srcFileName << std::endl;
|
||||
|
||||
nResult = ConvertODF2OOXml(srcTempPath, dstTempPath, L"C:\\Windows\\Fonts", false, NULL);
|
||||
nResult = ConvertODF2OOXml(srcTempPath, dstTempPath, L"C:\\Windows\\Fonts", srcTempPath2, L"password", NULL);
|
||||
|
||||
if (srcTempPath != srcFileName)
|
||||
{
|
||||
NSDirectory::DeleteDirectory(srcTempPath);
|
||||
}
|
||||
NSDirectory::DeleteDirectory(srcTempPath2);
|
||||
|
||||
if (nResult == 0)
|
||||
{
|
||||
|
||||
@ -57,8 +57,8 @@ class odf_read_context;
|
||||
class odf_document
|
||||
{
|
||||
public:
|
||||
odf_document(const std::wstring & Folder, const ProgressCallback* CallBack);
|
||||
odf_document(xml::sax * Reader);
|
||||
odf_document(const std::wstring & SrcPath, const std::wstring & TempPath, const std::wstring& Password, const ProgressCallback* CallBack);
|
||||
odf_document(xml::sax * Reader, const std::wstring & TempPath);
|
||||
|
||||
~odf_document();
|
||||
|
||||
@ -68,10 +68,12 @@ public:
|
||||
bool xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
bool pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
const std::wstring & get_folder() const;
|
||||
const std::wstring & get_folder() const;
|
||||
const std::wstring & get_temp_folder() const;
|
||||
|
||||
int get_office_mime_type();
|
||||
bool get_encrypted();
|
||||
int get_office_mime_type();
|
||||
bool get_encrypted();
|
||||
bool get_error();
|
||||
|
||||
class Impl;
|
||||
Impl * get_impl() { return impl_.get(); }
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -274,7 +274,7 @@ void draw_object::add_child_element( xml::sax * Reader, const std::wstring & Ns,
|
||||
if CP_CHECK_NAME(L"office", L"document")
|
||||
{
|
||||
//embedded
|
||||
odf_document_ = odf_document_ptr( new odf_document(Reader));
|
||||
odf_document_ = odf_document_ptr( new odf_document(Reader, NSDirectory::GetTempPath()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1461,13 +1461,14 @@ void draw_object::docx_convert(oox::docx_conversion_context & Context)
|
||||
|
||||
if (!odf_document_ && !href.empty())
|
||||
{
|
||||
std::wstring tempPath = Context.root()->get_temp_folder();
|
||||
std::wstring folderPath = Context.root()->get_folder();
|
||||
std::wstring objectPath = folderPath + FILE_SEPARATOR_STR + href;
|
||||
|
||||
// normalize path ???? todooo
|
||||
XmlUtils::replace_all( objectPath, FILE_SEPARATOR_STR + std::wstring(L"./"), FILE_SEPARATOR_STR);
|
||||
|
||||
odf_document_ = odf_document_ptr(new odf_document(objectPath, NULL));
|
||||
odf_document_ = odf_document_ptr(new odf_document(objectPath, tempPath, L"", NULL));
|
||||
}
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
draw_frame* frame = NULL;
|
||||
|
||||
@ -261,13 +261,14 @@ void draw_object::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
|
||||
if (!odf_document_ && !href.empty())
|
||||
{
|
||||
std::wstring tempPath = Context.root()->get_temp_folder();
|
||||
std::wstring folderPath = Context.root()->get_folder();
|
||||
std::wstring objectPath = folderPath + FILE_SEPARATOR_STR + href;
|
||||
|
||||
// normalize path ???? todooo
|
||||
XmlUtils::replace_all( objectPath, FILE_SEPARATOR_STR + std::wstring(L"./"), FILE_SEPARATOR_STR);
|
||||
|
||||
odf_document_ = odf_document_ptr(new odf_document(objectPath, NULL));
|
||||
odf_document_ = odf_document_ptr(new odf_document(objectPath, tempPath, L"", NULL));
|
||||
}
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
office_element *contentSubDoc = odf_document_ ? odf_document_->get_impl()->get_content() : NULL;
|
||||
|
||||
@ -268,13 +268,14 @@ void draw_object::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
|
||||
if (!odf_document_ && !href.empty())
|
||||
{
|
||||
std::wstring tempPath = Context.root()->get_temp_folder();
|
||||
std::wstring folderPath = Context.root()->get_folder();
|
||||
std::wstring objectPath = folderPath + FILE_SEPARATOR_STR + href;
|
||||
|
||||
// normalize path ???? todooo
|
||||
XmlUtils::replace_all( objectPath, FILE_SEPARATOR_STR + std::wstring(L"./"), FILE_SEPARATOR_STR);
|
||||
|
||||
odf_document_ = odf_document_ptr(new odf_document(objectPath, NULL));
|
||||
odf_document_ = odf_document_ptr(new odf_document(objectPath, tempPath, L"", NULL));
|
||||
}
|
||||
office_element *contentSubDoc = odf_document_ ? odf_document_->get_impl()->get_content() : NULL;
|
||||
if (!contentSubDoc)
|
||||
|
||||
@ -38,9 +38,11 @@
|
||||
namespace cpdoccore {
|
||||
namespace odf_reader {
|
||||
|
||||
odf_document::odf_document(const std::wstring & Folder, const ProgressCallback* CallBack) : impl_(new Impl(Folder, CallBack))
|
||||
odf_document::odf_document(const std::wstring & SrcPath, const std::wstring & TempPath, const std::wstring & Password, const ProgressCallback* CallBack)
|
||||
: impl_(new Impl(SrcPath, TempPath, Password, CallBack))
|
||||
{}
|
||||
odf_document::odf_document( xml::sax * Reader) : impl_(new Impl(Reader))
|
||||
|
||||
odf_document::odf_document( xml::sax * Reader, const std::wstring & TempPath) : impl_(new Impl(Reader, TempPath))
|
||||
{}
|
||||
|
||||
odf_document::~odf_document()
|
||||
@ -70,6 +72,11 @@ const std::wstring & odf_document::get_folder() const
|
||||
return impl_->get_folder();
|
||||
}
|
||||
|
||||
const std::wstring & odf_document::get_temp_folder() const
|
||||
{
|
||||
return impl_->get_temp_folder();
|
||||
}
|
||||
|
||||
int odf_document::get_office_mime_type()
|
||||
{
|
||||
return impl_->get_office_mime_type();
|
||||
@ -78,6 +85,10 @@ bool odf_document::get_encrypted()
|
||||
{
|
||||
return impl_->get_encrypted();
|
||||
}
|
||||
bool odf_document::get_error()
|
||||
{
|
||||
return impl_->get_error();
|
||||
}
|
||||
bool odf_document::UpdateProgress(long Complete)
|
||||
{
|
||||
if (!impl_) return true;
|
||||
|
||||
@ -85,6 +85,8 @@
|
||||
|
||||
#include "../progressCallback.h"
|
||||
|
||||
#include "../../../OfficeCryptReader/source/CryptTransform.h"
|
||||
|
||||
#define PROGRESSEVENT_ID 0
|
||||
|
||||
namespace cpdoccore {
|
||||
@ -119,11 +121,12 @@ content_xml_t_ptr odf_document::Impl::read_file_content(const std::wstring & Pat
|
||||
|
||||
return result;
|
||||
}
|
||||
odf_document::Impl::Impl(xml::sax * Reader):
|
||||
context_(new odf_read_context()), base_folder_(L""), pCallBack(NULL), bUserStopConvert (0)
|
||||
odf_document::Impl::Impl(xml::sax * Reader, const std::wstring & tempPath):
|
||||
context_(new odf_read_context()), base_folder_(L""), pCallBack(NULL), bUserStopConvert (0), bError(false)
|
||||
{
|
||||
office_mime_type_ = 0;
|
||||
encrypted = false;
|
||||
|
||||
tmp_folder_original_ = tempPath;
|
||||
|
||||
content_xml_ = read_file_content(Reader);
|
||||
|
||||
@ -141,30 +144,59 @@ odf_document::Impl::Impl(xml::sax * Reader):
|
||||
_CP_LOG << L"[info] parse settings" << std::endl;
|
||||
parse_settings(content_xml_->get_content());
|
||||
|
||||
tmp_folder_ = NSDirectory::CreateDirectoryWithUniqueName(NSDirectory::GetTempPath());
|
||||
tmp_folder_ = NSDirectory::CreateDirectoryWithUniqueName(tempPath);
|
||||
}
|
||||
}
|
||||
|
||||
odf_document::Impl::Impl(const std::wstring & srcPath, const ProgressCallback* CallBack) :
|
||||
context_(new odf_read_context()), pCallBack(CallBack), bUserStopConvert (0)
|
||||
odf_document::Impl::Impl(const std::wstring & srcPath, const std::wstring & tempPath, const std::wstring & Password, const ProgressCallback* CallBack) :
|
||||
context_(new odf_read_context()), pCallBack(CallBack), bUserStopConvert (0), bError(false)
|
||||
{
|
||||
office_mime_type_ = 0;
|
||||
encrypted = false;
|
||||
|
||||
tmp_folder_original_ = tempPath;
|
||||
|
||||
if (NSDirectory::Exists(srcPath))
|
||||
{
|
||||
base_folder_ = srcPath;
|
||||
|
||||
std::wstring content_xml = srcPath + FILE_SEPARATOR_STR + L"content.xml";
|
||||
std::wstring styles_xml = srcPath + FILE_SEPARATOR_STR + L"styles.xml";
|
||||
std::wstring meta_xml = srcPath + FILE_SEPARATOR_STR + L"meta.xml";
|
||||
std::wstring settings_xml = srcPath + FILE_SEPARATOR_STR + L"settings.xml";
|
||||
std::wstring manifest_xml = srcPath + FILE_SEPARATOR_STR + L"META-INF" + FILE_SEPARATOR_STR + L"manifest.xml";
|
||||
std::wstring mimetype_xml = srcPath + FILE_SEPARATOR_STR + L"mimetype";
|
||||
|
||||
_CP_LOG << L"[info] read mimetype" << std::endl;
|
||||
NSFile::CFileBinary::ReadAllTextUtf8(mimetype_xml, mimetype_content_file_);
|
||||
|
||||
_CP_LOG << L"[info] read manifest.xml" << std::endl;
|
||||
manifest_xml_ = read_file_content(manifest_xml);
|
||||
|
||||
_CP_LOG << L"[info] parse manifest" << std::endl;
|
||||
parse_manifests(manifest_xml_ ? manifest_xml_->get_content() : NULL);
|
||||
|
||||
if (!office_mime_type_)
|
||||
{
|
||||
office_mime_type_ = GetMimetype(mimetype_content_file_);
|
||||
}
|
||||
|
||||
if (false == map_encryptions_.empty())
|
||||
{
|
||||
if (Password.empty()) return;
|
||||
|
||||
//decrypt files
|
||||
tmp_folder_ = NSDirectory::CreateDirectoryWithUniqueName(tempPath);
|
||||
|
||||
bError = !decrypt_folder(base_folder_, tmp_folder_);
|
||||
|
||||
if (bError)
|
||||
return;
|
||||
|
||||
base_folder_ = tmp_folder_;
|
||||
}
|
||||
|
||||
std::wstring content_xml = base_folder_ + FILE_SEPARATOR_STR + L"content.xml";
|
||||
std::wstring styles_xml = base_folder_ + FILE_SEPARATOR_STR + L"styles.xml";
|
||||
std::wstring meta_xml = base_folder_ + FILE_SEPARATOR_STR + L"meta.xml";
|
||||
std::wstring settings_xml = base_folder_ + FILE_SEPARATOR_STR + L"settings.xml";
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
_CP_LOG << L"[info] read settings.xml" << std::endl;
|
||||
settings_xml_ = read_file_content(settings_xml);
|
||||
|
||||
@ -174,8 +206,6 @@ odf_document::Impl::Impl(const std::wstring & srcPath, const ProgressCallback* C
|
||||
_CP_LOG << L"[info] read styles.xml" << std::endl;
|
||||
styles_xml_ = read_file_content(styles_xml);
|
||||
|
||||
_CP_LOG << L"[info] read mimetype" << std::endl;
|
||||
NSFile::CFileBinary::ReadAllTextUtf8(mimetype_xml, mimetype_content_file_);
|
||||
//----------------------------------------------------------------------------------------
|
||||
_CP_LOG << L"[info] parse fonts" << std::endl;
|
||||
parse_fonts(content_xml_ ? content_xml_->get_content() : NULL);
|
||||
@ -183,14 +213,6 @@ odf_document::Impl::Impl(const std::wstring & srcPath, const ProgressCallback* C
|
||||
_CP_LOG << L"[info] parse styles" << std::endl;
|
||||
parse_styles(styles_xml_ ? styles_xml_->get_content() : NULL);
|
||||
|
||||
_CP_LOG << L"[info] parse manifest" << std::endl;
|
||||
parse_manifests(manifest_xml_ ? manifest_xml_->get_content() : NULL);
|
||||
|
||||
if (!office_mime_type_)
|
||||
{
|
||||
office_mime_type_ = GetMimetype(mimetype_content_file_);
|
||||
}
|
||||
|
||||
_CP_LOG << L"[info] parse settings" << std::endl;
|
||||
parse_settings(settings_xml_ ? settings_xml_->get_content() : NULL);
|
||||
|
||||
@ -214,7 +236,7 @@ odf_document::Impl::Impl(const std::wstring & srcPath, const ProgressCallback* C
|
||||
_CP_LOG << L"[info] parse settings" << std::endl;
|
||||
parse_settings(content_xml_->get_content());
|
||||
|
||||
tmp_folder_ = NSDirectory::CreateDirectoryWithUniqueName(NSDirectory::GetTempPath());
|
||||
tmp_folder_ = NSDirectory::CreateDirectoryWithUniqueName(tempPath);
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,11 +247,135 @@ odf_document::Impl::~Impl()
|
||||
if (!tmp_folder_.empty())
|
||||
NSDirectory::DeleteDirectory(tmp_folder_);
|
||||
}
|
||||
|
||||
bool odf_document::Impl::decrypt_folder (const std::wstring & srcPath, const std::wstring & dstPath)
|
||||
{
|
||||
std::vector<std::wstring> arFiles = NSDirectory::GetFiles(srcPath, false);
|
||||
std::vector<std::wstring> arDirectories = NSDirectory::GetDirectories(srcPath);
|
||||
|
||||
bool result = true;
|
||||
for (size_t i = 0; i < arFiles.size(); ++i)
|
||||
{
|
||||
std::wstring sFileName = NSFile::GetFileName(arFiles[i]);
|
||||
|
||||
std::map<std::wstring, std::pair<office_element_ptr, int>>::iterator pFind = map_encryptions_.find(arFiles[i]);
|
||||
if ( pFind != map_encryptions_.end() )
|
||||
{
|
||||
result = decrypt_file(arFiles[i], dstPath + FILE_SEPARATOR_STR + sFileName, pFind->second.first, pFind->second.second);
|
||||
|
||||
if (false == result)
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
NSFile::CFileBinary::Copy(arFiles[i], dstPath + FILE_SEPARATOR_STR + sFileName);
|
||||
}
|
||||
}
|
||||
for (size_t i = 0; result && i < arDirectories.size(); ++i)
|
||||
{
|
||||
std::wstring sDirName = NSFile::GetFileName(arDirectories[i]);
|
||||
|
||||
NSDirectory::CreateDirectory(dstPath + FILE_SEPARATOR_STR + sDirName);
|
||||
|
||||
result = decrypt_folder(arDirectories[i], dstPath + FILE_SEPARATOR_STR + sDirName);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
std::string DecodeBase64(const std::wstring & value1)
|
||||
{
|
||||
int nLength = 0;
|
||||
unsigned char *pData = NULL;
|
||||
std::string result;
|
||||
|
||||
std::string value(value1.begin(), value1.end());
|
||||
|
||||
NSFile::CBase64Converter::Decode(value.c_str(), value.length(), pData, nLength);
|
||||
if (pData)
|
||||
{
|
||||
result = std::string((char*)pData, nLength);
|
||||
delete []pData; pData = NULL;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
bool odf_document::Impl::decrypt_file (const std::wstring & srcPath, const std::wstring & dstPath, office_element_ptr data, int size )
|
||||
{
|
||||
manifest_encryption_data* encryption_data = dynamic_cast<manifest_encryption_data*>(data.get());
|
||||
if (!encryption_data) return false;
|
||||
|
||||
//std::wstring checksum_;
|
||||
//std::wstring checksum_type_;
|
||||
|
||||
manifest_algorithm* algorithm = dynamic_cast<manifest_algorithm*>(encryption_data->algorithm_.get());
|
||||
manifest_key_derivation* key_derivation = dynamic_cast<manifest_key_derivation*>(encryption_data->key_derivation_.get());
|
||||
manifest_start_key_generation* start_key_generation = dynamic_cast<manifest_start_key_generation*>(encryption_data->start_key_generation_.get());
|
||||
|
||||
CRYPT::ODFDecryptor decryptor;
|
||||
CRYPT::_odfCryptData cryptData;
|
||||
|
||||
cryptData.saltValue = DecodeBase64(key_derivation->salt_);
|
||||
cryptData.saltSize = cryptData.saltValue.length();
|
||||
|
||||
cryptData.hashSize = start_key_generation->key_size_;
|
||||
|
||||
cryptData.checksumData = DecodeBase64(encryption_data->checksum_);
|
||||
cryptData.initializationVector = DecodeBase64(algorithm->initialisation_vector_);
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
cryptData.hashAlgorithm = CRYPT_METHOD::SHA256;
|
||||
cryptData.spinCount = key_derivation->iteration_count_;
|
||||
cryptData.cipherAlgorithm = CRYPT_METHOD::AES_CBC;
|
||||
cryptData.keySize = 256 /8;
|
||||
|
||||
decryptor.SetCryptData(cryptData);
|
||||
|
||||
if (!decryptor.SetPassword(L"password"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
bool result = false;
|
||||
|
||||
NSFile::CFileBinary file_inp;
|
||||
if (file_inp.OpenFile(srcPath))
|
||||
{
|
||||
_UINT64 lengthData, lengthRead = file_inp.GetFileSize();
|
||||
|
||||
unsigned char* data = new unsigned char[lengthRead];
|
||||
unsigned char* data_out = NULL;
|
||||
DWORD dwSizeRead = 0;
|
||||
|
||||
int readTrue = file_inp.ReadFile(data, lengthRead, dwSizeRead);
|
||||
int readData = readTrue - 8;
|
||||
|
||||
lengthData = *((_UINT64*)data);
|
||||
|
||||
decryptor.Decrypt(data + 8, readData, data_out, 0);//todoo сделать покусочное чтение декриптование
|
||||
|
||||
if (data_out)
|
||||
{
|
||||
NSFile::CFileBinary file_out;
|
||||
file_out.CreateFileW(dstPath);
|
||||
file_out.WriteFile(data_out, lengthData);
|
||||
file_out.CloseFile();
|
||||
|
||||
delete []data_out;
|
||||
result = true;
|
||||
}
|
||||
|
||||
delete []data;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
const std::wstring & odf_document::Impl::get_temp_folder() const
|
||||
{
|
||||
return tmp_folder_original_;
|
||||
}
|
||||
const std::wstring & odf_document::Impl::get_folder() const
|
||||
{
|
||||
if (!base_folder_.empty()) return base_folder_;
|
||||
else return tmp_folder_;
|
||||
}
|
||||
|
||||
bool odf_document::Impl::UpdateProgress(long nComplete)
|
||||
{
|
||||
if (pCallBack)
|
||||
@ -341,8 +487,16 @@ void odf_document::Impl::parse_manifests(office_element *element)
|
||||
|
||||
manifest_entry * entry = dynamic_cast<manifest_entry *>(elm.get());
|
||||
if (!entry)continue;
|
||||
|
||||
if (entry->encryption_data_)
|
||||
{
|
||||
std::wstring file_path = entry->full_path_;
|
||||
|
||||
if (entry->full_path_ == L"content.xml" && entry->encryption_) encrypted = true;
|
||||
XmlUtils::replace_all( file_path, L"/", FILE_SEPARATOR_STR);
|
||||
file_path = base_folder_ + FILE_SEPARATOR_STR + file_path;
|
||||
|
||||
map_encryptions_.insert(std::make_pair(file_path, std::make_pair(entry->encryption_data_, entry->size)));
|
||||
}
|
||||
|
||||
if (entry->full_path_ == L"/")
|
||||
{
|
||||
|
||||
@ -58,8 +58,9 @@ typedef shared_ptr<content_xml_t>::Type content_xml_t_ptr;
|
||||
class odf_document::Impl
|
||||
{
|
||||
public:
|
||||
Impl(const std::wstring & Folder, const ProgressCallback* CallBack);
|
||||
Impl(xml::sax * Reader);
|
||||
Impl(const std::wstring & SrcPath, const std::wstring & TempPath, const std::wstring & Password, const ProgressCallback* CallBack);
|
||||
|
||||
Impl(xml::sax * Reader, const std::wstring & TempPath);
|
||||
virtual ~Impl();
|
||||
|
||||
odf_read_context & odf_context();
|
||||
@ -72,19 +73,22 @@ public:
|
||||
bool pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
const std::wstring & get_folder() const;
|
||||
const std::wstring & get_temp_folder() const;
|
||||
|
||||
const office_element * get_content() const;
|
||||
office_element * get_content();
|
||||
|
||||
int get_office_mime_type() {return office_mime_type_;}
|
||||
|
||||
bool get_encrypted(){return encrypted;}
|
||||
bool get_encrypted() {return (false == map_encryptions_.empty());}
|
||||
bool get_error() {return bError;}
|
||||
|
||||
bool UpdateProgress(long Complete);
|
||||
|
||||
private:
|
||||
const ProgressCallback* pCallBack;
|
||||
short bUserStopConvert;
|
||||
bool bError;
|
||||
|
||||
odf_read_context_ptr context_;
|
||||
|
||||
@ -93,6 +97,9 @@ private:
|
||||
void parse_manifests(office_element *element);
|
||||
void parse_settings (office_element *element);
|
||||
|
||||
bool decrypt_folder (const std::wstring & srcPath, const std::wstring & dstPath);
|
||||
bool decrypt_file (const std::wstring & srcPath, const std::wstring & dstPath, office_element_ptr data, int size );
|
||||
|
||||
content_xml_t_ptr content_xml_;
|
||||
content_xml_t_ptr styles_xml_;
|
||||
content_xml_t_ptr meta_xml_;
|
||||
@ -103,11 +110,13 @@ private:
|
||||
|
||||
std::wstring base_folder_;
|
||||
std::wstring tmp_folder_;
|
||||
std::wstring tmp_folder_original_;
|
||||
|
||||
int office_mime_type_;
|
||||
bool encrypted;
|
||||
|
||||
int GetMimetype(std::wstring value);
|
||||
|
||||
std::map<std::wstring, std::pair<office_element_ptr, int>> map_encryptions_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -128,34 +128,83 @@ const wchar_t * office_document_settings::name = L"document-settings";
|
||||
|
||||
// manifest:manifest
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * manifest_manifest::ns = L"manifest";
|
||||
const wchar_t * manifest_manifest::ns = L"manifest";
|
||||
const wchar_t * manifest_manifest::name = L"manifest";
|
||||
|
||||
// manifest:file-entry
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * manifest_entry::ns = L"manifest";
|
||||
const wchar_t * manifest_entry::name = L"file-entry";
|
||||
const wchar_t * manifest_entry::ns = L"manifest";
|
||||
const wchar_t * manifest_entry::name = L"file-entry";
|
||||
|
||||
void manifest_entry::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
{
|
||||
CP_APPLY_ATTR(L"manifest:media-type", media_type_, std::wstring(L""));
|
||||
CP_APPLY_ATTR(L"manifest:full-path", full_path_, std::wstring(L""));
|
||||
CP_APPLY_ATTR(L"manifest:size", size, 0);
|
||||
}
|
||||
void manifest_entry::add_child_element(cpdoccore::xml::sax *Reader, const std::wstring &Ns, const std::wstring &Name)
|
||||
{
|
||||
if CP_CHECK_NAME(L"manifest", L"encryption-data")
|
||||
CP_CREATE_ELEMENT(encryption_);
|
||||
{
|
||||
CP_CREATE_ELEMENT(encryption_data_);
|
||||
}
|
||||
}
|
||||
// manifest:file-entry
|
||||
// manifest:encryption-data
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * manifest_encryption_data::ns = L"manifest";
|
||||
const wchar_t * manifest_encryption_data::name = L"encryption-data";
|
||||
|
||||
void manifest_encryption_data::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
{
|
||||
CP_APPLY_ATTR(L"manifest:checksum", manifest_checksum_, std::wstring(L""));
|
||||
CP_APPLY_ATTR(L"manifest:checksum-type", manifest_checksum_type_, std::wstring(L""));
|
||||
CP_APPLY_ATTR(L"manifest:checksum", checksum_, std::wstring(L""));
|
||||
CP_APPLY_ATTR(L"manifest:checksum-type", checksum_type_, std::wstring(L""));
|
||||
}
|
||||
void manifest_encryption_data::add_child_element(cpdoccore::xml::sax *Reader, const std::wstring &Ns, const std::wstring &Name)
|
||||
{
|
||||
if CP_CHECK_NAME(L"manifest", L"algorithm")
|
||||
{
|
||||
CP_CREATE_ELEMENT(algorithm_);
|
||||
}
|
||||
else if CP_CHECK_NAME(L"manifest", L"key-derivation")
|
||||
{
|
||||
CP_CREATE_ELEMENT(key_derivation_);
|
||||
}
|
||||
else if CP_CHECK_NAME(L"manifest", L"start-key-generation")
|
||||
{
|
||||
CP_CREATE_ELEMENT(start_key_generation_);
|
||||
}
|
||||
}
|
||||
// manifest:algorithm
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * manifest_algorithm::ns = L"manifest";
|
||||
const wchar_t * manifest_algorithm::name = L"algorithm";
|
||||
|
||||
void manifest_algorithm::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
{
|
||||
CP_APPLY_ATTR(L"manifest:algorithm-name", algorithm_name, std::wstring(L""));
|
||||
CP_APPLY_ATTR(L"manifest:initialisation-vector", initialisation_vector_, std::wstring(L""));
|
||||
}
|
||||
// manifest:key-derivation
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * manifest_key_derivation::ns = L"manifest";
|
||||
const wchar_t * manifest_key_derivation::name = L"key-derivation";
|
||||
|
||||
void manifest_key_derivation::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
{
|
||||
CP_APPLY_ATTR(L"manifest:key-derivation-name", key_derivation_name_, std::wstring(L""));
|
||||
CP_APPLY_ATTR(L"manifest:key-size", key_size_, 16);
|
||||
CP_APPLY_ATTR(L"manifest:iteration-count", iteration_count_, 100000);
|
||||
CP_APPLY_ATTR(L"manifest:salt", salt_, std::wstring(L""));
|
||||
}
|
||||
// manifest:start-key-generation
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * manifest_start_key_generation::ns = L"manifest";
|
||||
const wchar_t * manifest_start_key_generation::name = L"start-key-generation";
|
||||
|
||||
void manifest_start_key_generation::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
{
|
||||
CP_APPLY_ATTR(L"manifest:start-key-generation-name", start_key_generation_name_, std::wstring(L""));
|
||||
CP_APPLY_ATTR(L"manifest:key-size", key_size_, 20);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -200,21 +200,21 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
std::wstring media_type_;
|
||||
std::wstring full_path_;
|
||||
std::wstring media_type_;
|
||||
std::wstring full_path_;
|
||||
int size;
|
||||
|
||||
office_element_ptr encryption_;
|
||||
office_element_ptr encryption_data_;
|
||||
};
|
||||
|
||||
CP_REGISTER_OFFICE_ELEMENT2(manifest_entry);
|
||||
|
||||
|
||||
// manifest:encryption-data
|
||||
class manifest_encryption_data : public office_element
|
||||
{
|
||||
public:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_text(const std::wstring & Text){}
|
||||
|
||||
static const wchar_t * ns;
|
||||
@ -226,15 +226,83 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
std::wstring manifest_checksum_;
|
||||
std::wstring manifest_checksum_type_;
|
||||
std::wstring checksum_;
|
||||
std::wstring checksum_type_;
|
||||
|
||||
//childs
|
||||
//manifest:algorithm
|
||||
//manifest:key-derivation
|
||||
office_element_ptr algorithm_;
|
||||
office_element_ptr key_derivation_;
|
||||
office_element_ptr start_key_generation_;
|
||||
};
|
||||
|
||||
CP_REGISTER_OFFICE_ELEMENT2(manifest_encryption_data);
|
||||
|
||||
// manifest:algorithm
|
||||
class manifest_algorithm : public office_element
|
||||
{
|
||||
public:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_text(const std::wstring & Text){}
|
||||
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
static const ElementType type = typeManifestAlgorithm;
|
||||
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
std::wstring algorithm_name;
|
||||
std::wstring initialisation_vector_;
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(manifest_algorithm);
|
||||
|
||||
// manifest:key_derivation
|
||||
class manifest_key_derivation : public office_element
|
||||
{
|
||||
public:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_text(const std::wstring & Text){}
|
||||
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
static const ElementType type = typeManifestKeyDerivation;
|
||||
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
std::wstring key_derivation_name_;
|
||||
int key_size_;
|
||||
int iteration_count_;
|
||||
std::wstring salt_;
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(manifest_key_derivation);
|
||||
|
||||
// manifest:start-key-generation
|
||||
class manifest_start_key_generation : public office_element
|
||||
{
|
||||
public:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_text(const std::wstring & Text){}
|
||||
|
||||
static const wchar_t * ns;
|
||||
static const wchar_t * name;
|
||||
static const xml::NodeType xml_type = xml::typeElement;
|
||||
static const ElementType type = typeManifestStartKeyGeneration;
|
||||
|
||||
CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_;
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
std::wstring start_key_generation_name_;
|
||||
int key_size_;
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(manifest_start_key_generation);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -358,6 +358,10 @@ enum ElementType
|
||||
typeManifestEntry,
|
||||
typeManifestEncryptionData,
|
||||
|
||||
typeManifestAlgorithm,
|
||||
typeManifestStartKeyGeneration,
|
||||
typeManifestKeyDerivation,
|
||||
|
||||
typeOfficeSettings,
|
||||
typeOfficeSettingsConfigItemSet,
|
||||
typeOfficeSettingsConfigItem,
|
||||
|
||||
@ -60,7 +60,7 @@ void _mediaitems::add_or_find(const std::wstring & oox_ref, Type type, std::wst
|
||||
{
|
||||
std::wstring output_sub_path;
|
||||
std::wstring output_fileName;
|
||||
int number=0;
|
||||
size_t number = 0;
|
||||
|
||||
if (type == typeImage)
|
||||
{
|
||||
|
||||
@ -1101,7 +1101,7 @@ void odf_drawing_context::end_frame()
|
||||
/////////////////////
|
||||
void odf_drawing_context::start_element(office_element_ptr elm, office_element_ptr style_elm)
|
||||
{
|
||||
int level = (int)impl_->current_level_.size();
|
||||
size_t level = impl_->current_level_.size();
|
||||
|
||||
if (impl_->current_level_.size() > 0 && elm)
|
||||
impl_->current_level_.back()->add_child_element(elm);
|
||||
|
||||
@ -490,7 +490,7 @@ void odf_lists_styles_context::set_numeric_format(std::wstring val)
|
||||
}
|
||||
if (r1 < 0) return;//??
|
||||
|
||||
r1 = s.find(L"%", 1);
|
||||
r1 = (int)s.find(L"%", 1);
|
||||
if (r1 >0)
|
||||
{
|
||||
int level = 0;
|
||||
@ -498,7 +498,7 @@ void odf_lists_styles_context::set_numeric_format(std::wstring val)
|
||||
int r2=0;
|
||||
while (r2 < s.length())
|
||||
{
|
||||
r2 = s.find(L"%", r2);
|
||||
r2 = (int)s.find(L"%", r2);
|
||||
if (r2 >=0) level++;
|
||||
else break;
|
||||
r2++;
|
||||
|
||||
@ -545,9 +545,9 @@ void odf_number_styles_context::create_currency_style(number_format_state & stat
|
||||
{
|
||||
create_element(L"number", L"currency-style", root_elm, odf_context_);
|
||||
{
|
||||
int res1 = state.format_code[0].rfind(L"]");
|
||||
int res2 = state.format_code[0].rfind(L"#");
|
||||
int res3 = state.format_code[0].rfind(L"0");
|
||||
int res1 = (int)state.format_code[0].rfind(L"]");
|
||||
int res2 = (int)state.format_code[0].rfind(L"#");
|
||||
int res3 = (int)state.format_code[0].rfind(L"0");
|
||||
|
||||
office_element_ptr elm_symbol;
|
||||
create_element(L"number", L"currency-symbol", elm_symbol, odf_context_);
|
||||
|
||||
@ -135,7 +135,7 @@ void odf_master_state::add_header(office_element_ptr & elm)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
odf_layout_state::odf_layout_state(office_element_ptr & layout_elm )
|
||||
{
|
||||
int level =0;
|
||||
size_t level = 0;
|
||||
odf_element_state state = {layout_elm,L"",office_element_ptr(),level};
|
||||
|
||||
elements_.push_back(state);
|
||||
|
||||
@ -517,7 +517,7 @@ void odf_table_context::set_cell_row_span_restart()
|
||||
int col = impl_->current_table().current_column-1;
|
||||
odf_column_state & state = impl_->current_table().columns[col];
|
||||
|
||||
int sz = state.spanned_row_cell.size();
|
||||
size_t sz = state.spanned_row_cell.size();
|
||||
|
||||
if (sz > 1)
|
||||
{
|
||||
|
||||
@ -400,11 +400,11 @@ bool ods_table_state::is_cell_comment()
|
||||
|
||||
int ods_table_state::is_cell_hyperlink(int col, int row)
|
||||
{
|
||||
for (size_t i=0; i < hyperlinks_.size();i++)
|
||||
for (size_t i = 0; i < hyperlinks_.size(); i++)
|
||||
{
|
||||
if (hyperlinks_[i].col == col && hyperlinks_[i].row == row)
|
||||
{
|
||||
return i;
|
||||
return (int)i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
@ -415,7 +415,7 @@ int ods_table_state::is_cell_comment(int col, int row, short repeate_col)
|
||||
{
|
||||
if ((comments_[i].col < col + repeate_col && comments_[i].col >= col) && comments_[i].row == row)
|
||||
{
|
||||
return i;
|
||||
return (int)i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
|
||||
@ -200,7 +200,7 @@ void odt_conversion_context::add_text_content(const std::wstring & text)
|
||||
{
|
||||
if (drop_cap_state_.enabled)
|
||||
{
|
||||
int count = text.length();
|
||||
size_t count = text.length();
|
||||
drop_cap_state_.characters += count;
|
||||
|
||||
style_text_properties * props = text_context()->get_text_properties();
|
||||
@ -984,7 +984,7 @@ void odt_conversion_context::start_drop_cap(style_paragraph_properties *paragrap
|
||||
create_element(L"style", L"drop-cap", drop_cap_state_.paragraph_properties->content_.style_drop_cap_, this);
|
||||
}
|
||||
|
||||
void odt_conversion_context::set_drop_cap_lines(int lines)
|
||||
void odt_conversion_context::set_drop_cap_lines(size_t lines)
|
||||
{
|
||||
if (!drop_cap_state_.enabled) return;
|
||||
if (!drop_cap_state_.paragraph_properties) return;
|
||||
|
||||
@ -110,7 +110,7 @@ public:
|
||||
void set_master_page_name(std::wstring master_name);
|
||||
|
||||
void start_drop_cap (style_paragraph_properties * paragraph_properties);
|
||||
void set_drop_cap_lines (int lines);
|
||||
void set_drop_cap_lines (size_t lines);
|
||||
void set_drop_cap_margin(bool val);
|
||||
void end_drop_cap ();
|
||||
bool in_drop_cap () {return drop_cap_state_.enabled;}
|
||||
@ -221,8 +221,8 @@ private:
|
||||
style_paragraph_properties *paragraph_properties = NULL;
|
||||
office_element_ptr text_properties;
|
||||
|
||||
int lines = 0;
|
||||
int characters = 0;
|
||||
size_t lines = 0;
|
||||
size_t characters = 0;
|
||||
bool inline_style = false;
|
||||
double characters_size_pt = 0;
|
||||
}drop_cap_state_;
|
||||
|
||||
@ -66,10 +66,10 @@ public:
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
text_text(const std::wstring & Text) : text_(Text) {};
|
||||
text_text() {};
|
||||
text_text(const std::wstring & Text) : text_(Text) {}
|
||||
text_text() {}
|
||||
|
||||
std::wstring & attr_text() { return text_; };
|
||||
std::wstring & attr_text() { return text_; }
|
||||
|
||||
virtual void add_text(const std::wstring & Text);
|
||||
|
||||
@ -263,7 +263,7 @@ public:
|
||||
|
||||
public:
|
||||
text_reference_mark_start() {}
|
||||
text_reference_mark_start(const std::wstring & Name) : text_name_(Name){};
|
||||
text_reference_mark_start(const std::wstring & Name) : text_name_(Name){}
|
||||
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name){}
|
||||
virtual void add_child_element( const office_element_ptr & child_element){}
|
||||
|
||||
@ -1267,11 +1267,58 @@ void DocxConverter::convert(OOX::Logic::CParagraphProperty *oox_paragraph_pr, cp
|
||||
}
|
||||
if (oox_paragraph_pr->m_oShd.IsInit())
|
||||
{
|
||||
_CP_OPT(odf_types::color) odf_color;
|
||||
convert(oox_paragraph_pr->m_oShd->m_oFill.GetPointer(), oox_paragraph_pr->m_oShd->m_oThemeFill.GetPointer(),
|
||||
oox_paragraph_pr->m_oShd->m_oThemeFillTint.GetPointer(), oox_paragraph_pr->m_oShd->m_oThemeShade.GetPointer(), odf_color);
|
||||
if (odf_color)
|
||||
paragraph_properties->content_.fo_background_color_ = *odf_color;
|
||||
int type_shading = 100; //solid
|
||||
if (oox_paragraph_pr->m_oShd->m_oVal.IsInit())
|
||||
{
|
||||
switch(oox_paragraph_pr->m_oShd->m_oVal->GetValue())
|
||||
{
|
||||
case SimpleTypes::shdClear : type_shading = 0; break;
|
||||
case SimpleTypes::shdNil : type_shading = 0; break;
|
||||
case SimpleTypes::shdPct10 : type_shading = 10; break;;
|
||||
case SimpleTypes::shdPct12 : type_shading = 12; break;
|
||||
case SimpleTypes::shdPct15 : type_shading = 15; break;
|
||||
case SimpleTypes::shdPct20 : type_shading = 20; break;
|
||||
case SimpleTypes::shdPct25 : type_shading = 25; break;
|
||||
case SimpleTypes::shdPct30 : type_shading = 30; break;
|
||||
case SimpleTypes::shdPct35 : type_shading = 35; break;
|
||||
case SimpleTypes::shdPct37 : type_shading = 37; break;
|
||||
case SimpleTypes::shdPct40 : type_shading = 40; break;
|
||||
case SimpleTypes::shdPct45 : type_shading = 45; break;
|
||||
case SimpleTypes::shdPct5 : type_shading = 5; break;
|
||||
case SimpleTypes::shdPct55 : type_shading = 55; break;
|
||||
case SimpleTypes::shdPct60 : type_shading = 60; break;
|
||||
case SimpleTypes::shdPct62 : type_shading = 62; break;
|
||||
case SimpleTypes::shdPct65 : type_shading = 65; break;
|
||||
case SimpleTypes::shdPct70 : type_shading = 70; break;
|
||||
case SimpleTypes::shdPct75 : type_shading = 75; break;
|
||||
case SimpleTypes::shdPct80 : type_shading = 80; break;
|
||||
case SimpleTypes::shdPct85 : type_shading = 85; break;
|
||||
case SimpleTypes::shdPct87 : type_shading = 87; break;
|
||||
case SimpleTypes::shdPct90 : type_shading = 90; break;
|
||||
case SimpleTypes::shdPct95 : type_shading = 95; break;
|
||||
case SimpleTypes::shdSolid : type_shading = 100;break;
|
||||
//case SimpleTypes::shdDiagCross : type_shading = 2; break;
|
||||
//case SimpleTypes::shdDiagStripe : type_shading = 3; break;
|
||||
//case SimpleTypes::shdHorzCross : type_shading = 4; break;
|
||||
//case SimpleTypes::shdHorzStripe : type_shading = 6; break;
|
||||
//case SimpleTypes::shdReverseDiagStripe : type_shading = 7; break;
|
||||
//case SimpleTypes::shdThinDiagCross : type_shading = 8; break;
|
||||
//case SimpleTypes::shdThinDiagStripe : type_shading = 9; break;
|
||||
//case SimpleTypes::shdThinHorzCross : type_shading = 10; break;
|
||||
//case SimpleTypes::shdThinHorzStripe : type_shading = 11; break;
|
||||
//case SimpleTypes::shdThinReverseDiagStripe : type_shading = 12; break;
|
||||
//case SimpleTypes::shdThinVertStripe : type_shading = 13; break;
|
||||
//case SimpleTypes::shdVertStripe : type_shading = 14; break;
|
||||
}
|
||||
}
|
||||
if (type_shading != 0)
|
||||
{
|
||||
_CP_OPT(odf_types::color) odf_color;
|
||||
convert(oox_paragraph_pr->m_oShd->m_oFill.GetPointer(), oox_paragraph_pr->m_oShd->m_oThemeFill.GetPointer(),
|
||||
oox_paragraph_pr->m_oShd->m_oThemeFillTint.GetPointer(), oox_paragraph_pr->m_oShd->m_oThemeShade.GetPointer(), odf_color);
|
||||
if (odf_color)
|
||||
paragraph_properties->content_.fo_background_color_ = *odf_color;
|
||||
}
|
||||
}
|
||||
if (oox_paragraph_pr->m_oTextDirection.IsInit() && oox_paragraph_pr->m_oTextDirection->m_oVal.IsInit())
|
||||
{
|
||||
|
||||
@ -175,6 +175,7 @@ SOURCES += \
|
||||
../Reader/SlidePersist.cpp \
|
||||
../Records/Animations/AnimationTypes.cpp \
|
||||
../Records/Drawing/ArtBlip.cpp \
|
||||
../Records/Drawing/ShapeContainer.cpp \
|
||||
../PPTXWriter/Converter.cpp \
|
||||
../PPTXWriter/ShapeWriter.cpp
|
||||
}
|
||||
|
||||
@ -37,6 +37,6 @@
|
||||
#include "../Reader/SlidePersist.cpp"
|
||||
#include "../Records/Animations/AnimationTypes.cpp"
|
||||
#include "../Records/Drawing/ArtBlip.cpp"
|
||||
|
||||
#include "../Records/Drawing/ShapeContainer.cpp"
|
||||
#include "../PPTXWriter/Converter.cpp"
|
||||
#include "../PPTXWriter/ShapeWriter.cpp"
|
||||
|
||||
@ -89,9 +89,6 @@ void NSPresentationEditor::CPPTXWriter::CreateFile(CPPTUserInfo* pUserInfo )
|
||||
|
||||
m_pDocument = dynamic_cast<CDocument*>(pUserInfo);
|
||||
|
||||
m_pDocument->m_oInfo.m_lUnitsHor = 36000 * m_pDocument->m_oInfo.m_lMillimetresHor;
|
||||
m_pDocument->m_oInfo.m_lUnitsVer = 36000 * m_pDocument->m_oInfo.m_lMillimetresVer;
|
||||
|
||||
m_oManager.Clear();
|
||||
m_oManager.SetDstMedia(m_strTempDirectory + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("media") + FILE_SEPARATOR_STR);
|
||||
|
||||
@ -235,7 +232,7 @@ void NSPresentationEditor::CPPTXWriter::WriteContentTypes()
|
||||
L".xml\" ContentType=\"application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml\"/>";
|
||||
|
||||
|
||||
for (size_t nL = 0; nL < m_pDocument->m_arThemes[nT].m_arLayouts.size(); nL++, nIndexLayout++)
|
||||
for (size_t nL = 0; nL < m_pDocument->m_arThemes[nT]->m_arLayouts.size(); nL++, nIndexLayout++)
|
||||
{
|
||||
strContentTypes += L"<Override PartName=\"/ppt/slideLayouts/slideLayout" + std::to_wstring(nIndexLayout) +
|
||||
L".xml\" ContentType=\"application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml\"/>";
|
||||
@ -284,116 +281,129 @@ void NSPresentationEditor::CPPTXWriter::WriteApp(CFile& oFile)
|
||||
CP_XML_NODE(L"Properties")
|
||||
{
|
||||
CP_XML_ATTR(L"xmlns", L"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties");
|
||||
CP_XML_ATTR(L"xmlns:vt", L"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypess");
|
||||
}
|
||||
CP_XML_NODE(L"Application")
|
||||
{
|
||||
CP_XML_STREAM() << 0;
|
||||
}
|
||||
#if defined(INTVER)
|
||||
CP_XML_NODE(L"AppVersion")
|
||||
{
|
||||
std::string s = VALUE2STR(INTVER);
|
||||
CP_XML_STREAM() << std::wstring(s.begin(), s.end());
|
||||
}
|
||||
#endif
|
||||
CP_XML_NODE(L"TotalTime")
|
||||
{
|
||||
CP_XML_STREAM() << 0;
|
||||
}
|
||||
CP_XML_NODE(L"Words")
|
||||
{
|
||||
CP_XML_STREAM() << 0;
|
||||
}
|
||||
CP_XML_NODE(L"PresentationFormat")
|
||||
{
|
||||
CP_XML_STREAM() << L"On-screen Show (4:3)";
|
||||
}
|
||||
CP_XML_NODE(L"Paragraphs")
|
||||
{
|
||||
CP_XML_STREAM() << 0;
|
||||
}
|
||||
CP_XML_NODE(L"Slides")
|
||||
{
|
||||
CP_XML_STREAM() << m_pDocument->m_arSlides.size();
|
||||
}
|
||||
CP_XML_NODE(L"Notes")
|
||||
{
|
||||
CP_XML_STREAM() << m_pDocument->m_arNotes.size();
|
||||
}
|
||||
CP_XML_NODE(L"HiddenSlides")
|
||||
{
|
||||
CP_XML_STREAM() << 0;
|
||||
}
|
||||
CP_XML_NODE(L"MMClips")
|
||||
{
|
||||
CP_XML_STREAM() << 2;
|
||||
}
|
||||
CP_XML_NODE(L"ScaleCrop")
|
||||
{
|
||||
CP_XML_STREAM() << L"false";
|
||||
}
|
||||
CP_XML_NODE(L"HeadingPairs")
|
||||
{
|
||||
CP_XML_NODE(L"vt:vector")
|
||||
{
|
||||
CP_XML_ATTR(L"size", 4);
|
||||
CP_XML_ATTR(L"baseType", L"variant");
|
||||
|
||||
CP_XML_NODE(L"vt:variant")
|
||||
{
|
||||
CP_XML_ATTR(L"vt:lpstr", L"Theme");
|
||||
}
|
||||
CP_XML_NODE(L"vt:variant")
|
||||
{
|
||||
CP_XML_ATTR(L"vt:i4", m_pDocument->m_arThemes.size());
|
||||
}
|
||||
CP_XML_NODE(L"vt:variant")
|
||||
{
|
||||
CP_XML_ATTR(L"vt:lpstr", L"Slide Titles");
|
||||
}
|
||||
CP_XML_NODE(L"vt:variant")
|
||||
{
|
||||
CP_XML_ATTR(L"vt:i4", m_pDocument->m_arSlides.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
CP_XML_NODE(L"TitlesOfParts")
|
||||
{
|
||||
CP_XML_NODE(L"vt:vector")
|
||||
{
|
||||
CP_XML_ATTR(L"size", m_pDocument->m_arSlides.size() + m_pDocument->m_arThemes.size());
|
||||
CP_XML_ATTR(L"baseType", L"lpstr");
|
||||
CP_XML_ATTR(L"xmlns:vt", L"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes");
|
||||
|
||||
for (size_t i = 1; i <= m_pDocument->m_arThemes.size(); ++i)
|
||||
CP_XML_NODE(L"TotalTime")
|
||||
{
|
||||
CP_XML_STREAM() << 0;
|
||||
}
|
||||
CP_XML_NODE(L"Words")
|
||||
{
|
||||
CP_XML_STREAM() << 0;
|
||||
}
|
||||
std::wstring sApplication = L"ONLYOFFICE";
|
||||
#if defined(INTVER)
|
||||
std::string s = VALUE2STR(INTVER);
|
||||
sApplication += L"/" + std::wstring(s.begin(), s.end());
|
||||
#endif
|
||||
CP_XML_NODE(L"Application")
|
||||
{
|
||||
CP_XML_STREAM() << sApplication;
|
||||
}
|
||||
//CP_XML_NODE(L"AppVersion")
|
||||
//{
|
||||
// CP_XML_STREAM() << L"1.0";
|
||||
//}
|
||||
CP_XML_NODE(L"Paragraphs")
|
||||
{
|
||||
CP_XML_STREAM() << 0;
|
||||
}
|
||||
CP_XML_NODE(L"PresentationFormat")
|
||||
{
|
||||
CP_XML_STREAM() << L"On-screen Show (4:3)";
|
||||
}
|
||||
CP_XML_NODE(L"Slides")
|
||||
{
|
||||
CP_XML_STREAM() << m_pDocument->m_arSlides.size();
|
||||
}
|
||||
CP_XML_NODE(L"Notes")
|
||||
{
|
||||
CP_XML_STREAM() << m_pDocument->m_arNotes.size();
|
||||
}
|
||||
CP_XML_NODE(L"HiddenSlides")
|
||||
{
|
||||
CP_XML_STREAM() << 0;
|
||||
}
|
||||
CP_XML_NODE(L"MMClips")
|
||||
{
|
||||
CP_XML_STREAM() << 0;
|
||||
}
|
||||
CP_XML_NODE(L"ScaleCrop")
|
||||
{
|
||||
CP_XML_STREAM() << L"false";
|
||||
}
|
||||
CP_XML_NODE(L"HeadingPairs")
|
||||
{
|
||||
CP_XML_NODE(L"vt:vector")
|
||||
{
|
||||
CP_XML_NODE(L"vt:lpstr")
|
||||
CP_XML_ATTR(L"size", 4);
|
||||
CP_XML_ATTR(L"baseType", L"variant");
|
||||
|
||||
CP_XML_NODE(L"vt:variant")
|
||||
{
|
||||
CP_XML_STREAM() << L"Theme " << i;
|
||||
}
|
||||
}
|
||||
for (size_t i = 1; i <= m_pDocument->m_arSlides.size(); ++i)
|
||||
{
|
||||
CP_XML_NODE(L"vt:lpstr")
|
||||
CP_XML_NODE(L"vt:lpstr")
|
||||
{
|
||||
CP_XML_STREAM() << L"Theme";
|
||||
}
|
||||
}
|
||||
CP_XML_NODE(L"vt:variant")
|
||||
{
|
||||
CP_XML_STREAM() << L"Slide " << i;
|
||||
CP_XML_NODE(L"vt:i4")
|
||||
{
|
||||
CP_XML_STREAM() << m_pDocument->m_arThemes.size();
|
||||
}
|
||||
}
|
||||
CP_XML_NODE(L"vt:variant")
|
||||
{
|
||||
CP_XML_NODE(L"vt:lpstr")
|
||||
{
|
||||
CP_XML_STREAM() << L"Slide Titles";
|
||||
}
|
||||
}
|
||||
CP_XML_NODE(L"vt:variant")
|
||||
{
|
||||
CP_XML_NODE(L"vt:i4")
|
||||
CP_XML_STREAM() << m_pDocument->m_arSlides.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
CP_XML_NODE(L"TitlesOfParts")
|
||||
{
|
||||
CP_XML_NODE(L"vt:vector")
|
||||
{
|
||||
CP_XML_ATTR(L"size", m_pDocument->m_arSlides.size() + m_pDocument->m_arThemes.size());
|
||||
CP_XML_ATTR(L"baseType", L"lpstr");
|
||||
|
||||
CP_XML_NODE(L"Company");
|
||||
CP_XML_NODE(L"LinksUpToDate")
|
||||
{
|
||||
CP_XML_STREAM() << L"false";
|
||||
}
|
||||
CP_XML_NODE(L"SharedDoc")
|
||||
{
|
||||
CP_XML_STREAM() << L"false";
|
||||
}
|
||||
CP_XML_NODE(L"HyperlinksChanged")
|
||||
{
|
||||
CP_XML_STREAM() << L"false";
|
||||
for (size_t i = 1; i <= m_pDocument->m_arThemes.size(); ++i)
|
||||
{
|
||||
CP_XML_NODE(L"vt:lpstr")
|
||||
{
|
||||
CP_XML_STREAM() << L"Theme " << i;
|
||||
}
|
||||
}
|
||||
for (size_t i = 1; i <= m_pDocument->m_arSlides.size(); ++i)
|
||||
{
|
||||
CP_XML_NODE(L"vt:lpstr")
|
||||
{
|
||||
CP_XML_STREAM() << L"Slide " << i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//CP_XML_NODE(L"Company");
|
||||
CP_XML_NODE(L"LinksUpToDate")
|
||||
{
|
||||
CP_XML_STREAM() << L"false";
|
||||
}
|
||||
CP_XML_NODE(L"SharedDoc")
|
||||
{
|
||||
CP_XML_STREAM() << L"false";
|
||||
}
|
||||
CP_XML_NODE(L"HyperlinksChanged")
|
||||
{
|
||||
CP_XML_STREAM() << L"false";
|
||||
}
|
||||
}
|
||||
}
|
||||
oFile.WriteStringUTF8(L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
|
||||
@ -454,7 +464,7 @@ void NSPresentationEditor::CPPTXWriter::WritePresInfo()
|
||||
|
||||
strPresMasters += L"<p:sldMasterId id=\"" + std::to_wstring(0x80000000 + nCountLayouts) + L"\" r:id=\"rId" + std::to_wstring(2 * nIndexTheme + 1) + L"\"/>";
|
||||
|
||||
nCountLayouts += m_pDocument->m_arThemes[nIndexTheme].m_arLayouts.size();
|
||||
nCountLayouts += m_pDocument->m_arThemes[nIndexTheme]->m_arLayouts.size();
|
||||
nCountLayouts += 1;
|
||||
}
|
||||
|
||||
@ -504,16 +514,16 @@ void NSPresentationEditor::CPPTXWriter::WritePresInfo()
|
||||
oFile.WriteStringUTF8(strPresRels);
|
||||
oFile.CloseFile();
|
||||
|
||||
std::wstring strSizePres = L"<p:sldSz cx=\"" + std::to_wstring(m_pDocument->m_oInfo.m_lUnitsHor) +
|
||||
L"\" cy=\"" + std::to_wstring(m_pDocument->m_oInfo.m_lUnitsVer) +
|
||||
L"\" type=\"screen4x3\" /><p:notesSz cx=\"" + std::to_wstring(m_pDocument->m_oInfo.m_lUnitsVer) +
|
||||
L"\" cy=\"" + std::to_wstring(m_pDocument->m_oInfo.m_lUnitsHor) + L"\"/>";
|
||||
std::wstring strSizePres = L"<p:sldSz cx=\"" + std::to_wstring(m_pDocument->m_lSlideWidth) +
|
||||
L"\" cy=\"" + std::to_wstring(m_pDocument->m_lSlideHeight) +
|
||||
L"\" type=\"screen4x3\" /><p:notesSz cx=\"" + std::to_wstring(m_pDocument->m_lNotesWidth) +
|
||||
L"\" cy=\"" + std::to_wstring(m_pDocument->m_lNotesHeight) + L"\"/>";
|
||||
|
||||
std::wstring strDefaultTextStyle = _T("<p:defaultTextStyle>");
|
||||
|
||||
if (m_pDocument->m_arThemes.size() > 0)
|
||||
if (false == m_pDocument->m_arThemes.empty())
|
||||
{
|
||||
strDefaultTextStyle += CStylesWriter::ConvertStyles(m_pDocument->m_arThemes[0].m_pStyles[0], m_pDocument->m_oInfo, 9);
|
||||
strDefaultTextStyle += CStylesWriter::ConvertStyles(m_pDocument->m_arThemes[0]->m_pStyles[0], 9);
|
||||
}
|
||||
strDefaultTextStyle += _T("</p:defaultTextStyle>");
|
||||
|
||||
@ -577,14 +587,14 @@ void NSPresentationEditor::CPPTXWriter::WriteThemes()
|
||||
|
||||
for (size_t i = 0; i < m_pDocument->m_arThemes.size(); i++)
|
||||
{
|
||||
WriteTheme(&m_pDocument->m_arThemes[i], nIndexTheme, nStartLayout, 1);
|
||||
WriteTheme(m_pDocument->m_arThemes[i], nIndexTheme, nStartLayout);
|
||||
}
|
||||
|
||||
WriteTheme(m_pDocument->m_pNotesMaster, nIndexTheme, nStartLayout, 2);
|
||||
WriteTheme(m_pDocument->m_pHandoutMaster, nIndexTheme, nStartLayout, 3);
|
||||
WriteTheme(m_pDocument->m_pNotesMaster, nIndexTheme, nStartLayout);
|
||||
WriteTheme(m_pDocument->m_pHandoutMaster, nIndexTheme, nStartLayout);
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::WriteTheme(CTheme* pTheme, int & nIndexTheme, int & nStartLayout, int Type)
|
||||
void NSPresentationEditor::CPPTXWriter::WriteTheme(CThemePtr pTheme, int & nIndexTheme, int & nStartLayout)
|
||||
{
|
||||
if (!pTheme) return;
|
||||
|
||||
@ -665,15 +675,15 @@ void NSPresentationEditor::CPPTXWriter::WriteTheme(CTheme* pTheme, int & nIndexT
|
||||
CStringWriter oWriter;
|
||||
oWriter.WriteString(L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>");
|
||||
|
||||
if (Type == 1)
|
||||
if (pTheme->m_eType == typeMaster)
|
||||
{
|
||||
oWriter.WriteString(L"<p:sldMaster xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:p=\"http://schemas.openxmlformats.org/presentationml/2006/main\">");
|
||||
}
|
||||
else if (Type == 2)
|
||||
else if (pTheme->m_eType == typeNotesMaster)
|
||||
{
|
||||
oWriter.WriteString(L"<p:notesMaster xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:p=\"http://schemas.openxmlformats.org/presentationml/2006/main\">");
|
||||
}
|
||||
else if (Type == 3)
|
||||
else if (pTheme->m_eType == typeHandoutMaster)
|
||||
{
|
||||
oWriter.WriteString(L"<p:handoutMaster xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:p=\"http://schemas.openxmlformats.org/presentationml/2006/main\">");
|
||||
}
|
||||
@ -686,15 +696,55 @@ void NSPresentationEditor::CPPTXWriter::WriteTheme(CTheme* pTheme, int & nIndexT
|
||||
oWriter.WriteString(L"<p:spTree><p:nvGrpSpPr><p:cNvPr id=\"1\" name=\"\"/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr>\
|
||||
<a:xfrm><a:off x=\"0\" y=\"0\"/><a:ext cx=\"0\" cy=\"0\"/><a:chOff x=\"0\" y=\"0\"/><a:chExt cx=\"0\" cy=\"0\"/></a:xfrm></p:grpSpPr>");
|
||||
|
||||
for (size_t nEl = 0; nEl < pTheme->m_arElements.size(); ++nEl)
|
||||
{
|
||||
if (isBodyPlaceholder(pTheme->m_arElements[nEl]->m_lPlaceholderType))
|
||||
pTheme->m_arElements[nEl]->m_lPlaceholderType =100; //body тип прописывать !!
|
||||
CGroupElement *pGroupElement = !pTheme->m_arElements.empty() ? dynamic_cast<CGroupElement *>(pTheme->m_arElements[0].get()) : NULL;
|
||||
|
||||
if (pTheme->m_arElements[nEl]->m_bBoundsEnabled == false)
|
||||
continue;
|
||||
|
||||
WriteElement(oWriter, oRels, pTheme->m_arElements[nEl]);
|
||||
size_t start_index = 0;
|
||||
if (pGroupElement)
|
||||
{
|
||||
for (size_t i = 0; i < pGroupElement->m_pChildElements.size(); ++i)
|
||||
{
|
||||
if (isBodyPlaceholder(pGroupElement->m_pChildElements[i]->m_lPlaceholderType))
|
||||
pGroupElement->m_pChildElements[i]->m_lPlaceholderType = 100; //body тип прописывать !!
|
||||
|
||||
//if (pGroupElement->m_pChildElements[i]->m_bAnchorEnabled == false &&
|
||||
// pGroupElement->m_pChildElements[i]->m_bChildAnchorEnabled == false)
|
||||
// continue;
|
||||
|
||||
//if (pTheme->m_eType == typeNotesMaster)
|
||||
//{
|
||||
// pGroupElement->m_pChildElements[i]->m_lPlaceholderID = -1;
|
||||
//}
|
||||
//else if (pTheme->m_eType == typeHandoutMaster)
|
||||
//{
|
||||
// pGroupElement->m_pChildElements[i]->m_lPlaceholderID = -1;
|
||||
// pGroupElement->m_pChildElements[i]->m_lPlaceholderSizePreset = -1;
|
||||
//}
|
||||
WriteElement(oWriter, oRels, pGroupElement->m_pChildElements[i]);
|
||||
}
|
||||
|
||||
start_index = 1;
|
||||
}
|
||||
|
||||
for (size_t i = start_index; i < pTheme->m_arElements.size(); ++i)
|
||||
{
|
||||
if (isBodyPlaceholder(pTheme->m_arElements[i]->m_lPlaceholderType))
|
||||
pTheme->m_arElements[i]->m_lPlaceholderType = 100; //body тип прописывать !!
|
||||
|
||||
//if (pTheme->m_arElements[i]->m_bAnchorEnabled == false &&
|
||||
// pTheme->m_arElements[i]->m_bChildAnchorEnabled == false)
|
||||
// continue;
|
||||
|
||||
//if (pTheme->m_eType == typeNotesMaster)
|
||||
//{
|
||||
// pTheme->m_arElements[i]->m_lPlaceholderID = -1;
|
||||
//}
|
||||
//else if (pTheme->m_eType == typeHandoutMaster)
|
||||
//{
|
||||
// pTheme->m_arElements[i]->m_lPlaceholderID = -1;
|
||||
// pTheme->m_arElements[i]->m_lPlaceholderSizePreset = -1;
|
||||
//}
|
||||
|
||||
WriteElement(oWriter, oRels, pTheme->m_arElements[i]);
|
||||
}
|
||||
|
||||
oWriter.WriteString(std::wstring(L"</p:spTree></p:cSld>"));
|
||||
@ -702,7 +752,7 @@ void NSPresentationEditor::CPPTXWriter::WriteTheme(CTheme* pTheme, int & nIndexT
|
||||
std::wstring strOverrideColorScheme = _T("<p:clrMap bg1=\"lt1\" tx1=\"dk1\" bg2=\"lt2\" tx2=\"dk2\" accent1=\"accent1\" accent2=\"accent2\" accent3=\"accent3\" accent4=\"accent4\" accent5=\"accent5\" accent6=\"accent6\" hlink=\"hlink\" folHlink=\"folHlink\"/>");
|
||||
oWriter.WriteString(strOverrideColorScheme);
|
||||
|
||||
if (Type == 1)
|
||||
if (pTheme->m_eType == typeMaster)
|
||||
{
|
||||
oWriter.WriteString(std::wstring(L"<p:sldLayoutIdLst>"));
|
||||
|
||||
@ -726,34 +776,34 @@ void NSPresentationEditor::CPPTXWriter::WriteTheme(CTheme* pTheme, int & nIndexT
|
||||
if (!pTheme->m_bHasFooter) oWriter.WriteString(std::wstring(L" ftr=\"0\""));
|
||||
oWriter.WriteString(std::wstring(L"/>"));
|
||||
}
|
||||
if (Type == 1)
|
||||
if (pTheme->m_eType == typeMaster)
|
||||
{
|
||||
oWriter.WriteString(std::wstring(L"<p:txStyles>"));
|
||||
|
||||
oWriter.WriteString(std::wstring(L"<p:titleStyle>"));
|
||||
CStylesWriter::ConvertStyles(pTheme->m_pStyles[1], pTheme->m_oInfo, oWriter, 9);
|
||||
CStylesWriter::ConvertStyles(pTheme->m_pStyles[1], oWriter, 9);
|
||||
oWriter.WriteString(std::wstring(L"</p:titleStyle>"));
|
||||
|
||||
oWriter.WriteString(std::wstring(L"<p:bodyStyle>"));
|
||||
CStylesWriter::ConvertStyles(pTheme->m_pStyles[2], pTheme->m_oInfo, oWriter, 9);
|
||||
CStylesWriter::ConvertStyles(pTheme->m_pStyles[2], oWriter, 9);
|
||||
oWriter.WriteString(std::wstring(L"</p:bodyStyle>"));
|
||||
|
||||
oWriter.WriteString(std::wstring(L"<p:otherStyle>"));
|
||||
CStylesWriter::ConvertStyles(pTheme->m_pStyles[3], pTheme->m_oInfo, oWriter, 9);
|
||||
CStylesWriter::ConvertStyles(pTheme->m_pStyles[3], oWriter, 9);
|
||||
oWriter.WriteString(std::wstring(L"</p:otherStyle>"));
|
||||
|
||||
oWriter.WriteString(std::wstring(L"</p:txStyles>"));
|
||||
}
|
||||
else if (Type == 2)
|
||||
else if (pTheme->m_eType == typeNotesMaster)
|
||||
{
|
||||
oWriter.WriteString(std::wstring(L"<p:notesStyle>"));
|
||||
CStylesWriter::ConvertStyles(pTheme->m_pStyles[1], pTheme->m_oInfo, oWriter, 9);
|
||||
CStylesWriter::ConvertStyles(pTheme->m_pStyles[1], oWriter, 9);
|
||||
oWriter.WriteString(std::wstring(L"</p:notesStyle>"));
|
||||
}
|
||||
|
||||
std::wstring strSlideMasterFile;
|
||||
std::wstring strSlideMasterRelsFile;
|
||||
if (Type == 1)
|
||||
if (pTheme->m_eType == typeMaster)
|
||||
{
|
||||
oWriter.WriteString(std::wstring(L"</p:sldMaster>"));
|
||||
|
||||
@ -763,7 +813,7 @@ void NSPresentationEditor::CPPTXWriter::WriteTheme(CTheme* pTheme, int & nIndexT
|
||||
strSlideMasterRelsFile = L"slideMaster" + std::to_wstring(nIndexTheme + 1) + L".xml.rels";
|
||||
strSlideMasterRelsFile = strPptDirectory + _T("slideMasters") + FILE_SEPARATOR_STR + _T("_rels") + FILE_SEPARATOR_STR + strSlideMasterRelsFile;
|
||||
}
|
||||
else if (Type == 2)
|
||||
else if (pTheme->m_eType == typeNotesMaster)
|
||||
{
|
||||
oWriter.WriteString(std::wstring(L"</p:notesMaster>"));
|
||||
|
||||
@ -773,7 +823,7 @@ void NSPresentationEditor::CPPTXWriter::WriteTheme(CTheme* pTheme, int & nIndexT
|
||||
strSlideMasterRelsFile = L"notesMaster1.xml.rels";
|
||||
strSlideMasterRelsFile = strPptDirectory + _T("notesMasters") + FILE_SEPARATOR_STR + _T("_rels") + FILE_SEPARATOR_STR + strSlideMasterRelsFile;
|
||||
}
|
||||
else if (Type == 3)
|
||||
else if (pTheme->m_eType == typeHandoutMaster)
|
||||
{
|
||||
oWriter.WriteString(std::wstring(L"</p:handoutMaster>"));
|
||||
|
||||
@ -859,13 +909,29 @@ void NSPresentationEditor::CPPTXWriter::WriteBackground(CStringWriter& oWriter,
|
||||
}
|
||||
oWriter.WriteString(std::wstring(L"</p:bgPr></p:bg>"));
|
||||
}
|
||||
void NSPresentationEditor::CPPTXWriter::WriteGroup(CStringWriter& oWriter, CRelsGenerator& oRels, CElementPtr pElement, CLayout* pLayout)
|
||||
{
|
||||
CGroupElement *pGroupElement = dynamic_cast<CGroupElement*>(pElement.get());
|
||||
|
||||
m_pShapeWriter->SetElement(pElement);
|
||||
oWriter.WriteString(m_pShapeWriter->ConvertGroup());
|
||||
|
||||
for (size_t i = 0; i < pGroupElement->m_pChildElements.size(); i++)
|
||||
{
|
||||
WriteElement(oWriter, oRels, pGroupElement->m_pChildElements[i], pLayout);
|
||||
}
|
||||
oWriter.WriteString(L"</p:grpSp>");
|
||||
}
|
||||
void NSPresentationEditor::CPPTXWriter::WriteElement(CStringWriter& oWriter, CRelsGenerator& oRels, CElementPtr pElement, CLayout* pLayout)
|
||||
{
|
||||
if (!pElement) return;
|
||||
|
||||
CGroupElement *pGroupElement = dynamic_cast<CGroupElement*>(pElement.get());
|
||||
|
||||
pElement->m_oMetric = m_pDocument->m_oInfo;
|
||||
pElement->NormalizeCoordsByMetric();
|
||||
if (pGroupElement)
|
||||
{
|
||||
return WriteGroup(oWriter, oRels, pElement, pLayout);
|
||||
}
|
||||
|
||||
bool bObject = m_pShapeWriter->SetElement(pElement);
|
||||
|
||||
@ -890,8 +956,16 @@ void NSPresentationEditor::CPPTXWriter::WriteElement(CStringWriter& oWriter, CRe
|
||||
|
||||
if (bIsEqualTransform)
|
||||
{
|
||||
if (pElement->m_rcBounds.IsEqual(pElLayout->m_rcBounds, 0.5))
|
||||
pElement->m_bBoundsEnabled = false;
|
||||
if (pElement->m_bAnchorEnabled == pElLayout->m_bAnchorEnabled && pElLayout->m_bAnchorEnabled == true)
|
||||
{
|
||||
if (pElement->m_rcAnchor.IsEqual(pElLayout->m_rcAnchor, 0.5))
|
||||
pElement->m_bAnchorEnabled = false;
|
||||
}
|
||||
if (pElement->m_bChildAnchorEnabled == pElLayout->m_bChildAnchorEnabled && pElLayout->m_bChildAnchorEnabled == true)
|
||||
{
|
||||
if (pElement->m_rcChildAnchor.IsEqual(pElLayout->m_rcChildAnchor, 0.5))
|
||||
pElement->m_bChildAnchorEnabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
@ -903,8 +977,10 @@ void NSPresentationEditor::CPPTXWriter::WriteElement(CStringWriter& oWriter, CRe
|
||||
}
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::WriteLayout(CLayout& oLayout, int nIndexLayout, int nStartLayout, int nIndexTheme)
|
||||
void NSPresentationEditor::CPPTXWriter::WriteLayout(CLayoutPtr pLayout, int nIndexLayout, int nStartLayout, int nIndexTheme)
|
||||
{
|
||||
if (!pLayout) return;
|
||||
|
||||
CStringWriter oWriter;
|
||||
|
||||
CRelsGenerator oRels(&m_oManager);
|
||||
@ -913,29 +989,44 @@ void NSPresentationEditor::CPPTXWriter::WriteLayout(CLayout& oLayout, int nIndex
|
||||
oWriter.WriteString(std::wstring(L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"));
|
||||
|
||||
oWriter.WriteString(std::wstring(L"<p:sldLayout xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:p=\"http://schemas.openxmlformats.org/presentationml/2006/main\""));
|
||||
oWriter.WriteString(std::wstring(L" type=\"") + oLayout.m_strLayoutType + _T("\""));
|
||||
oWriter.WriteString(std::wstring(L" showMasterSp=\"") + (oLayout.m_bShowMasterShapes ? _T("1") : _T("0")));
|
||||
oWriter.WriteString(std::wstring(L" type=\"") + pLayout->m_strLayoutType + _T("\""));
|
||||
oWriter.WriteString(std::wstring(L" showMasterSp=\"") + (pLayout->m_bShowMasterShapes ? _T("1") : _T("0")));
|
||||
oWriter.WriteString(std::wstring(L"\" preserve=\"1\"><p:cSld"));
|
||||
|
||||
if ( oLayout.m_sName.empty() == false)
|
||||
oWriter.WriteString(std::wstring(L" name=\"") + oLayout.m_sName + std::wstring(L"\""));
|
||||
if ( pLayout->m_sName.empty() == false)
|
||||
oWriter.WriteString(std::wstring(L" name=\"") + pLayout->m_sName + std::wstring(L"\""));
|
||||
oWriter.WriteString(std::wstring(L">"));
|
||||
|
||||
if (oLayout.m_bIsBackground)
|
||||
if (pLayout->m_bIsBackground)
|
||||
{
|
||||
WriteBackground(oWriter, oRels, oLayout.m_oBackground);
|
||||
WriteBackground(oWriter, oRels, pLayout->m_oBackground);
|
||||
}
|
||||
|
||||
std::wstring strElems = _T("<p:spTree><p:nvGrpSpPr><p:cNvPr id=\"1\" name=\"\"/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr>\
|
||||
<a:xfrm><a:off x=\"0\" y=\"0\"/><a:ext cx=\"0\" cy=\"0\"/><a:chOff x=\"0\" y=\"0\"/><a:chExt cx=\"0\" cy=\"0\"/></a:xfrm></p:grpSpPr>");
|
||||
oWriter.WriteString(strElems);
|
||||
|
||||
size_t nElements = oLayout.m_arElements.size();
|
||||
for (size_t nEl = 0; nEl < nElements; ++nEl)
|
||||
size_t start_index = 0;
|
||||
|
||||
if (pLayout->m_bIsTitleMaster)
|
||||
{
|
||||
WriteElement(oWriter, oRels, oLayout.m_arElements[nEl]);
|
||||
CGroupElement *pGroupElement = (!pLayout->m_arElements.empty()) ? dynamic_cast<CGroupElement *>(pLayout->m_arElements[0].get()) : NULL;
|
||||
|
||||
if (pGroupElement)
|
||||
{
|
||||
for (size_t i = 0; i < pGroupElement->m_pChildElements.size(); ++i)
|
||||
{
|
||||
WriteElement(oWriter, oRels, pGroupElement->m_pChildElements[i]);
|
||||
}
|
||||
|
||||
start_index = 1;
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = start_index; i < pLayout->m_arElements.size(); ++i)
|
||||
{
|
||||
WriteElement(oWriter, oRels, pLayout->m_arElements[i]);
|
||||
}
|
||||
oWriter.WriteString(std::wstring(L"</p:spTree></p:cSld>"));
|
||||
|
||||
oWriter.WriteString(std::wstring(L"<p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr>"));
|
||||
@ -968,7 +1059,9 @@ void NSPresentationEditor::CPPTXWriter::WriteSlide(int nIndexSlide)
|
||||
{
|
||||
int nLayout = pSlide->m_lLayoutID;
|
||||
for (int i = 0; i < pSlide->m_lThemeID; ++i)
|
||||
nLayout += (int)m_pDocument->m_arThemes[i].m_arLayouts.size();
|
||||
{
|
||||
nLayout += (int)m_pDocument->m_arThemes[i]->m_arLayouts.size();
|
||||
}
|
||||
|
||||
oRels.StartSlide(nLayout, pSlide->m_lNotesID);
|
||||
}
|
||||
@ -994,10 +1087,25 @@ void NSPresentationEditor::CPPTXWriter::WriteSlide(int nIndexSlide)
|
||||
oWriter.WriteString(std::wstring(L"<p:spTree><p:nvGrpSpPr><p:cNvPr id=\"1\" name=\"\"/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr>\
|
||||
<a:xfrm><a:off x=\"0\" y=\"0\"/><a:ext cx=\"0\" cy=\"0\"/><a:chOff x=\"0\" y=\"0\"/><a:chExt cx=\"0\" cy=\"0\"/></a:xfrm></p:grpSpPr>"));
|
||||
|
||||
for (size_t nEl = 0; nEl < pSlide->m_arElements.size(); ++nEl)
|
||||
CGroupElement *pGroupElement = !pSlide->m_arElements.empty() ? dynamic_cast<CGroupElement *>(pSlide->m_arElements[0].get()) : NULL;
|
||||
|
||||
size_t start_index = 0;
|
||||
|
||||
if (pGroupElement)
|
||||
{
|
||||
WriteElement(oWriter, oRels, pSlide->m_arElements[nEl], &m_pDocument->m_arThemes[pSlide->m_lThemeID].m_arLayouts[pSlide->m_lLayoutID]);
|
||||
for (size_t i = 0; i < pGroupElement->m_pChildElements.size(); ++i)
|
||||
{
|
||||
WriteElement(oWriter, oRels, pGroupElement->m_pChildElements[i]);
|
||||
}
|
||||
|
||||
start_index = 1;
|
||||
}
|
||||
|
||||
for (size_t i = start_index; i < pSlide->m_arElements.size(); ++i)
|
||||
{
|
||||
WriteElement(oWriter, oRels, pSlide->m_arElements[i]);
|
||||
}
|
||||
|
||||
oWriter.WriteString(std::wstring(L"</p:spTree></p:cSld>"));
|
||||
|
||||
oWriter.WriteString(std::wstring(L"<p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr>"));
|
||||
@ -1132,10 +1240,10 @@ void NSPresentationEditor::CPPTXWriter::WriteTransition(CStringWriter& oWriter,
|
||||
param_name2 = L"orient";
|
||||
switch(transition.m_nEffectDirection)
|
||||
{
|
||||
case 0: param_value = L"horz"; param_value2 = L"out"; break;
|
||||
case 1: param_value = L"horz"; param_value2 = L"in"; break;
|
||||
case 2: param_value = L"vert"; param_value2 = L"out"; break;
|
||||
case 3: param_value = L"vert"; param_value2 = L"in"; break;
|
||||
case 0: param_value2 = L"horz"; param_value = L"out"; break;
|
||||
case 1: param_value2 = L"horz"; param_value = L"in"; break;
|
||||
case 2: param_value2 = L"vert"; param_value = L"out"; break;
|
||||
case 3: param_value2 = L"vert"; param_value = L"in"; break;
|
||||
}
|
||||
}break;
|
||||
case 17:
|
||||
@ -1201,7 +1309,8 @@ void NSPresentationEditor::CPPTXWriter::WriteTransition(CStringWriter& oWriter,
|
||||
oWriter.WriteString(L"/>");
|
||||
if (transition.m_bAudioPresent)
|
||||
{
|
||||
std::wstring rId = m_pShapeWriter->m_pRels->WriteAudio(transition.m_oAudio.m_strAudioFileName);
|
||||
bool bExternal = false;
|
||||
std::wstring rId = m_pShapeWriter->m_pRels->WriteAudio(transition.m_oAudio.m_strAudioFileName, bExternal);
|
||||
oWriter.WriteString(std::wstring(L"<p:sndAc><p:stSnd>"));
|
||||
oWriter.WriteString(L"<p:snd r:embed=\"" + rId + L"\" name=\"" + transition.m_oAudio.m_sImageName + L"\"/>");
|
||||
oWriter.WriteString(std::wstring(L"</p:stSnd></p:sndAc>"));
|
||||
@ -1234,10 +1343,25 @@ void NSPresentationEditor::CPPTXWriter::WriteNotes(int nIndexNotes)
|
||||
oWriter.WriteString(std::wstring(L"<p:spTree><p:nvGrpSpPr><p:cNvPr id=\"1\" name=\"\"/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr>\
|
||||
<a:xfrm><a:off x=\"0\" y=\"0\"/><a:ext cx=\"0\" cy=\"0\"/><a:chOff x=\"0\" y=\"0\"/><a:chExt cx=\"0\" cy=\"0\"/></a:xfrm></p:grpSpPr>"));
|
||||
|
||||
for (size_t nEl = 0; nEl < pNotes->m_arElements.size(); ++nEl)
|
||||
CGroupElement *pGroupElement = !pNotes->m_arElements.empty() ? dynamic_cast<CGroupElement *>(pNotes->m_arElements[0].get()) : NULL;
|
||||
|
||||
size_t start_index = 0;
|
||||
|
||||
if (pGroupElement)
|
||||
{
|
||||
WriteElement(oWriter, oRels, pNotes->m_arElements[nEl], NULL);
|
||||
for (size_t i = 0; i < pGroupElement->m_pChildElements.size(); ++i)
|
||||
{
|
||||
WriteElement(oWriter, oRels, pGroupElement->m_pChildElements[i]);
|
||||
}
|
||||
|
||||
start_index = 1;
|
||||
}
|
||||
|
||||
for (size_t i = start_index; i < pNotes->m_arElements.size(); ++i)
|
||||
{
|
||||
WriteElement(oWriter, oRels, pNotes->m_arElements[i]);
|
||||
}
|
||||
|
||||
oWriter.WriteString(std::wstring(L"</p:spTree></p:cSld>"));
|
||||
|
||||
oWriter.WriteString(std::wstring(L"<p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr>"));
|
||||
|
||||
@ -72,10 +72,10 @@ namespace NSPresentationEditor
|
||||
void WritePresInfo ();
|
||||
void WriteAll ();
|
||||
void WriteThemes ();
|
||||
void WriteTheme (CTheme* pTheme, int & nIndexTheme, int & nStartLayout, int Type = 1);
|
||||
void WriteTheme (CThemePtr pTheme, int & nIndexTheme, int & nStartLayout);
|
||||
void WriteSlides ();
|
||||
void WriteNotes ();
|
||||
void WriteLayout (CLayout& oLayout, int nIndexLayout, int nStartLayout, int nIndexTheme);
|
||||
void WriteLayout (CLayoutPtr pLayout, int nIndexLayout, int nStartLayout, int nIndexTheme);
|
||||
void WriteSlide (int nIndexSlide);
|
||||
void WriteNotes (int nIndexNotes);
|
||||
|
||||
@ -83,6 +83,7 @@ namespace NSPresentationEditor
|
||||
void WriteColorScheme (CStringWriter& oWriter, const std::wstring & name, const std::vector<CColor> & colors, bool extra = false);
|
||||
void WriteBackground (CStringWriter& oWriter, CRelsGenerator& oRels, CBrush& oBackground);
|
||||
void WriteElement (CStringWriter& oWriter, CRelsGenerator& oRels, CElementPtr pElement, CLayout* pLayout = NULL);
|
||||
void WriteGroup (CStringWriter& oWriter, CRelsGenerator& oRels, CElementPtr pElement, CLayout* pLayout = NULL);
|
||||
|
||||
|
||||
};
|
||||
|
||||
@ -345,19 +345,33 @@ namespace NSPresentationEditor
|
||||
if (strImage.empty()) return WriteHyperlinkImage(CorrectXmlString3(strImagePath), true);
|
||||
return WriteHyperlinkImage(strImage, false);
|
||||
}
|
||||
inline std::wstring WriteAudio(const std::wstring& strAudioPath)
|
||||
inline std::wstring WriteAudio(const std::wstring& strAudioPath, bool & bExternal)
|
||||
{
|
||||
std::wstring strAudio = m_pManager->GenerateAudio(strAudioPath);
|
||||
|
||||
if (strAudio.empty()) return WriteHyperlinkAudio(CorrectXmlString3(strAudioPath), true);
|
||||
return WriteHyperlinkAudio(strAudio, false);
|
||||
if (strAudio.empty())
|
||||
{
|
||||
bExternal = true;
|
||||
return WriteHyperlinkAudio(CorrectXmlString3(strAudioPath), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return WriteHyperlinkAudio(strAudio, false);
|
||||
}
|
||||
}
|
||||
inline std::wstring WriteVideo(const std::wstring& strVideoPath)
|
||||
inline std::wstring WriteVideo(const std::wstring& strVideoPath, bool & bExternal)
|
||||
{
|
||||
std::wstring strVideo = m_pManager->GenerateVideo(strVideoPath);
|
||||
|
||||
if (strVideo.empty()) return WriteHyperlinkVideo(CorrectXmlString3(strVideoPath), true);
|
||||
return WriteHyperlinkVideo(strVideo, false);
|
||||
if (strVideo.empty())
|
||||
{
|
||||
bExternal = true;
|
||||
return WriteHyperlinkVideo(CorrectXmlString3(strVideoPath), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return WriteHyperlinkVideo(strVideo, false);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -135,18 +135,14 @@ namespace NSPresentationEditor
|
||||
return _T("body");
|
||||
}
|
||||
|
||||
class CShapeWriter : public IRenderer
|
||||
class CShapeWriter
|
||||
{
|
||||
private:
|
||||
NSPresentationEditor::CStringWriter m_oWriterPath;
|
||||
NSPresentationEditor::CStringWriter m_oWriterVML;
|
||||
NSPresentationEditor::CStringWriter m_oWriter;
|
||||
NSPresentationEditor::CDoubleRect m_oBounds;
|
||||
NSPresentationEditor::CDoubleRect m_oTextRect;
|
||||
NSPresentationEditor::CMetricInfo m_oMetricInfo;
|
||||
|
||||
NSPresentationEditor::CShapeElement* m_pShapeElement;
|
||||
NSPresentationEditor::CImageElement* m_pImageElement;
|
||||
NSPresentationEditor::CElementPtr m_pElement;
|
||||
|
||||
NSPresentationEditor::CRelsGenerator* m_pRels;
|
||||
|
||||
@ -154,6 +150,10 @@ namespace NSPresentationEditor
|
||||
|
||||
bool m_bWordArt;
|
||||
bool m_bTextBox;
|
||||
|
||||
std::wstring m_xmlGeomAlternative;
|
||||
std::wstring m_xmlTxBodyAlternative;
|
||||
std::wstring m_xmlAlternative;
|
||||
public:
|
||||
|
||||
CShapeWriter();
|
||||
@ -172,13 +172,16 @@ namespace NSPresentationEditor
|
||||
|
||||
bool SetElement(CElementPtr pElem);
|
||||
//--------------------------------------------------------------------
|
||||
std::wstring ConvertShape ();
|
||||
std::wstring ConvertGroup ();
|
||||
std::wstring ConvertShape ();
|
||||
std::wstring ConvertImage ();
|
||||
std::wstring ConvertLine (CPen & pen);
|
||||
std::wstring ConvertShadow (CShadow & shadow);
|
||||
std::wstring ConvertBrush (CBrush & brush);
|
||||
std::wstring ConvertLineEnd (unsigned char cap, unsigned char length, unsigned char width);
|
||||
static std::wstring ConvertColor (CColor & color, long alpha);
|
||||
|
||||
void ParseXmlAlternative(const std::wstring & xml);
|
||||
// тип рендерера-----------------------------------------------------------------------------
|
||||
virtual HRESULT get_Type(LONG* lType) ;
|
||||
//-------- Функции для работы со страницей --------------------------------------------------
|
||||
@ -261,8 +264,8 @@ namespace NSPresentationEditor
|
||||
virtual HRESULT CommandDrawTextEx(const std::wstring& bsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h);
|
||||
|
||||
//-------- Маркеры для команд ---------------------------------------------------------------
|
||||
virtual HRESULT BeginCommand(const DWORD& lType);
|
||||
virtual HRESULT EndCommand(const DWORD& lType) ;
|
||||
virtual HRESULT BeginCommand(const _UINT32& lType);
|
||||
virtual HRESULT EndCommand(const _UINT32& lType) ;
|
||||
|
||||
//-------- Функции для работы с Graphics Path -----------------------------------------------
|
||||
virtual HRESULT PathCommandMoveTo(const double& x, const double& y);
|
||||
@ -288,8 +291,8 @@ namespace NSPresentationEditor
|
||||
virtual HRESULT DrawImageFromFile(const std::wstring&, const double& x, const double& y, const double& w, const double& h, const BYTE& lAlpha = 255);
|
||||
|
||||
// transform --------------------------------------------------------------------------------
|
||||
virtual HRESULT GetCommandParams(double* dAngle, double* dLeft, double* dTop, double* dWidth, double* dHeight, DWORD* lFlags);
|
||||
virtual HRESULT SetCommandParams(double dAngle, double dLeft, double dTop, double dWidth, double dHeight, DWORD lFlags);
|
||||
virtual HRESULT GetCommandParams(double* dAngle, double* dLeft, double* dTop, double* dWidth, double* dHeight, _UINT32* lFlags);
|
||||
virtual HRESULT SetCommandParams(double dAngle, double dLeft, double dTop, double dWidth, double dHeight, _UINT32 lFlags);
|
||||
virtual HRESULT SetTransform(const double& m1, const double& m2, const double& m3, const double& m4, const double& m5, const double& m6);
|
||||
virtual HRESULT GetTransform(double *pdA, double *pdB, double *pdC, double *pdD, double *pdE, double *pdF);
|
||||
virtual HRESULT ResetTransform();
|
||||
@ -395,9 +398,6 @@ namespace NSPresentationEditor
|
||||
|
||||
CFont m_oInstalledFont;
|
||||
|
||||
double m_dWidth;
|
||||
double m_dHeight;
|
||||
|
||||
public:
|
||||
inline void MoveTo(const double& dX, const double& dY)
|
||||
{
|
||||
@ -447,8 +447,8 @@ namespace NSPresentationEditor
|
||||
m_oWriterPath.WriteString(str);
|
||||
}
|
||||
|
||||
void WriteGroupInfo();
|
||||
void WriteShapeInfo();
|
||||
|
||||
void WriteImageInfo();
|
||||
void WriteTextInfo();
|
||||
};
|
||||
|
||||
@ -88,28 +88,27 @@ public:
|
||||
return L"auto";
|
||||
}
|
||||
|
||||
static std::wstring ConvertStyles(NSPresentationEditor::CTextStyles& oStyles, NSPresentationEditor::CMetricInfo& oMetricInfo, int nCount = 10)
|
||||
static std::wstring ConvertStyles(NSPresentationEditor::CTextStyles& oStyles, int nCount = 10)
|
||||
{
|
||||
NSPresentationEditor::CStringWriter oWriter;
|
||||
ConvertStyles(oStyles, oMetricInfo, oWriter, nCount);
|
||||
ConvertStyles(oStyles, oWriter, nCount);
|
||||
return oWriter.GetData();
|
||||
}
|
||||
static void ConvertStyles(NSPresentationEditor::CTextStyles& oStyles, NSPresentationEditor::CMetricInfo& oMetricInfo,
|
||||
NSPresentationEditor::CStringWriter& oWriter, int nCount = 10)
|
||||
static void ConvertStyles(NSPresentationEditor::CTextStyles& oStyles, NSPresentationEditor::CStringWriter& oWriter, int nCount = 10)
|
||||
{
|
||||
for (int i = 0; i < nCount; ++i)
|
||||
{
|
||||
if (oStyles.m_pLevels[i].is_init())
|
||||
ConvertStyleLevel(oStyles.m_pLevels[i].get(), oMetricInfo, oWriter, i);
|
||||
ConvertStyleLevel(oStyles.m_pLevels[i].get(), oWriter, i);
|
||||
}
|
||||
}
|
||||
static std::wstring ConvertStyleLevel(NSPresentationEditor::CTextStyleLevel& oLevel, NSPresentationEditor::CMetricInfo& oMetricInfo, const int& nLevel)
|
||||
static std::wstring ConvertStyleLevel(NSPresentationEditor::CTextStyleLevel& oLevel, const int& nLevel)
|
||||
{
|
||||
NSPresentationEditor::CStringWriter oWriter;
|
||||
ConvertStyleLevel(oLevel, oMetricInfo, oWriter, nLevel);
|
||||
ConvertStyleLevel(oLevel, oWriter, nLevel);
|
||||
return oWriter.GetData();
|
||||
}
|
||||
|
||||
static void ConvertStyleLevel(NSPresentationEditor::CTextStyleLevel& oLevel, NSPresentationEditor::CMetricInfo& oMetricInfo,
|
||||
static void ConvertStyleLevel(NSPresentationEditor::CTextStyleLevel& oLevel,
|
||||
NSPresentationEditor::CStringWriter& oWriter, const int& nLevel);
|
||||
};
|
||||
|
||||
@ -38,12 +38,12 @@ using namespace NSOfficePPT;
|
||||
class CUserEdit
|
||||
{
|
||||
public:
|
||||
DWORD m_nOffsetLastEdit;
|
||||
DWORD m_nOffsetPersistDirectory;
|
||||
_UINT32 m_nOffsetLastEdit;
|
||||
_UINT32 m_nOffsetPersistDirectory;
|
||||
|
||||
DWORD m_nDocumentRef;
|
||||
DWORD m_nEncryptRef;
|
||||
DWORD m_nMaxPersistWritten;
|
||||
_UINT32 m_nDocumentRef;
|
||||
_UINT32 m_nEncryptRef;
|
||||
_UINT32 m_nMaxPersistWritten;
|
||||
|
||||
CUserEdit()
|
||||
{
|
||||
@ -81,7 +81,7 @@ class CCurrentUser
|
||||
{
|
||||
public:
|
||||
bool m_bIsEncrypt;
|
||||
DWORD m_nOffsetToCurrentEdit;
|
||||
_UINT32 m_nOffsetToCurrentEdit;
|
||||
std::wstring m_sName;
|
||||
|
||||
CCurrentUser()
|
||||
|
||||
@ -69,7 +69,7 @@ public:
|
||||
{
|
||||
m_oCurrentUser.FromAtom(pCurrentUser);
|
||||
|
||||
DWORD offsetToEdit = m_oCurrentUser.m_nOffsetToCurrentEdit;
|
||||
_UINT32 offsetToEdit = m_oCurrentUser.m_nOffsetToCurrentEdit;
|
||||
SRecordHeader oHeader;
|
||||
CRecordUserEditAtom oUserAtom;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -45,7 +45,7 @@ class CPPTUserInfo : public CDocument
|
||||
{
|
||||
public:
|
||||
CUserEdit m_oUser;
|
||||
std::map<DWORD, DWORD> m_mapOffsetInPIDs;
|
||||
std::map<_UINT32, _UINT32> m_mapOffsetInPIDs;
|
||||
CRecordDocument m_oDocument;
|
||||
|
||||
CEncryptionHeader m_oEncryptionHeader;
|
||||
@ -55,22 +55,22 @@ public:
|
||||
POLE::Storage* m_pStorageDecrypt;
|
||||
std::vector<CFStreamPtr> m_arStreamDecrypt; // на каждый Persist свой ... оО
|
||||
|
||||
std::map<DWORD, CRecordSlide*> m_mapSlides;
|
||||
std::map<DWORD, CRecordSlide*> m_mapMasters;
|
||||
std::map<DWORD, CRecordSlide*> m_mapNotes;
|
||||
std::map<_UINT32, CRecordSlide*> m_mapSlides;
|
||||
std::map<_UINT32, CRecordSlide*> m_mapMasters;
|
||||
std::map<_UINT32, CRecordSlide*> m_mapNotes;
|
||||
|
||||
std::map<DWORD, CRecordSlide*> m_mapNotesMasters;
|
||||
std::map<DWORD, CRecordSlide*> m_mapHandoutMasters;
|
||||
std::map<_UINT32, CRecordSlide*> m_mapNotesMasters;
|
||||
std::map<_UINT32, CRecordSlide*> m_mapHandoutMasters;
|
||||
|
||||
std::vector<DWORD> m_arrSlidesOrder;
|
||||
std::vector<DWORD> m_arrMastersOrder;
|
||||
std::vector<DWORD> m_arrNotesOrder;
|
||||
std::vector<_UINT32> m_arrSlidesOrder;
|
||||
std::vector<_UINT32> m_arrMastersOrder;
|
||||
std::vector<_UINT32> m_arrNotesOrder;
|
||||
|
||||
// перевод id мастера в индекс темы/шаблона
|
||||
std::map<DWORD, LONG> m_mapMasterToTheme;
|
||||
std::map<_UINT32, LONG> m_mapMasterToTheme;
|
||||
|
||||
// original id -> natural id
|
||||
std::map<DWORD, DWORD> m_mapMasterOriginalIds;
|
||||
std::map<_UINT32, _UINT32> m_mapMasterOriginalIds;
|
||||
|
||||
// это как бы ППT-шная обертка над слайдом
|
||||
std::vector<CSlideInfo> m_arSlideWrapper;
|
||||
@ -99,12 +99,12 @@ public:
|
||||
int m_lIndexThisUser;
|
||||
|
||||
// Animations structures
|
||||
std::map <DWORD, Animations::CSlideTimeLine*> m_mapAnimations;
|
||||
std::map <_UINT32, Animations::CSlideTimeLine*> m_mapAnimations;
|
||||
|
||||
double m_nWriteSlideTimeOffset;
|
||||
double m_nWriteSlideTime;
|
||||
|
||||
std::map<DWORD, CSlideShowSlideInfoAtom> m_mapTransitions;
|
||||
std::map<_UINT32, CSlideShowSlideInfoAtom> m_mapTransitions;
|
||||
|
||||
// номера "пустых" картинок - в эти пути не будем сохранять
|
||||
std::vector<int> m_arOffsetPictures;
|
||||
@ -121,6 +121,9 @@ public:
|
||||
bool m_bRtl;
|
||||
bool m_bShowComments;
|
||||
|
||||
int m_current_level;
|
||||
std::vector<CElementPtr>* m_current_elements;
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
CPPTUserInfo();
|
||||
~CPPTUserInfo();
|
||||
@ -137,21 +140,21 @@ public:
|
||||
|
||||
void NormalizeCoords(long lWidth, long lHeight);
|
||||
|
||||
void LoadSlide(DWORD dwSlideID, CSlide* pSlide);
|
||||
void LoadNotes(DWORD dwNotesID, CSlide* pSlide);
|
||||
void LoadSlide(_UINT32 dwSlideID, CSlide* pSlide);
|
||||
void LoadNotes(_UINT32 dwNotesID, CSlide* pSlide);
|
||||
|
||||
void LoadMasters(const LONG& lOriginWidth, const LONG& lOriginHeight);
|
||||
void LoadMasters();
|
||||
|
||||
void LoadNoMainMaster (DWORD dwMasterID, const LONG& lOriginWidth, const LONG& lOriginHeight);
|
||||
void LoadMainMaster (DWORD dwMasterID, const LONG& lOriginWidth, const LONG& lOriginHeight);
|
||||
void LoadNoMainMaster (_UINT32 dwMasterID);
|
||||
void LoadMainMaster (_UINT32 dwMasterID);
|
||||
|
||||
void LoadMaster(CRecordSlide* pMaster, CSlideInfo *& pMasterWrapper, CTheme *& pTheme);
|
||||
void LoadMaster(_typeMaster type, CRecordSlide* pMaster, CSlideInfo *& pMasterWrapper, CThemePtr & pTheme);
|
||||
|
||||
void LoadSlideFromPrevUsers (DWORD dwSlideID);
|
||||
void LoadMasterFromPrevUsers (DWORD dwSlideID);
|
||||
void LoadNotesFromPrevUsers (DWORD dwSlideID);
|
||||
void LoadNotesMasterFromPrevUsers (DWORD dwSlideID);
|
||||
void LoadHandoutMasterFromPrevUsers (DWORD dwSlideID);
|
||||
void LoadSlideFromPrevUsers (_UINT32 dwSlideID);
|
||||
void LoadMasterFromPrevUsers (_UINT32 dwSlideID);
|
||||
void LoadNotesFromPrevUsers (_UINT32 dwSlideID);
|
||||
void LoadNotesMasterFromPrevUsers (_UINT32 dwSlideID);
|
||||
void LoadHandoutMasterFromPrevUsers (_UINT32 dwSlideID);
|
||||
|
||||
void LoadExternal(CRecordExObjListContainer* pExObjects);
|
||||
|
||||
@ -310,8 +313,8 @@ public:
|
||||
return _T("blank");
|
||||
}
|
||||
|
||||
void AddAnimation (DWORD dwSlideID, double Width, double Height, CElementPtr pElement);
|
||||
void AddAudioTransition (DWORD dwSlideID, CTransition* pTransition, const std::wstring& strFilePath);
|
||||
void AddAnimation (_UINT32 dwSlideID, double Width, double Height, CElementPtr pElement);
|
||||
void AddAudioTransition (_UINT32 dwSlideID, CTransition* pTransition, const std::wstring& strFilePath);
|
||||
|
||||
int AddNewLayout(NSPresentationEditor::CTheme* pTheme, CRecordSlide* pRecordSlide, bool addShapes, bool bMasterObjects);
|
||||
|
||||
@ -321,4 +324,7 @@ public:
|
||||
|
||||
CElementPtr AddThemeLayoutPlaceholder (CLayout *pLayout, int placeholderType, CTheme* pTheme, bool idx_only = false);
|
||||
CElementPtr AddLayoutSlidePlaceholder (CSlide *pSlide, int placeholderType, CLayout *pLayout, bool idx_only = false);
|
||||
|
||||
void LoadGroupShapeContainer(CRecordGroupShapeContainer* pGroup, std::vector<CElementPtr>* pParentElements,
|
||||
CTheme* pTheme, CLayout* pLayout, CSlideInfo* pThemeWrapper, CSlideInfo* pSlideWrapper, CSlide* pSlide = NULL);
|
||||
};
|
||||
|
||||
@ -253,7 +253,7 @@ typedef BYTE BOOL1;
|
||||
#define RECORD_TEXT_MASTER_STYLE10_ATOM 0x0FB2 // RT_TextMasterStyle10Atom TextMasterStyle10Atom
|
||||
|
||||
|
||||
static std::string GetRecordName(DWORD dwType)
|
||||
static std::string GetRecordName(_UINT32 dwType)
|
||||
{
|
||||
std::string strName = ("Unknown");
|
||||
|
||||
|
||||
@ -136,7 +136,7 @@ namespace NSStreamReader
|
||||
oRun.lCount = StreamUtils::ReadDWORD(pStream);
|
||||
}
|
||||
|
||||
DWORD dwFlags = StreamUtils::ReadDWORD(pStream);
|
||||
_UINT32 dwFlags = StreamUtils::ReadDWORD(pStream);
|
||||
BYTE flag1 = (BYTE)(dwFlags);
|
||||
BYTE flag2 = (BYTE)(dwFlags >> 8);
|
||||
|
||||
@ -169,7 +169,7 @@ namespace NSStreamReader
|
||||
}
|
||||
if (oRun.bPp10ext)
|
||||
{
|
||||
DWORD dwFlags = StreamUtils::ReadDWORD(pStream);
|
||||
_UINT32 dwFlags = StreamUtils::ReadDWORD(pStream);
|
||||
BYTE flag1 = (BYTE)(dwFlags);
|
||||
BYTE flag2 = (BYTE)(dwFlags >> 8);
|
||||
BYTE flag3 = (BYTE)(dwFlags >> 16);
|
||||
@ -181,7 +181,7 @@ namespace NSStreamReader
|
||||
|
||||
/*if (bSmartTag)
|
||||
{
|
||||
DWORD tabStopsCount = StreamUtils::ReadDWORD(pStream);
|
||||
_UINT32 tabStopsCount = StreamUtils::ReadDWORD(pStream);
|
||||
arSmartTags.clear();
|
||||
|
||||
for (int i = 0; i < (int)tabStopsCount; ++i)
|
||||
@ -196,7 +196,7 @@ namespace NSStreamReader
|
||||
double dScaleX = 625 * 2.54 ;
|
||||
//1/576 inch = 72/576 pt = 360000 *72 * 2.54 /(72*576) emu
|
||||
|
||||
DWORD dwFlags = StreamUtils::ReadDWORD(pStream);
|
||||
_UINT32 dwFlags = StreamUtils::ReadDWORD(pStream);
|
||||
BYTE flag1 = (BYTE)(dwFlags);
|
||||
BYTE flag2 = (BYTE)(dwFlags >> 8);
|
||||
BYTE flag3 = (BYTE)(dwFlags >> 16);
|
||||
@ -272,7 +272,7 @@ void CTextPFRun_ppt::LoadFromStream(POLE::Stream* pStream, bool bIsIndentation)
|
||||
m_lLevel = 0x0004;
|
||||
}
|
||||
|
||||
DWORD dwFlags = StreamUtils::ReadDWORD(pStream);
|
||||
_UINT32 dwFlags = StreamUtils::ReadDWORD(pStream);
|
||||
BYTE flag1 = (BYTE)(dwFlags);
|
||||
BYTE flag2 = (BYTE)(dwFlags >> 8);
|
||||
BYTE flag3 = (BYTE)(dwFlags >> 16);
|
||||
@ -441,7 +441,7 @@ void CTextCFRun_ppt::LoadFromStream(POLE::Stream* pStream, bool bIsIndentation)
|
||||
m_lCount = StreamUtils::ReadLONG(pStream);
|
||||
}
|
||||
|
||||
DWORD dwFlags = StreamUtils::ReadDWORD(pStream);
|
||||
_UINT32 dwFlags = StreamUtils::ReadDWORD(pStream);
|
||||
BYTE flag1 = (BYTE)(dwFlags);
|
||||
BYTE flag2 = (BYTE)(dwFlags >> 8);
|
||||
BYTE flag3 = (BYTE)(dwFlags >> 16);
|
||||
|
||||
@ -127,34 +127,34 @@ namespace Gdiplus
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DWORD iType; // Record type EMR_HEADER
|
||||
DWORD nSize; // Record size in bytes. This may be greater
|
||||
_UINT32 iType; // Record type EMR_HEADER
|
||||
_UINT32 nSize; // Record size in bytes. This may be greater
|
||||
// than the sizeof(ENHMETAHEADER).
|
||||
RECT rclBounds; // Inclusive-inclusive bounds in device units
|
||||
RECT rclFrame; // Inclusive-inclusive Picture Frame .01mm unit
|
||||
DWORD dSignature; // Signature. Must be ENHMETA_SIGNATURE.
|
||||
DWORD nVersion; // Version number
|
||||
DWORD nBytes; // Size of the metafile in bytes
|
||||
DWORD nRecords; // Number of records in the metafile
|
||||
_UINT32 dSignature; // Signature. Must be ENHMETA_SIGNATURE.
|
||||
_UINT32 nVersion; // Version number
|
||||
_UINT32 nBytes; // Size of the metafile in bytes
|
||||
_UINT32 nRecords; // Number of records in the metafile
|
||||
WORD nHandles; // Number of handles in the handle table
|
||||
// Handle index zero is reserved.
|
||||
WORD sReserved; // Reserved. Must be zero.
|
||||
DWORD nDescription; // Number of chars in the unicode desc string
|
||||
_UINT32 nDescription; // Number of chars in the unicode desc string
|
||||
// This is 0 if there is no description string
|
||||
DWORD offDescription; // Offset to the metafile description record.
|
||||
_UINT32 offDescription; // Offset to the metafile description record.
|
||||
// This is 0 if there is no description string
|
||||
DWORD nPalEntries; // Number of entries in the metafile palette.
|
||||
_UINT32 nPalEntries; // Number of entries in the metafile palette.
|
||||
SIZE szlDevice; // Size of the reference device in pels
|
||||
SIZE szlMillimeters; // Size of the reference device in millimeters
|
||||
} ENHMETAHEADER3;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DWORD Key; // GDIP_WMF_PLACEABLEKEY
|
||||
_UINT32 Key; // GDIP_WMF_PLACEABLEKEY
|
||||
short Hmf; // Metafile HANDLE number (always 0)
|
||||
PWMFRect16 BoundingBox; // Coordinates in metafile units
|
||||
short Inch; // Number of metafile units per inch
|
||||
DWORD Reserved; // Reserved (always 0)
|
||||
_UINT32 Reserved; // Reserved (always 0)
|
||||
short Checksum; // Checksum value for previous 10 WORDs
|
||||
}WmfPlaceableFileHeader;
|
||||
}
|
||||
@ -163,10 +163,10 @@ class CMetaHeader
|
||||
{
|
||||
|
||||
public:
|
||||
DWORD cbSize;
|
||||
_UINT32 cbSize;
|
||||
RECT rcBounds;
|
||||
POINT ptSize;
|
||||
DWORD cbSave;
|
||||
_UINT32 cbSave;
|
||||
BYTE compression;
|
||||
BYTE filter;
|
||||
|
||||
|
||||
@ -319,7 +319,7 @@ IRecord* CreateByType(SRecordHeader oHeader)
|
||||
#ifdef _DEBUG
|
||||
char str[1024]={};
|
||||
sprintf(str, "Unknown record type: %xd\t" , oHeader.RecType);
|
||||
std::cout << str << GetRecordName((DWORD)oHeader.RecType) << "\n";
|
||||
std::cout << str << GetRecordName((_UINT32)oHeader.RecType) << "\n";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -146,7 +146,6 @@ class IRecord
|
||||
public:
|
||||
SRecordHeader m_oHeader;
|
||||
|
||||
public:
|
||||
virtual ~IRecord(){}
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, const CFStreamPtr &pStream) = 0;
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream) = 0;
|
||||
@ -186,10 +185,8 @@ IRecord* CreateByType(SRecordHeader oHeader);
|
||||
|
||||
class CRecordsContainer : public CUnknownRecord
|
||||
{
|
||||
protected:
|
||||
std::vector<IRecord*> m_arRecords;
|
||||
|
||||
public:
|
||||
std::vector<IRecord*> m_arRecords;
|
||||
|
||||
CRecordsContainer() : m_arRecords()
|
||||
{
|
||||
|
||||
@ -113,7 +113,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::wstring GetFileNamePicture(DWORD lIndex)
|
||||
std::wstring GetFileNamePicture(_UINT32 lIndex)
|
||||
{
|
||||
std::map<int, std::wstring>::iterator pic = m_mapFilePictures->find(lIndex);
|
||||
|
||||
|
||||
@ -41,8 +41,8 @@
|
||||
class CTextFullSettings;
|
||||
struct SSlidePersist
|
||||
{
|
||||
DWORD m_nPsrRef;
|
||||
DWORD m_nSlideID;
|
||||
_UINT32 m_nPsrRef;
|
||||
_UINT32 m_nSlideID;
|
||||
|
||||
std::vector<CTextFullSettings> m_arTextAttrs;
|
||||
|
||||
|
||||
@ -234,7 +234,7 @@ namespace Animations
|
||||
return std::wstring (_T(""));
|
||||
}
|
||||
|
||||
std::wstring Helpers::GetEffectTypeOfGroup ( DWORD Value )
|
||||
std::wstring Helpers::GetEffectTypeOfGroup ( _UINT32 Value )
|
||||
{
|
||||
if ( 0x00000001 == Value )
|
||||
return std::wstring ( _T("Entrance") );
|
||||
@ -252,7 +252,7 @@ namespace Animations
|
||||
return std::wstring ( _T("") );
|
||||
}
|
||||
// the corresponding effect type is an entrance or an exit effect
|
||||
std::wstring Helpers::GetEffectEntranceOrExitNameByID ( DWORD EffectID )
|
||||
std::wstring Helpers::GetEffectEntranceOrExitNameByID ( _UINT32 EffectID )
|
||||
{
|
||||
switch ( EffectID )
|
||||
{
|
||||
@ -322,7 +322,7 @@ namespace Animations
|
||||
}
|
||||
|
||||
// the corresponding effect type is an emphasis effect
|
||||
std::wstring Helpers::GetEffectEmphasisNameByID ( DWORD EffectID )
|
||||
std::wstring Helpers::GetEffectEmphasisNameByID ( _UINT32 EffectID )
|
||||
{
|
||||
switch ( EffectID )
|
||||
{
|
||||
@ -368,7 +368,7 @@ namespace Animations
|
||||
return std::wstring(_T("Unknown EffectID"));
|
||||
}
|
||||
// the corresponding effect type is a motion path effect
|
||||
std::wstring Helpers::GetEffectMotionPathNameByID ( DWORD EffectID )
|
||||
std::wstring Helpers::GetEffectMotionPathNameByID ( _UINT32 EffectID )
|
||||
{
|
||||
switch ( EffectID )
|
||||
{
|
||||
@ -443,7 +443,7 @@ namespace Animations
|
||||
return std::wstring(_T("Unknown EffectID"));
|
||||
}
|
||||
|
||||
std::wstring Helpers::GetEffectNameByID ( DWORD EffectType, DWORD EffectID )
|
||||
std::wstring Helpers::GetEffectNameByID ( _UINT32 EffectType, _UINT32 EffectID )
|
||||
{
|
||||
switch ( EffectType )
|
||||
{
|
||||
|
||||
@ -44,8 +44,8 @@ inline int sort (const long* a, const long* b) { return *a > *b ? 1 : -1; }
|
||||
#if !defined(_WIN32) && !defined (_WIN64)
|
||||
|
||||
typedef struct _FILETIME {
|
||||
DWORD dwLowDateTime;
|
||||
DWORD dwHighDateTime;
|
||||
_UINT32 dwLowDateTime;
|
||||
_UINT32 dwHighDateTime;
|
||||
} FILETIME;
|
||||
|
||||
typedef struct _SYSTEMTIME {
|
||||
@ -108,7 +108,7 @@ namespace Animations
|
||||
RT_TimeSlaveContainer = 0xF145
|
||||
};
|
||||
|
||||
enum TimeNodeTypeEnum : DWORD
|
||||
enum TimeNodeTypeEnum : _UINT32
|
||||
{
|
||||
TL_TNT_Parallel = 0x00000000, // Parallel time node whose child nodes can start simultaneously.
|
||||
TL_TNT_Sequential = 0x00000001, // Sequential time node whose child nodes can only start sequentially and each child can only start after its previous sibling has started.
|
||||
@ -145,7 +145,7 @@ namespace Animations
|
||||
TL_TPID_ZoomToFullScreen = 0x0000001A // Whether to zoom a media object to full screen.
|
||||
};
|
||||
|
||||
enum TriggerObjectEnum : DWORD
|
||||
enum TriggerObjectEnum : _UINT32
|
||||
{
|
||||
TL_TOT_None = 0x00000000, // None.
|
||||
TL_TOT_VisualElement = 0x00000001, // An animatable object.
|
||||
@ -153,7 +153,7 @@ namespace Animations
|
||||
TL_TOT_RuntimeNodeRef = 0x00000003 // Runtime child time nodes.
|
||||
};
|
||||
|
||||
enum TimeVisualElementEnum : DWORD
|
||||
enum TimeVisualElementEnum : _UINT32
|
||||
{
|
||||
TL_TVET_Shape = 0x00000000, // Applies to the shape and all its text.
|
||||
TL_TVET_Page = 0x00000001, // Applies to the slide.
|
||||
@ -165,13 +165,13 @@ namespace Animations
|
||||
TL_TVET_AllTextRange = 0x00000008 // Applies to all text of the shape
|
||||
};
|
||||
|
||||
enum TimeAnimateBehaviorValueTypeEnum : DWORD
|
||||
enum TimeAnimateBehaviorValueTypeEnum : _UINT32
|
||||
{
|
||||
TL_TABVT_String = 0x00000000, // Animate text content.
|
||||
TL_TABVT_Number = 0x00000001, // Animate a numeric property.
|
||||
TL_TABVT_Color = 0x00000002 // Animate a color property.
|
||||
};
|
||||
enum ElementTypeEnum : DWORD
|
||||
enum ElementTypeEnum : _UINT32
|
||||
{
|
||||
TL_ET_ShapeType = 0x00000001, // The animation targets a shape or some part of a shape.
|
||||
TL_ET_SoundType = 0x00000002 // The animation targets a sound file that does not correspond to a shape.
|
||||
@ -301,15 +301,15 @@ namespace Animations
|
||||
static std::wstring GetTimeAnimateBehaviorValueTypeEnum ( TimeAnimateBehaviorValueTypeEnum Value );
|
||||
static std::wstring GetAnimationClassName ( AnimationsClassType Value );
|
||||
|
||||
static std::wstring GetEffectTypeOfGroup ( DWORD Value );
|
||||
static std::wstring GetEffectTypeOfGroup ( _UINT32 Value );
|
||||
// the corresponding effect type is an entrance or an exit effect
|
||||
static std::wstring GetEffectEntranceOrExitNameByID ( DWORD EffectID );
|
||||
static std::wstring GetEffectEntranceOrExitNameByID ( _UINT32 EffectID );
|
||||
// the corresponding effect type is an emphasis effect
|
||||
static std::wstring GetEffectEmphasisNameByID ( DWORD EffectID );
|
||||
static std::wstring GetEffectEmphasisNameByID ( _UINT32 EffectID );
|
||||
// the corresponding effect type is a motion path effect
|
||||
static std::wstring GetEffectMotionPathNameByID ( DWORD EffectID );
|
||||
static std::wstring GetEffectMotionPathNameByID ( _UINT32 EffectID );
|
||||
|
||||
static std::wstring GetEffectNameByID ( DWORD EffectType, DWORD EffectID );
|
||||
static std::wstring GetEffectNameByID ( _UINT32 EffectType, _UINT32 EffectID );
|
||||
};
|
||||
}
|
||||
|
||||
@ -329,7 +329,7 @@ namespace Animations
|
||||
buildId = StreamUtils::ReadDWORD ( pStream );
|
||||
shapeIdRef = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
DWORD Value = StreamUtils::ReadDWORD ( pStream );
|
||||
_UINT32 Value = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
fExpanded = ( 0x01 == ( 0x01 & ((BYTE)Value) ) );
|
||||
fUIExpanded = ( 0x02 == ( 0x02 & ((BYTE)Value) ) );
|
||||
@ -339,9 +339,9 @@ namespace Animations
|
||||
|
||||
public:
|
||||
|
||||
DWORD buildType; // 1 - Paragraph build type, 2 - Chart build type, 3 - Diagram build type
|
||||
DWORD buildId;
|
||||
DWORD shapeIdRef;
|
||||
_UINT32 buildType; // 1 - Paragraph build type, 2 - Chart build type, 3 - Diagram build type
|
||||
_UINT32 buildId;
|
||||
_UINT32 shapeIdRef;
|
||||
|
||||
bool fExpanded;
|
||||
bool fUIExpanded;
|
||||
@ -359,7 +359,7 @@ namespace Animations
|
||||
paraBuild = StreamUtils::ReadDWORD ( pStream );
|
||||
buildLevel = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
DWORD Value = StreamUtils::ReadDWORD ( pStream );
|
||||
_UINT32 Value = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
fAnimBackground = ( 0x01 == ( 0x01 & ((BYTE)Value) ) );
|
||||
fReverse = ( 0x02 == ( 0x02 & ((BYTE)Value) ) );
|
||||
@ -379,21 +379,21 @@ namespace Animations
|
||||
|
||||
public:
|
||||
|
||||
DWORD paraBuild; // 0 - All paragraphs in the shape animate at the same time.
|
||||
_UINT32 paraBuild; // 0 - All paragraphs in the shape animate at the same time.
|
||||
// 1 - Paragraph levels 1 to n – 1 in the shape animate separately.
|
||||
// All paragraph levels n or greater animate at the same time.
|
||||
// 2 - Applies a custom animation paragraph build type to the
|
||||
// paragraphs of the shape.
|
||||
// 3 - The shape and all paragraphs within the shape animate as one
|
||||
// graphical object.
|
||||
DWORD buildLevel;
|
||||
_UINT32 buildLevel;
|
||||
|
||||
bool fAnimBackground;
|
||||
bool fReverse;
|
||||
bool fUserSetAnimBackground;
|
||||
bool fAutomatic;
|
||||
|
||||
DWORD delayTime;
|
||||
_UINT32 delayTime;
|
||||
};
|
||||
struct LevelInfoAtom : public CUnknownRecord
|
||||
{
|
||||
@ -410,7 +410,7 @@ namespace Animations
|
||||
|
||||
virtual bool IsCorrect () { return m_oHeader.RecVersion == 0x0 && m_oHeader.RecInstance == 0x0 && m_oHeader.RecType == RT_LevelInfoAtom && m_oHeader.RecLen == 0x00000004; }
|
||||
|
||||
DWORD level;
|
||||
_UINT32 level;
|
||||
};
|
||||
|
||||
struct ParaBuildLevel
|
||||
@ -640,7 +640,7 @@ namespace Animations
|
||||
public:
|
||||
|
||||
TimeVariantTypeEnum m_Type;
|
||||
DWORD m_Value;
|
||||
_UINT32 m_Value;
|
||||
};
|
||||
|
||||
struct TimeVariantFloat : public TimeVariant
|
||||
@ -746,7 +746,7 @@ namespace Animations
|
||||
// structures for ExtTimeNodeContainer
|
||||
struct TimeNodeAtom : public CUnknownRecord
|
||||
{
|
||||
static const DWORD RT_TimeSequenceData = 0xF141;
|
||||
static const _UINT32 RT_TimeSequenceData = 0xF141;
|
||||
|
||||
virtual void ReadFromStream ( SRecordHeader & oHeader, POLE::Stream* pStream )
|
||||
{
|
||||
@ -757,7 +757,7 @@ namespace Animations
|
||||
#endif
|
||||
// LONG lPos = 0; StreamUtils::StreamPosition(lPos, pStream);
|
||||
|
||||
StreamUtils::StreamSkip ( sizeof ( DWORD ), pStream );
|
||||
StreamUtils::StreamSkip ( sizeof ( _UINT32 ), pStream );
|
||||
|
||||
// 0x00000000 Does not restart.
|
||||
// 0x00000001 Can restart at any time.
|
||||
@ -775,14 +775,14 @@ namespace Animations
|
||||
// 0x00000004 Same as 0x00000001.
|
||||
m_dwFill = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
StreamUtils::StreamSkip ( sizeof ( DWORD ), pStream );
|
||||
StreamUtils::StreamSkip ( sizeof ( DWORD ), pStream );
|
||||
StreamUtils::StreamSkip ( sizeof ( _UINT32 ), pStream );
|
||||
StreamUtils::StreamSkip ( sizeof ( _UINT32 ), pStream );
|
||||
|
||||
// duration: 0xFFFFFFFF specifies that the duration of the time node is infinite,
|
||||
// and that its actual duration is determined by the durations of its child nodes.
|
||||
m_nDuration = StreamUtils::ReadLONG ( pStream );
|
||||
|
||||
DWORD Value = StreamUtils::ReadDWORD ( pStream );
|
||||
_UINT32 Value = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
m_bFillProperty = ( 0x01 == ( 0x01 & ((BYTE)Value) ) );
|
||||
m_bRestartProperty = ( 0x02 == ( 0x02 & ((BYTE)Value) ) );
|
||||
@ -797,9 +797,9 @@ namespace Animations
|
||||
|
||||
public:
|
||||
|
||||
DWORD m_dwRestart;
|
||||
_UINT32 m_dwRestart;
|
||||
TimeNodeTypeEnum m_dwType;
|
||||
DWORD m_dwFill;
|
||||
_UINT32 m_dwFill;
|
||||
long m_nDuration;
|
||||
|
||||
bool m_bFillProperty;
|
||||
@ -823,9 +823,9 @@ namespace Animations
|
||||
m_nNextAction = StreamUtils::ReadDWORD ( pStream );
|
||||
m_nPreviousAction = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
StreamUtils::StreamSkip ( sizeof ( DWORD ), pStream );
|
||||
StreamUtils::StreamSkip ( sizeof ( _UINT32 ), pStream );
|
||||
|
||||
DWORD Value = StreamUtils::ReadDWORD ( pStream );
|
||||
_UINT32 Value = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
m_bConcurrencyPropertyUsed = ( 0x01 == ( 0x01 & ((BYTE)Value) ) );
|
||||
m_bNextActionPropertyUsed = ( 0x02 == ( 0x02 & ((BYTE)Value) ) );
|
||||
@ -844,9 +844,9 @@ namespace Animations
|
||||
|
||||
public:
|
||||
|
||||
DWORD m_nConcurrency;
|
||||
DWORD m_nNextAction;
|
||||
DWORD m_nPreviousAction;
|
||||
_UINT32 m_nConcurrency;
|
||||
_UINT32 m_nNextAction;
|
||||
_UINT32 m_nPreviousAction;
|
||||
|
||||
bool m_bConcurrencyPropertyUsed;
|
||||
bool m_bNextActionPropertyUsed;
|
||||
@ -941,7 +941,7 @@ namespace Animations
|
||||
struct TimePropertyList4TimeNodeContainer : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
//static const DWORD RT_TimePropertyList = 0xF13D; // Specifies a TimePropertyList4TimeNodeContainer or TimePropertyList4TimeBehavior.
|
||||
//static const _UINT32 RT_TimePropertyList = 0xF13D; // Specifies a TimePropertyList4TimeNodeContainer or TimePropertyList4TimeBehavior.
|
||||
|
||||
TimePropertyList4TimeNodeContainer ()
|
||||
{
|
||||
@ -1060,7 +1060,7 @@ namespace Animations
|
||||
|
||||
// helper
|
||||
|
||||
inline const DWORD& GetEffectNodeType () const
|
||||
inline const _UINT32& GetEffectNodeType () const
|
||||
{
|
||||
return m_EffectNodeType.m_Value;
|
||||
}
|
||||
@ -1081,7 +1081,7 @@ namespace Animations
|
||||
struct TimePropertyList4TimeBehavior : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
//static const DWORD RT_TimePropertyList = 0xF13D; // Specifies a TimePropertyList4TimeNodeContainer or TimePropertyList4TimeBehavior.
|
||||
//static const _UINT32 RT_TimePropertyList = 0xF13D; // Specifies a TimePropertyList4TimeNodeContainer or TimePropertyList4TimeBehavior.
|
||||
|
||||
TimePropertyList4TimeBehavior ()
|
||||
{
|
||||
@ -1151,9 +1151,9 @@ namespace Animations
|
||||
|
||||
TimeVisualElementEnum m_Type;
|
||||
ElementTypeEnum m_RefType;
|
||||
DWORD m_nObjectIdRef; // ShapeIdRef || SoundIdRef
|
||||
DWORD m_nData1;
|
||||
DWORD m_nData2;
|
||||
_UINT32 m_nObjectIdRef; // ShapeIdRef || SoundIdRef
|
||||
_UINT32 m_nData1;
|
||||
_UINT32 m_nData2;
|
||||
};
|
||||
|
||||
struct VisualPageAtom : public CUnknownRecord
|
||||
@ -1245,7 +1245,7 @@ namespace Animations
|
||||
#endif
|
||||
// LONG lPos = 0; StreamUtils::StreamPosition ( lPos, pStream );
|
||||
|
||||
DWORD dwFlags = StreamUtils::ReadDWORD ( pStream );
|
||||
_UINT32 dwFlags = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
m_bAdditivePropertyUsed = ( 0x01 == ( 0x01 & ((BYTE)dwFlags) ) );
|
||||
m_bAttributeNamesPropertyUsed = ( 0x04 == ( 0x04 & ((BYTE)dwFlags) ) );
|
||||
@ -1270,9 +1270,9 @@ namespace Animations
|
||||
bool m_bAdditivePropertyUsed;
|
||||
bool m_bAttributeNamesPropertyUsed;
|
||||
|
||||
DWORD m_nBehaviorAdditive;
|
||||
DWORD m_nBehaviorAccumulate;
|
||||
DWORD m_nBehaviorTransform;
|
||||
_UINT32 m_nBehaviorAdditive;
|
||||
_UINT32 m_nBehaviorAccumulate;
|
||||
_UINT32 m_nBehaviorTransform;
|
||||
};
|
||||
|
||||
struct TimeBehaviorContainer : public CUnknownRecord
|
||||
@ -1428,7 +1428,7 @@ namespace Animations
|
||||
#endif
|
||||
// LONG lPos = 0; StreamUtils::StreamPosition ( lPos, pStream );
|
||||
|
||||
DWORD dwFlags = StreamUtils::ReadDWORD ( pStream );
|
||||
_UINT32 dwFlags = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
m_bTransitionPropertyUsed = ( 0x01 == ( 0x01 & ((BYTE)dwFlags) ) );
|
||||
m_bTypePropertyUsed = ( 0x02 == ( 0x02 & ((BYTE)dwFlags) ) );
|
||||
@ -1454,7 +1454,7 @@ namespace Animations
|
||||
bool m_bProgressPropertyUsed;
|
||||
bool m_bRuntimeContextObsolete;
|
||||
|
||||
DWORD m_nEffectTransition;
|
||||
_UINT32 m_nEffectTransition;
|
||||
};
|
||||
|
||||
struct TimeEffectBehaviorContainer : public CUnknownRecord
|
||||
@ -1553,8 +1553,8 @@ namespace Animations
|
||||
public:
|
||||
|
||||
TriggerObjectEnum m_TriggerObject;
|
||||
DWORD m_nTriggerEvent;
|
||||
DWORD m_nID;
|
||||
_UINT32 m_nTriggerEvent;
|
||||
_UINT32 m_nID;
|
||||
LONG m_nTimeDelay;
|
||||
};
|
||||
|
||||
@ -1614,7 +1614,7 @@ namespace Animations
|
||||
iterateDirection = StreamUtils::ReadDWORD ( pStream );
|
||||
iterateIntervalType = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
DWORD Value = StreamUtils::ReadDWORD ( pStream );
|
||||
_UINT32 Value = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
fIterateDirectionPropertyUsed = ( 0x01 == ( 0x01 & ((BYTE)Value) ) );
|
||||
fIterateTypePropertyUsed = ( 0x02 == ( 0x02 & ((BYTE)Value) ) );
|
||||
@ -1648,7 +1648,7 @@ namespace Animations
|
||||
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
|
||||
if( IsCorrect () == false ) return;
|
||||
#endif
|
||||
DWORD Value = StreamUtils::ReadDWORD ( pStream );
|
||||
_UINT32 Value = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
m_bByPropertyUsed = ( 0x01 == ( 0x01 & ((BYTE)Value) ) );
|
||||
m_bFromPropertyUsed = ( 0x02 == ( 0x02 & ((BYTE)Value) ) );
|
||||
@ -1692,7 +1692,7 @@ namespace Animations
|
||||
FLOAT m_nYFROM;
|
||||
FLOAT m_nXTO;
|
||||
FLOAT m_nYTO;
|
||||
DWORD m_nBehaviorOrigin;
|
||||
_UINT32 m_nBehaviorOrigin;
|
||||
};
|
||||
|
||||
struct TimeMotionBehaviorContainer : public CUnknownRecord
|
||||
@ -1758,7 +1758,7 @@ namespace Animations
|
||||
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
|
||||
if( IsCorrect () == false ) return;
|
||||
#endif
|
||||
DWORD Value = StreamUtils::ReadDWORD ( pStream );
|
||||
_UINT32 Value = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
m_bToPropertyUsed = ( 0x01 == ( 0x01 & ((BYTE)Value) ) );
|
||||
m_bValueTypePropertyUsed = ( 0x02 == ( 0x02 & ((BYTE)Value) ) );
|
||||
@ -1834,7 +1834,7 @@ namespace Animations
|
||||
#endif
|
||||
m_nCalcMode = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
DWORD Value = StreamUtils::ReadDWORD ( pStream );
|
||||
_UINT32 Value = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
m_bByPropertyUsed = ( 0x01 == ( 0x01 & ((BYTE)Value) ) );
|
||||
m_bFromPropertyUsed = ( 0x02 == ( 0x02 & ((BYTE)Value) ) );
|
||||
@ -1856,7 +1856,7 @@ namespace Animations
|
||||
|
||||
public:
|
||||
|
||||
DWORD m_nCalcMode;
|
||||
_UINT32 m_nCalcMode;
|
||||
|
||||
bool m_bByPropertyUsed;
|
||||
bool m_bFromPropertyUsed;
|
||||
@ -2043,7 +2043,7 @@ namespace Animations
|
||||
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
|
||||
if( IsCorrect () == false ) return;
|
||||
#endif
|
||||
DWORD src = StreamUtils::ReadDWORD ( pStream );
|
||||
_UINT32 src = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
fByPropertyUsed = ( 0x01 == ( 0x01 & ((BYTE)src) ) );
|
||||
fFromPropertyUsed = ( 0x02 == ( 0x02 & ((BYTE)src) ) );
|
||||
@ -2069,7 +2069,7 @@ namespace Animations
|
||||
float fBy;
|
||||
float fFrom;
|
||||
float fTo;
|
||||
DWORD rotationDirection; // 0 - rotate clockwise, 1 - rotate counter clockwise
|
||||
_UINT32 rotationDirection; // 0 - rotate clockwise, 1 - rotate counter clockwise
|
||||
};
|
||||
struct TimeRotationBehaviorContainer : public CUnknownRecord
|
||||
{
|
||||
@ -2110,7 +2110,7 @@ namespace Animations
|
||||
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
|
||||
if( IsCorrect () == false ) return;
|
||||
#endif
|
||||
DWORD src = StreamUtils::ReadDWORD ( pStream );
|
||||
_UINT32 src = StreamUtils::ReadDWORD ( pStream );
|
||||
|
||||
fByPropertyUsed = ( 0x01 == ( 0x01 & ((BYTE)src) ) );
|
||||
fFromPropertyUsed = ( 0x02 == ( 0x02 & ((BYTE)src) ) );
|
||||
@ -2178,10 +2178,10 @@ namespace Animations
|
||||
{
|
||||
struct TimeAnimateColorBy
|
||||
{
|
||||
DWORD model; // 0 - RGB, 1 - HSL, 2 - IndexScheme
|
||||
DWORD component0;
|
||||
DWORD component1;
|
||||
DWORD component2;
|
||||
_UINT32 model; // 0 - RGB, 1 - HSL, 2 - IndexScheme
|
||||
_UINT32 component0;
|
||||
_UINT32 component1;
|
||||
_UINT32 component2;
|
||||
|
||||
inline unsigned long FRGB (BYTE alpha = 0xFF) //
|
||||
{
|
||||
@ -2191,10 +2191,10 @@ namespace Animations
|
||||
|
||||
struct TimeAnimateColor
|
||||
{
|
||||
DWORD model; // 0 - RGB, 2 - IndexScheme
|
||||
DWORD red;
|
||||
DWORD green;
|
||||
DWORD blue;
|
||||
_UINT32 model; // 0 - RGB, 2 - IndexScheme
|
||||
_UINT32 red;
|
||||
_UINT32 green;
|
||||
_UINT32 blue;
|
||||
|
||||
inline unsigned long FRGB (BYTE alpha = 0xFF)
|
||||
{
|
||||
@ -2230,7 +2230,7 @@ namespace Animations
|
||||
|
||||
public:
|
||||
|
||||
DWORD flag;
|
||||
_UINT32 flag;
|
||||
|
||||
bool fByPropertyUsed;
|
||||
bool fFromPropertyUsed;
|
||||
@ -2785,7 +2785,7 @@ namespace Animations
|
||||
|
||||
struct SlideTime10Atom : public CUnknownRecord
|
||||
{
|
||||
static const DWORD RT_SlideTime10Atom = 0x2EEB;
|
||||
static const _UINT32 RT_SlideTime10Atom = 0x2EEB;
|
||||
|
||||
virtual void ReadFromStream ( SRecordHeader & oHeader, POLE::Stream* pStream )
|
||||
{
|
||||
@ -2820,7 +2820,7 @@ namespace Animations
|
||||
|
||||
struct SlideFlags10Atom : public CUnknownRecord
|
||||
{
|
||||
static const DWORD RT_SlideFlags10Atom = 0x2EEA;
|
||||
static const _UINT32 RT_SlideFlags10Atom = 0x2EEA;
|
||||
|
||||
virtual void ReadFromStream ( SRecordHeader & oHeader, POLE::Stream* pStream )
|
||||
{
|
||||
@ -2829,7 +2829,7 @@ namespace Animations
|
||||
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
|
||||
if( IsCorrect () == false ) return;
|
||||
#endif
|
||||
DWORD Value = 0L;
|
||||
_UINT32 Value = 0L;
|
||||
pStream->read ((unsigned char*) &Value, sizeof ( Value ));
|
||||
|
||||
m_bPreserveMaster = ( 0x01 == ( 0x01 & ((BYTE)Value) ) );
|
||||
@ -2852,7 +2852,7 @@ namespace Animations
|
||||
|
||||
struct HashCode10Atom : public CUnknownRecord
|
||||
{
|
||||
//static const DWORD RT_HashCodeAtom = 0x2B00;
|
||||
//static const _UINT32 RT_HashCodeAtom = 0x2B00;
|
||||
|
||||
virtual void ReadFromStream ( SRecordHeader & oHeader, POLE::Stream* pStream )
|
||||
{
|
||||
@ -2861,8 +2861,8 @@ namespace Animations
|
||||
#if defined(_DEBUG) && (defined(_WIN32) || defined(_WIN64))
|
||||
if( IsCorrect () == false ) return;
|
||||
#endif
|
||||
DWORD Value;
|
||||
pStream->read ( (unsigned char*) &Value, sizeof ( DWORD ) );
|
||||
_UINT32 Value;
|
||||
pStream->read ( (unsigned char*) &Value, sizeof ( _UINT32 ) );
|
||||
}
|
||||
|
||||
virtual bool IsCorrect ( )
|
||||
@ -2880,7 +2880,7 @@ namespace Animations
|
||||
{
|
||||
typedef NSPresentationEditor::CAnimationSimple Effect;
|
||||
typedef std::vector <Effect> Effects;
|
||||
typedef std::map<DWORD,Effects*> EffectsMap;
|
||||
typedef std::map<_UINT32,Effects*> EffectsMap;
|
||||
typedef std::vector <double> TimeArray;
|
||||
}
|
||||
|
||||
@ -3302,7 +3302,7 @@ namespace Animations
|
||||
if (mSearch == m_oAnimation.end())
|
||||
{
|
||||
pEffects = new Effects ();
|
||||
m_oAnimation.insert(std::pair<DWORD,Effects*>( oEffect.m_nRefID, pEffects));
|
||||
m_oAnimation.insert(std::pair<_UINT32,Effects*>( oEffect.m_nRefID, pEffects));
|
||||
}else
|
||||
pEffects = mSearch->second;
|
||||
|
||||
@ -3582,7 +3582,7 @@ namespace Animations
|
||||
|
||||
sort(m_arParIndexer.begin(), m_arParIndexer.end());
|
||||
|
||||
for (std::map<DWORD, Effects*>::iterator pPair = m_oAnimation.begin(); pPair != m_oAnimation.end(); ++pPair)
|
||||
for (std::map<_UINT32, Effects*>::iterator pPair = m_oAnimation.begin(); pPair != m_oAnimation.end(); ++pPair)
|
||||
{
|
||||
Effects* arEffects = pPair->second;
|
||||
if (arEffects)
|
||||
@ -3683,7 +3683,7 @@ namespace Animations
|
||||
//
|
||||
inline void Clear ()
|
||||
{
|
||||
for (std::map<DWORD,Effects*>::iterator pPair = m_oAnimation.begin(); pPair != m_oAnimation.end(); ++pPair)
|
||||
for (std::map<_UINT32,Effects*>::iterator pPair = m_oAnimation.begin(); pPair != m_oAnimation.end(); ++pPair)
|
||||
{
|
||||
RELEASEOBJECT(pPair->second);
|
||||
}
|
||||
|
||||
@ -38,8 +38,8 @@ public:
|
||||
CRecordEncryptedSummary(){}
|
||||
~CRecordEncryptedSummary(){}
|
||||
|
||||
DWORD StreamOffset;
|
||||
DWORD StreamSize;
|
||||
_UINT32 StreamOffset;
|
||||
_UINT32 StreamSize;
|
||||
unsigned short Block;
|
||||
unsigned char NameSize;
|
||||
bool fStream;
|
||||
|
||||
@ -38,10 +38,10 @@
|
||||
class CRecordCurrentUserAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
DWORD m_nSize; // must be 0x00000014
|
||||
DWORD m_nToken; // encrypt or not
|
||||
_UINT32 m_nSize; // must be 0x00000014
|
||||
_UINT32 m_nToken; // encrypt or not
|
||||
|
||||
DWORD m_nOffsetToCurEdit; // offset to UserEditAtom in PPTDocStream
|
||||
_UINT32 m_nOffsetToCurEdit; // offset to UserEditAtom in PPTDocStream
|
||||
|
||||
USHORT m_nLenUserName;
|
||||
|
||||
@ -52,7 +52,7 @@ public:
|
||||
std::string m_strANSIUserName;
|
||||
std::wstring m_strUNICODEUserName;
|
||||
|
||||
DWORD m_nRelVersion; // 0x00000008 or 0x00000009
|
||||
_UINT32 m_nRelVersion; // 0x00000008 or 0x00000009
|
||||
|
||||
|
||||
CRecordCurrentUserAtom() : m_nToken(0)
|
||||
|
||||
@ -53,8 +53,6 @@ public:
|
||||
|
||||
BOOL1 m_bShowComments;
|
||||
|
||||
public:
|
||||
|
||||
CRecordDocumentAtom()
|
||||
{
|
||||
}
|
||||
|
||||
@ -218,11 +218,11 @@ void CRecordOfficeArtBlip::ReadFromStream(SRecordHeader & oHeader, POLE::Stream*
|
||||
{
|
||||
WORD vtType = 0x4D42;
|
||||
fileImage.WriteFile((void*)&vtType, 2);
|
||||
DWORD dwLen = oHeader.RecLen - lOffset;
|
||||
_UINT32 dwLen = oHeader.RecLen - lOffset;
|
||||
fileImage.WriteFile((void*)&dwLen, 4);
|
||||
DWORD dwRes = 0;
|
||||
_UINT32 dwRes = 0;
|
||||
fileImage.WriteFile((void*)&dwRes, 4);
|
||||
DWORD dwOffset = 2;
|
||||
_UINT32 dwOffset = 2;
|
||||
fileImage.WriteFile((void*)&dwOffset, 4);
|
||||
}
|
||||
fileImage.WriteFile((void*)pImage, oHeader.RecLen - lOffset);
|
||||
|
||||
@ -52,13 +52,13 @@ public:
|
||||
|
||||
pArray->clear();
|
||||
|
||||
std::map<DWORD, int> image_map;
|
||||
std::map<_UINT32, int> image_map;
|
||||
for (size_t nIndex = 0; nIndex < m_arRecords.size(); ++nIndex)
|
||||
{
|
||||
CRecordBlipStoreEntry* pEntry = dynamic_cast<CRecordBlipStoreEntry*>(m_arRecords[nIndex]);
|
||||
if (NULL != pEntry)
|
||||
{
|
||||
image_map.insert(std::pair<DWORD, int>(pEntry->m_nFoDelay, pArray->size()));
|
||||
image_map.insert(std::pair<_UINT32, int>(pEntry->m_nFoDelay, pArray->size()));
|
||||
|
||||
int offset = pEntry->m_nFoDelay;
|
||||
if (0 == pEntry->m_oHeader.RecInstance) offset = -1;
|
||||
|
||||
@ -39,10 +39,10 @@ public:
|
||||
NSOfficeDrawing::BlipType m_btMacOS;
|
||||
|
||||
BYTE m_pRgbUid[16];
|
||||
WORD m_nTag;
|
||||
DWORD m_nSize;
|
||||
DWORD m_nCountRef;
|
||||
DWORD m_nFoDelay;
|
||||
unsigned short m_nTag;
|
||||
_UINT32 m_nSize;
|
||||
_UINT32 m_nCountRef;
|
||||
_UINT32 m_nFoDelay;
|
||||
|
||||
NSOfficeDrawing::BlipUsage m_eUsage;
|
||||
BYTE m_nLenName;
|
||||
|
||||
@ -47,14 +47,5 @@ public:
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
||||
{
|
||||
CRecordsContainer::ReadFromStream(oHeader, pStream);
|
||||
|
||||
std::vector<CRecordGroupShapeContainer*> oArrayGroupContainer;
|
||||
this->GetRecordsByType(&oArrayGroupContainer, false, false);
|
||||
|
||||
int nCountGroups = oArrayGroupContainer.size();
|
||||
for (int i = 0; i < nCountGroups; ++i)
|
||||
{
|
||||
oArrayGroupContainer[i]->SetGroupRect();
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -37,7 +37,6 @@ class CRecordGroupShape : public CUnknownRecord
|
||||
public:
|
||||
RECT m_oBounds;
|
||||
|
||||
public:
|
||||
|
||||
CRecordGroupShape()
|
||||
{
|
||||
@ -55,10 +54,5 @@ public:
|
||||
m_oBounds.top = StreamUtils::ReadLONG(pStream);
|
||||
m_oBounds.right = StreamUtils::ReadLONG(pStream);
|
||||
m_oBounds.bottom = StreamUtils::ReadLONG(pStream);
|
||||
|
||||
m_oBounds.left = (std::max)(0, (int)m_oBounds.left);
|
||||
m_oBounds.top = (std::max)(0, (int)m_oBounds.top);
|
||||
m_oBounds.right = (std::max)(0, (int)m_oBounds.right);
|
||||
m_oBounds.bottom = (std::max)(0, (int)m_oBounds.bottom);
|
||||
}
|
||||
};
|
||||
|
||||
@ -36,132 +36,16 @@
|
||||
|
||||
class CRecordGroupShapeContainer : public CRecordsContainer
|
||||
{
|
||||
private:
|
||||
RECT m_rcGroupBounds;
|
||||
RECT m_rcGroupClientAnchor;
|
||||
|
||||
public:
|
||||
|
||||
CRecordGroupShapeContainer()
|
||||
{
|
||||
m_rcGroupBounds.left = 0;
|
||||
m_rcGroupBounds.top = 0;
|
||||
m_rcGroupBounds.right = 0;
|
||||
m_rcGroupBounds.bottom = 0;
|
||||
|
||||
m_rcGroupClientAnchor.left = 0;
|
||||
m_rcGroupClientAnchor.top = 0;
|
||||
m_rcGroupClientAnchor.right = 0;
|
||||
m_rcGroupClientAnchor.bottom = 0;
|
||||
}
|
||||
|
||||
~CRecordGroupShapeContainer()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
||||
{
|
||||
CRecordsContainer::ReadFromStream(oHeader, pStream);
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream);
|
||||
|
||||
// вот... а теперь нужно взять и узнать перерасчет системы координат
|
||||
std::vector<CRecordShapeContainer*> oArrayShapes;
|
||||
GetRecordsByType(&oArrayShapes, false, false);
|
||||
|
||||
if (!oArrayShapes.empty())
|
||||
oArrayShapes[0]->bGroupShape = true;//тут описание самой группы
|
||||
|
||||
int nIndexBreak = -1;
|
||||
for (size_t nIndex = 0; nIndex < oArrayShapes.size(); ++nIndex)
|
||||
{
|
||||
std::vector<CRecordGroupShape*> oArrayGroupShapes;
|
||||
oArrayShapes[nIndex]->GetRecordsByType(&oArrayGroupShapes, false, true);
|
||||
|
||||
if ( oArrayGroupShapes.size() > 0 )
|
||||
{
|
||||
m_rcGroupBounds.left = oArrayGroupShapes[0]->m_oBounds.left;
|
||||
m_rcGroupBounds.top = oArrayGroupShapes[0]->m_oBounds.top;
|
||||
m_rcGroupBounds.right = oArrayGroupShapes[0]->m_oBounds.right;
|
||||
m_rcGroupBounds.bottom = oArrayGroupShapes[0]->m_oBounds.bottom;
|
||||
|
||||
std::vector<CRecordClientAnchor*> oArrayClients;
|
||||
oArrayShapes[nIndex]->GetRecordsByType(&oArrayClients, false, true);
|
||||
|
||||
if ( oArrayClients.size() > 0)
|
||||
{
|
||||
m_rcGroupClientAnchor.left = (LONG)oArrayClients[0]->m_oBounds.Left;
|
||||
m_rcGroupClientAnchor.top = (LONG)oArrayClients[0]->m_oBounds.Top;
|
||||
m_rcGroupClientAnchor.right = (LONG)oArrayClients[0]->m_oBounds.Right;
|
||||
m_rcGroupClientAnchor.bottom = (LONG)oArrayClients[0]->m_oBounds.Bottom;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<CRecordChildAnchor*> oArrayChilds;
|
||||
oArrayShapes[nIndex]->GetRecordsByType(&oArrayChilds, false, true);
|
||||
|
||||
if ( oArrayChilds.size() > 0)
|
||||
{
|
||||
m_rcGroupClientAnchor.left = (LONG)oArrayChilds[0]->m_oBounds.left;
|
||||
m_rcGroupClientAnchor.top = (LONG)oArrayChilds[0]->m_oBounds.top;
|
||||
m_rcGroupClientAnchor.right = (LONG)oArrayChilds[0]->m_oBounds.right;
|
||||
m_rcGroupClientAnchor.bottom = (LONG)oArrayChilds[0]->m_oBounds.bottom;
|
||||
}
|
||||
}
|
||||
|
||||
nIndexBreak = nIndex;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LONG lW1 = m_rcGroupBounds.right - m_rcGroupBounds.left;
|
||||
LONG lH1 = m_rcGroupBounds.bottom - m_rcGroupBounds.top;
|
||||
LONG lW2 = m_rcGroupClientAnchor.right - m_rcGroupClientAnchor.left;
|
||||
LONG lH2 = m_rcGroupClientAnchor.bottom - m_rcGroupClientAnchor.top;
|
||||
|
||||
bool bIsRecalc = ((lW1 > 0) && (lH1 > 0) && (lW2 > 0) && (lH2 > 0));
|
||||
if (bIsRecalc)
|
||||
{
|
||||
for (size_t nIndex = 0; nIndex < oArrayShapes.size(); ++nIndex)
|
||||
{
|
||||
if (nIndex != nIndexBreak)
|
||||
{
|
||||
oArrayShapes[nIndex]->m_pGroupBounds = &m_rcGroupBounds;
|
||||
oArrayShapes[nIndex]->m_pGroupClientAnchor = &m_rcGroupClientAnchor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SetGroupRect()
|
||||
{
|
||||
std::vector<CRecordGroupShapeContainer*> oArrayGroupContainer;
|
||||
this->GetRecordsByType(&oArrayGroupContainer, false, false);
|
||||
|
||||
int nCountGroups = oArrayGroupContainer.size();
|
||||
for (int i = 0; i < nCountGroups; ++i)
|
||||
{
|
||||
LONG lWidthGroup = m_rcGroupBounds.right - m_rcGroupBounds.left;
|
||||
LONG lHeightGroup = m_rcGroupBounds.bottom - m_rcGroupBounds.top;
|
||||
LONG lWidthClient = m_rcGroupClientAnchor.right - m_rcGroupClientAnchor.left;
|
||||
LONG lHeightClient = m_rcGroupClientAnchor.bottom - m_rcGroupClientAnchor.top;
|
||||
|
||||
bool bIsRecalc = ((lWidthClient > 0) && (lHeightClient > 0) && (lWidthGroup > 0) && (lHeightGroup > 0));
|
||||
|
||||
if (bIsRecalc)
|
||||
{
|
||||
// здесь переводим координаты, чтобы они не зависили от группы
|
||||
double dScaleX = (double)(lWidthClient) / (lWidthGroup);
|
||||
double dScaleY = (double)(lHeightClient) / (lHeightGroup);
|
||||
|
||||
RECT* prcChildAnchor = &oArrayGroupContainer[i]->m_rcGroupClientAnchor;
|
||||
|
||||
prcChildAnchor->left = m_rcGroupClientAnchor.left + (LONG)(dScaleX * (prcChildAnchor->left - m_rcGroupBounds.left));
|
||||
prcChildAnchor->right = m_rcGroupClientAnchor.left + (LONG)(dScaleX * (prcChildAnchor->right - m_rcGroupBounds.left));
|
||||
|
||||
prcChildAnchor->top = m_rcGroupClientAnchor.top + (LONG)(dScaleY * (prcChildAnchor->top - m_rcGroupBounds.top));
|
||||
prcChildAnchor->bottom = m_rcGroupClientAnchor.top + (LONG)(dScaleY * (prcChildAnchor->bottom - m_rcGroupBounds.top));
|
||||
}
|
||||
|
||||
oArrayGroupContainer[i]->SetGroupRect();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
2282
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.cpp
Normal file
2282
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.cpp
Normal file
File diff suppressed because it is too large
Load Diff
2254
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.h
Normal file → Executable file
2254
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.h
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
@ -39,8 +39,6 @@ class CRecordShapeProperties : public CUnknownRecord
|
||||
public:
|
||||
CProperties m_oProperties;
|
||||
|
||||
public:
|
||||
|
||||
CRecordShapeProperties()
|
||||
{
|
||||
}
|
||||
@ -49,7 +47,6 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
||||
{
|
||||
m_oHeader = oHeader;
|
||||
@ -58,7 +55,7 @@ public:
|
||||
StreamUtils::StreamPosition(lPosition, pStream);
|
||||
|
||||
m_oProperties.FromStream(pStream, m_oHeader.RecInstance);
|
||||
DWORD dwLen = m_oProperties.GetLen();
|
||||
_UINT32 dwLen = m_oProperties.GetLen();
|
||||
|
||||
// это на всякий случай, может там напридумывают проперти с complex -
|
||||
// которые мы не поддерживаем...
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
class CRecordExMediaAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
DWORD m_nExObjID;
|
||||
_UINT32 m_nExObjID;
|
||||
|
||||
bool m_bLoop;
|
||||
bool m_bRewind;
|
||||
|
||||
@ -35,10 +35,8 @@
|
||||
class CRecordExObjRefAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
DWORD m_nExObjID;
|
||||
_UINT32 m_nExObjID;
|
||||
|
||||
public:
|
||||
|
||||
CRecordExObjRefAtom()
|
||||
{
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ class CRecordWAVAudioEmbeddedContainer : public CRecordsContainer
|
||||
public:
|
||||
CRecordExMediaAtom m_oMedia;
|
||||
|
||||
DWORD m_nSoundID;
|
||||
_UINT32 m_nSoundID;
|
||||
LONG m_nDuration;
|
||||
|
||||
public:
|
||||
|
||||
@ -34,8 +34,8 @@
|
||||
|
||||
class CRecordGuideAtom : public CUnknownRecord
|
||||
{
|
||||
DWORD m_nType;
|
||||
DWORD m_nPos;
|
||||
_UINT32 m_nType;
|
||||
_UINT32 m_nPos;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -106,7 +106,7 @@ public:
|
||||
class CRecordMetaCharacterAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
DWORD m_nPosition;
|
||||
_UINT32 m_nPosition;
|
||||
|
||||
|
||||
CRecordMetaCharacterAtom()
|
||||
@ -149,7 +149,7 @@ public:
|
||||
class CRecordDateTimeMetaAtom : public CRecordGenericDateMetaAtom
|
||||
{
|
||||
public:
|
||||
DWORD m_FormatID;
|
||||
_UINT32 m_FormatID;
|
||||
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
||||
{
|
||||
|
||||
@ -37,8 +37,8 @@ class CRecordMasterTextPropAtom : public CUnknownRecord
|
||||
public:
|
||||
struct SMasterTextPropRun
|
||||
{
|
||||
DWORD lCount;
|
||||
WORD lIndentLevel;
|
||||
_UINT32 lCount;
|
||||
unsigned short lIndentLevel;
|
||||
|
||||
SMasterTextPropRun()
|
||||
{
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
class CRecordOutlineTextRefAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
DWORD m_nIndex;
|
||||
_UINT32 m_nIndex;
|
||||
|
||||
|
||||
CRecordOutlineTextRefAtom()
|
||||
|
||||
@ -38,10 +38,10 @@
|
||||
class CPersistDirectoryEntry
|
||||
{
|
||||
public:
|
||||
DWORD m_nPersistID; // PersistOffsetID[index] = m_nPersistID + index
|
||||
DWORD m_nPersistCount;
|
||||
_UINT32 m_nPersistID; // PersistOffsetID[index] = m_nPersistID + index
|
||||
_UINT32 m_nPersistCount;
|
||||
|
||||
std::vector<DWORD> m_arPersistOffsets;
|
||||
std::vector<_UINT32> m_arPersistOffsets;
|
||||
|
||||
public:
|
||||
|
||||
@ -51,17 +51,17 @@ public:
|
||||
m_nPersistCount = 0;
|
||||
}
|
||||
|
||||
DWORD FromStream(POLE::Stream* pStream)
|
||||
_UINT32 FromStream(POLE::Stream* pStream)
|
||||
{
|
||||
DWORD nFlag = StreamUtils::ReadDWORD(pStream);
|
||||
_UINT32 nFlag = StreamUtils::ReadDWORD(pStream);
|
||||
m_nPersistID = (nFlag & 0x000FFFFF); // 20 bit
|
||||
m_nPersistCount = (nFlag & 0xFFF00000) >> 20; // 12 bit
|
||||
|
||||
m_arPersistOffsets.clear();
|
||||
|
||||
for (DWORD index = 0; index < m_nPersistCount; ++index)
|
||||
for (_UINT32 index = 0; index < m_nPersistCount; ++index)
|
||||
{
|
||||
DWORD Mem = StreamUtils::ReadDWORD(pStream);
|
||||
_UINT32 Mem = StreamUtils::ReadDWORD(pStream);
|
||||
m_arPersistOffsets.push_back(Mem);
|
||||
}
|
||||
|
||||
@ -88,8 +88,8 @@ public:
|
||||
{
|
||||
m_oHeader = oHeader;
|
||||
|
||||
DWORD nCountRead = 0;
|
||||
DWORD nCountEnries = 0;
|
||||
_UINT32 nCountRead = 0;
|
||||
_UINT32 nCountEnries = 0;
|
||||
while (nCountRead < m_oHeader.RecLen)
|
||||
{
|
||||
CPersistDirectoryEntry elm;
|
||||
@ -100,18 +100,18 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void ToMap(std::map<DWORD, DWORD>* pMap)
|
||||
void ToMap(std::map<_UINT32, _UINT32>* pMap)
|
||||
{
|
||||
pMap->clear();
|
||||
|
||||
for (size_t nEntry = 0; nEntry < m_arEntries.size(); ++nEntry)
|
||||
{
|
||||
DWORD nPID = m_arEntries[nEntry].m_nPersistID;
|
||||
_UINT32 nPID = m_arEntries[nEntry].m_nPersistID;
|
||||
|
||||
for (size_t nIndex = 0; nIndex < m_arEntries[nEntry].m_nPersistCount; ++nIndex)
|
||||
{
|
||||
DWORD nOffset = m_arEntries[nEntry].m_arPersistOffsets[nIndex];
|
||||
pMap->insert(std::pair<DWORD, DWORD>(nPID, nOffset));
|
||||
_UINT32 nOffset = m_arEntries[nEntry].m_arPersistOffsets[nIndex];
|
||||
pMap->insert(std::pair<_UINT32, _UINT32>(nPID, nOffset));
|
||||
++nPID;
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,9 +35,7 @@
|
||||
class CRecordTripCompositeMasterId12Atom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
DWORD m_dwID;
|
||||
|
||||
public:
|
||||
_UINT32 m_dwID;
|
||||
|
||||
CRecordTripCompositeMasterId12Atom()
|
||||
{
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
class CRecordTripOriginalMasterId12Atom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
DWORD m_dwID;
|
||||
_UINT32 m_dwID;
|
||||
|
||||
CRecordTripOriginalMasterId12Atom()
|
||||
{
|
||||
|
||||
@ -37,7 +37,7 @@ class CSlideShowSlideInfoAtom : public CUnknownRecord
|
||||
public:
|
||||
|
||||
INT m_nSlideTime;
|
||||
DWORD m_nSoundRef;
|
||||
_UINT32 m_nSoundRef;
|
||||
|
||||
BYTE m_nEffectDirection;
|
||||
BYTE m_nEffectType;
|
||||
@ -108,7 +108,7 @@ public:
|
||||
m_bAutoAdvance = (0x04 == (0x04 & bValue));
|
||||
m_bCursorVisible = (0x10 == (0x10 & bValue));
|
||||
|
||||
//DWORD dwValue = StreamUtils::ReadDWORD ( pStream );
|
||||
//_UINT32 dwValue = StreamUtils::ReadDWORD ( pStream );
|
||||
//m_nSpeed = ( 0x01 == ( 0x01 & ((BYTE)dwValue) ) );
|
||||
m_nSpeed = StreamUtils::ReadBYTE( pStream );
|
||||
StreamUtils::StreamSkip(3, pStream);
|
||||
|
||||
@ -49,7 +49,7 @@ public:
|
||||
int m_IndexUser;
|
||||
|
||||
private:
|
||||
DWORD m_lCountReferences;
|
||||
_UINT32 m_lCountReferences;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ public:
|
||||
if (m_oHeader.IsContainer())
|
||||
{
|
||||
// а по-другому и быть не могло...
|
||||
DWORD lSymbolCount = 0;
|
||||
_UINT32 lSymbolCount = 0;
|
||||
|
||||
UINT lCurLen = 0;
|
||||
SRecordHeader oRec;
|
||||
@ -128,12 +128,12 @@ public:
|
||||
if (NULL != pChars)
|
||||
{
|
||||
m_arTextPlaceHolders[nCurrentSlide][nCurrentTextHeader].m_strText = pChars->m_strText;
|
||||
lSymbolCount = (DWORD)pChars->m_strText.length();
|
||||
lSymbolCount = (_UINT32)pChars->m_strText.length();
|
||||
}
|
||||
else if (NULL != pBytes)
|
||||
{
|
||||
m_arTextPlaceHolders[nCurrentSlide][nCurrentTextHeader].m_strText = pBytes->m_strText;
|
||||
lSymbolCount = (DWORD)pBytes->m_strText.length();
|
||||
lSymbolCount = (_UINT32)pBytes->m_strText.length();
|
||||
}
|
||||
|
||||
if (RECORD_TYPE_STYLE_TEXTPROP_ATOM == oRec.RecType)
|
||||
|
||||
@ -35,16 +35,14 @@
|
||||
class CRecordSlidePersistAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
DWORD m_nPsrRef;
|
||||
_UINT32 m_nPsrRef;
|
||||
|
||||
bool m_bShouldCollapse;
|
||||
bool m_bNonOutlineData;
|
||||
|
||||
INT m_nNumberText;
|
||||
DWORD m_nSlideID;
|
||||
_UINT32 m_nSlideID;
|
||||
|
||||
public:
|
||||
|
||||
CRecordSlidePersistAtom()
|
||||
{
|
||||
}
|
||||
|
||||
@ -41,13 +41,10 @@ public:
|
||||
|
||||
// просто данные. будут обновляться по мере прибытия
|
||||
// Text.Bytes/Chars.Atom
|
||||
DWORD m_lCount;
|
||||
_UINT32 m_lCount;
|
||||
|
||||
public:
|
||||
std::vector<CTextPFRun_ppt> m_arrPFs;
|
||||
std::vector<CTextCFRun_ppt> m_arrCFs;
|
||||
|
||||
public:
|
||||
|
||||
CRecordStyleTextPropAtom()
|
||||
{
|
||||
@ -65,8 +62,8 @@ public:
|
||||
m_oHeader = oHeader;
|
||||
StreamUtils::StreamPosition(m_lOffsetInStream, pStream);
|
||||
|
||||
DWORD lMemCount = 0;
|
||||
DWORD lCountItems = 0;
|
||||
_UINT32 lMemCount = 0;
|
||||
_UINT32 lCountItems = 0;
|
||||
|
||||
if (0 == m_lCount)
|
||||
{
|
||||
|
||||
@ -50,8 +50,8 @@ public:
|
||||
std::vector<NSPresentationEditor::CTextRange> m_arRanges;
|
||||
|
||||
std::wstring m_strText;
|
||||
DWORD m_nTextType;
|
||||
DWORD m_lStyleThemeIndex;
|
||||
_UINT32 m_nTextType;
|
||||
_UINT32 m_lStyleThemeIndex;
|
||||
|
||||
public:
|
||||
CTextFullSettings() : m_arRanges()
|
||||
|
||||
@ -38,7 +38,7 @@ public:
|
||||
// нужно еще хранить позицию в стриме,
|
||||
// указатель на начало
|
||||
LONG m_lOffsetInStream;
|
||||
DWORD m_lCount;
|
||||
_UINT32 m_lCount;
|
||||
|
||||
std::vector<NSPresentationEditor::CTextSIRun> m_arrSIs;
|
||||
|
||||
@ -59,7 +59,7 @@ public:
|
||||
m_oHeader = oHeader;
|
||||
StreamUtils::StreamPosition(m_lOffsetInStream, pStream);
|
||||
|
||||
DWORD lMemCount = 0;
|
||||
_UINT32 lMemCount = 0;
|
||||
while (true)
|
||||
{
|
||||
NSPresentationEditor::CTextSIRun elm;
|
||||
|
||||
@ -35,26 +35,24 @@
|
||||
class CRecordUserEditAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
DWORD m_nLastSlideIdRef;
|
||||
_UINT32 m_nLastSlideIdRef;
|
||||
|
||||
USHORT m_nVersion; // must be 0x0000
|
||||
BYTE m_nMinorVersion; // must be 0x00
|
||||
BYTE m_nMajorVersion; // must be 0x03
|
||||
|
||||
DWORD m_nOffsetLastEdit; // offset to prev UserEditAtom (0 - if no)
|
||||
_UINT32 m_nOffsetLastEdit; // offset to prev UserEditAtom (0 - if no)
|
||||
|
||||
DWORD m_nOffsetPersistDirectory; // offset to PersistDirectoryAtom in PPTDocStream (for this user)
|
||||
_UINT32 m_nOffsetPersistDirectory; // offset to PersistDirectoryAtom in PPTDocStream (for this user)
|
||||
|
||||
DWORD m_nOffsetDocPersistIdRef; // offset to PersistObjectDirectory in DocContainer must be 0x00000001
|
||||
_UINT32 m_nOffsetDocPersistIdRef; // offset to PersistObjectDirectory in DocContainer must be 0x00000001
|
||||
|
||||
DWORD m_nPersistIdSeed; // for next
|
||||
_UINT32 m_nPersistIdSeed; // for next
|
||||
|
||||
DWORD m_nEncryptSessionPersistIdRef;
|
||||
_UINT32 m_nEncryptSessionPersistIdRef;
|
||||
|
||||
USHORT m_nLastView;
|
||||
|
||||
public:
|
||||
|
||||
CRecordUserEditAtom()
|
||||
{
|
||||
m_nEncryptSessionPersistIdRef = 0;
|
||||
|
||||
@ -341,138 +341,6 @@
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Common"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\ASCOfficeXlsFile2\source\XlsFormat\Binary\CFRecord.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\ASCOfficeXlsFile2\source\XlsFormat\Binary\CFStream.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\XlsxSerializerCom\Reader\ChartFromToBinary.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\ASCOfficeDocxFile2\DocWrapper\ChartWriter.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\XlsxSerializerCom\Common\Common.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\XlsxSerializerCom\Reader\CommonWriter.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\XlsxSerializerCom\Reader\CSVReader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\XlsxSerializerCom\Writer\CSVWriter.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\ASCOfficeDocxFile2\DocWrapper\DocxSerializer.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/bigobj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/bigobj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/bigobj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\Common\FileDownloader\FileDownloader_win.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\DesktopEditor\fontengine\FontManager.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/bigobj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\ASCOfficeDocxFile2\DocWrapper\FontProcessor.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\UnicodeConverter\UnicodeConverter.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\ASCOfficeDocxFile2\DocWrapper\XlsxSerializer.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/bigobj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/bigobj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/bigobj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\ASCOfficePPTXFile\Editor\xmlwriter.h"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="pole"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\Common\3dParty\pole\pole.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\Common\3dParty\pole\pole.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Reader"
|
||||
>
|
||||
@ -935,6 +803,10 @@
|
||||
RelativePath="..\Records\Drawing\Shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Records\Drawing\ShapeContainer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Records\Drawing\ShapeContainer.h"
|
||||
>
|
||||
|
||||
@ -46,19 +46,19 @@
|
||||
#pragma comment(lib, "../../build/bin/icu/win_32/icuuc.lib")
|
||||
#endif
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
HRESULT convert_single(std::wstring srcFileName)
|
||||
{
|
||||
//#ifdef _DEBUG
|
||||
// _CrtDumpMemoryLeaks();
|
||||
//#endif
|
||||
|
||||
if (argc < 2) return 1;
|
||||
//COfficeFileFormatChecker checker;
|
||||
|
||||
std::wstring sSrcPpt = argv[1];
|
||||
std::wstring sDstPptx;
|
||||
//if (false == checker.isOfficeFile(srcFileName)) return S_FALSE;
|
||||
//
|
||||
//if (AVS_OFFICESTUDIO_FILE_PRESENTATION_PPT != checker.nFileType) return S_FALSE;
|
||||
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
std::wstring outputDir = NSDirectory::GetFolderPath(sSrcPpt);
|
||||
std::wstring outputDir = NSDirectory::GetFolderPath(srcFileName);
|
||||
std::wstring dstTempPath = NSDirectory::CreateDirectoryWithUniqueName(outputDir);
|
||||
std::wstring dstPath;
|
||||
|
||||
std::wstring tempPath = NSDirectory::CreateDirectoryWithUniqueName(outputDir);
|
||||
|
||||
@ -68,26 +68,61 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
|
||||
bool bMacros = true;
|
||||
|
||||
HRESULT hRes = pptFile.LoadFromFile(sSrcPpt, dstTempPath, L"password", bMacros);
|
||||
HRESULT hRes = pptFile.LoadFromFile(srcFileName, dstTempPath, L"password", bMacros);
|
||||
|
||||
if (bMacros)
|
||||
{
|
||||
sDstPptx = sSrcPpt + L"-my.pptm";
|
||||
dstPath = srcFileName + L"-my.pptm";
|
||||
}
|
||||
else
|
||||
{
|
||||
sDstPptx = sSrcPpt + L"-my.pptx";
|
||||
dstPath = srcFileName + L"-my.pptx";
|
||||
|
||||
}
|
||||
if (hRes == S_OK)
|
||||
{
|
||||
COfficeUtils oCOfficeUtils(NULL);
|
||||
hRes = oCOfficeUtils.CompressFileOrDirectory(dstTempPath.c_str(), sDstPptx, -1);
|
||||
COfficeUtils oCOfficeUtils(NULL);
|
||||
hRes = oCOfficeUtils.CompressFileOrDirectory(dstTempPath.c_str(), dstPath, -1);
|
||||
}
|
||||
|
||||
|
||||
NSDirectory::DeleteDirectory(dstTempPath);
|
||||
NSDirectory::DeleteDirectory(tempPath);
|
||||
|
||||
return hRes;
|
||||
}
|
||||
|
||||
|
||||
HRESULT convert_directory(std::wstring pathName)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
std::vector<std::wstring> arFiles = NSDirectory::GetFiles(pathName, false);
|
||||
|
||||
for (size_t i = 0; i < arFiles.size(); i++)
|
||||
{
|
||||
convert_single(arFiles[i]);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
{
|
||||
//#ifdef _DEBUG
|
||||
// _CrtDumpMemoryLeaks();
|
||||
//#endif
|
||||
|
||||
if (argc < 2) return 1;
|
||||
|
||||
HRESULT hr = -1;
|
||||
if (NSFile::CFileBinary::Exists(argv[1]))
|
||||
{
|
||||
hr = convert_single(argv[1]);
|
||||
}
|
||||
else if (NSDirectory::Exists(argv[1]))
|
||||
{
|
||||
hr = convert_directory(argv[1]);
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../DesktopEditor/xml/build/vs2005;../../DesktopEditor/xml/libxml2/include"
|
||||
AdditionalIncludeDirectories="../../DesktopEditor/xml/build/vs2005;../../DesktopEditor/xml/libxml2/include;"../../DesktopEditor/freetype-2.5.2/include""
|
||||
PreprocessorDefinitions="_DEBUG;_CONSOLE;_USE_MATH_DEFINES;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;_PRESENTATION_WRITER_;_SVG_CONVERT_TO_IMAGE_;DONT_WRITE_EMBEDDED_FONTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@ -345,20 +345,48 @@
|
||||
<Filter
|
||||
Name="common"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\ASCOfficePPTXFile\Editor\BinaryFileReaderWriter.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\ASCOfficeDocxFile2\BinWriter\BinWriters.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\XlsxSerializerCom\Reader\ChartFromToBinary.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\XlsxSerializerCom\Common\Common.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\XlsxSerializerCom\Reader\CommonWriter.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\XlsxSerializerCom\Reader\CSVReader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\XlsxSerializerCom\Writer\CSVWriter.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\Common\FileDownloader\FileDownloader_win.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\Common\OfficeFileFormatChecker2.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\ASCOfficeDocxFile2\BinReader\Readers.cpp"
|
||||
RelativePath="..\..\Common\3dParty\pole\pole.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\UnicodeConverter\UnicodeConverter.cpp"
|
||||
RelativePath="..\..\ASCOfficeDocxFile2\BinReader\Readers.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
@ -370,10 +398,30 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\..\ASCOfficeDocxFile2\DocWrapper\ChartWriter.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\ASCOfficeDocxFile2\DocWrapper\DocxSerializer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\ASCOfficeDocxFile2\DocWrapper\FontProcessor.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="PptFormatTest.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\build\lib\win_32\DEBUG\UnicodeConverter.lib"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\ASCOfficeDocxFile2\DocWrapper\XlsxSerializer.cpp"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
||||
@ -59,7 +59,6 @@
|
||||
|
||||
const double g_emu_koef = 25.4 * 36000 / 72.0;
|
||||
|
||||
using namespace NSGuidesVML;
|
||||
|
||||
void DUMP_MESSAGE_TO_FILE(const char* strMessage)
|
||||
{
|
||||
@ -853,6 +852,10 @@ bool CElementProps::CopyProperty(ASC_VARIANT& oDst, const ASC_VARIANT& oSrc)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
namespace NSBinPptxRW
|
||||
{
|
||||
|
||||
CDrawingConverter::CElement::CElement()
|
||||
{
|
||||
m_pElement = NULL;
|
||||
@ -2864,6 +2867,8 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
CheckPenShape(elem, oNodeShape, pPPTShape);
|
||||
|
||||
CheckBrushShape(elem, oNodeShape, pPPTShape);
|
||||
|
||||
CheckBorderShape(elem, oNodeShape, pPPTShape);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3914,6 +3919,84 @@ void CDrawingConverter::SendMainProps(const std::wstring& strMainProps, std::wst
|
||||
*pMainProps = new std::wstring();
|
||||
**pMainProps = strMainProps;
|
||||
}
|
||||
void CDrawingConverter::CheckBorderShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils::CXmlNode& oNode, CPPTShape* pPPTShape)
|
||||
{
|
||||
if (!oElem) return;
|
||||
|
||||
PPTX::Logic::Shape* pShape = dynamic_cast<PPTX::Logic::Shape*> (oElem->GetElem().operator ->());
|
||||
PPTX::Logic::Pic* pPicture = dynamic_cast<PPTX::Logic::Pic*> (oElem->GetElem().operator ->());
|
||||
|
||||
PPTX::Logic::SpPr *pSpPr = NULL;
|
||||
|
||||
if (pShape) pSpPr = &pShape->spPr;
|
||||
if (pPicture) pSpPr = &pPicture->spPr;
|
||||
|
||||
if (!pSpPr) return;
|
||||
|
||||
if ( (pSpPr->ln.IsInit()) && (pSpPr->ln->Fill.m_type != PPTX::Logic::UniFill::noFill) )
|
||||
return; //дублирование обрамлением линией
|
||||
|
||||
nullable_string sColorBorder;
|
||||
oNode.ReadAttributeBase(L"o:borderleftcolor", sColorBorder);
|
||||
|
||||
XmlUtils::CXmlNode oNodeBorder = oNode.ReadNode(L"w10:borderleft");
|
||||
|
||||
if (oNodeBorder.IsValid())
|
||||
{
|
||||
pSpPr->ln.Init();
|
||||
nullable_int nWidthBorder;
|
||||
oNode.ReadAttributeBase(L"width", nWidthBorder);
|
||||
|
||||
nullable_string sTypeBorder;
|
||||
oNode.ReadAttributeBase(L"type", sTypeBorder);
|
||||
|
||||
if (sTypeBorder.IsInit())
|
||||
{
|
||||
SimpleTypes::CBorderType<> borderType;
|
||||
borderType.FromString(sTypeBorder.get());
|
||||
|
||||
if (borderType.GetValue() > 0 &&
|
||||
borderType.GetValue() < 6)
|
||||
{
|
||||
pSpPr->ln->prstDash.Init();
|
||||
pSpPr->ln->prstDash->val = new PPTX::Limit::PrstDashVal();
|
||||
switch(borderType.GetValue())
|
||||
{
|
||||
case SimpleTypes::bordertypeDash: pSpPr->ln->prstDash->val->SetBYTECode(3); break;
|
||||
case SimpleTypes::bordertypeDashDotDot: pSpPr->ln->prstDash->val->SetBYTECode(5); break;
|
||||
case SimpleTypes::bordertypeDashDotStroked: pSpPr->ln->prstDash->val->SetBYTECode(1); break;
|
||||
case SimpleTypes::bordertypeDashedSmall: pSpPr->ln->prstDash->val->SetBYTECode(0); break;
|
||||
case SimpleTypes::bordertypeDot: pSpPr->ln->prstDash->val->SetBYTECode(2); break;
|
||||
case SimpleTypes::bordertypeDotDash: pSpPr->ln->prstDash->val->SetBYTECode(1); break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (nWidthBorder.IsInit())
|
||||
{
|
||||
pSpPr->ln->w = *nWidthBorder * g_emu_koef;//pt to emu
|
||||
}
|
||||
if (sColorBorder.IsInit())
|
||||
{
|
||||
PPTX::Logic::SolidFill* pSolid = new PPTX::Logic::SolidFill();
|
||||
pSolid->m_namespace = L"a";
|
||||
pSolid->Color.Color = new PPTX::Logic::SrgbClr();
|
||||
|
||||
if (std::wstring::npos != sColorBorder->find(L"#"))
|
||||
{
|
||||
pSolid->Color.Color->SetHexString(sColorBorder->substr(1));
|
||||
}
|
||||
else
|
||||
{
|
||||
//"red", L"black" , .. to color
|
||||
}
|
||||
|
||||
pSpPr->ln->Fill.m_type = PPTX::Logic::UniFill::solidFill;
|
||||
pSpPr->ln->Fill.Fill = pSolid;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils::CXmlNode& oNode, CPPTShape* pPPTShape)
|
||||
{
|
||||
@ -5572,3 +5655,4 @@ void CDrawingConverter::SetFontManager(CFontManager* pFontManager)
|
||||
m_pBinaryWriter->m_pCommon->m_pMediaManager->SetFontManager(pFontManager);
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user