Compare commits

..

43 Commits

Author SHA1 Message Date
7014faa9a1 . 2018-06-04 15:27:48 +03:00
93287c84c8 OdfFormatReader - meta data file, new convert tabs stop 2018-06-04 15:24:49 +03:00
dafcbacfaf [ios][x2t] add version property 2018-06-04 13:48:09 +03:00
1c73ff0c3f Merge remote-tracking branch 'origin/hotfix/v5.1.5' into develop 2018-06-01 18:18:31 +03:00
5a8c9069be OdfFormatReader - fix users file 2018-06-01 18:17:56 +03:00
4ba2e1fa6d x2t - split version info in separate file 2018-06-01 16:11:13 +03:00
95af281145 x2t - write embedded ms package with zero offsets 2018-05-31 17:29:44 +03:00
00fb2ba7bb [ios][x2t] update converter 2018-05-31 14:44:14 +03:00
0f65e36517 Merge branch 'feature/graphics' into develop 2018-05-31 11:39:29 +03:00
aa1af73fda x2t version up 2018-05-30 19:20:18 +03:00
1610978821 [ios][se][pe] fixed build 2018-05-30 18:08:43 +03:00
20faf24556 RtfFormatWriter - add comments (fix bug #37807) 2018-05-30 16:37:41 +03:00
ae90e4ae96 Merge pull request #87 from ONLYOFFICE/feature/onlypass
Feature/onlypass
2018-05-30 13:58:42 +03:00
6fae9115ea Merge branch 'hotfix/v5.1.5' into feature/onlypass 2018-05-30 13:58:29 +03:00
c14a21b2da Merge remote-tracking branch 'origin/hotfix/v5.1.5' into develop 2018-05-30 13:21:14 +03:00
b952692225 . 2018-05-30 12:50:50 +03:00
23249e69f9 . 2018-05-29 19:53:13 +03:00
09f6c3f4e8 . 2018-05-29 19:03:58 +03:00
111ceff368 [ios][x2t] update converter 2018-05-29 18:55:18 +03:00
867b0634f3 Fix bug #36423
Fix problem with the clip in the EMF
2018-05-29 18:33:49 +03:00
f9c27275a7 . 2018-05-29 17:01:34 +03:00
dd12ee0b9e Merge remote-tracking branch 'origin/hotfix/v5.1.5' into develop 2018-05-29 16:24:03 +03:00
de83971832 [x2t] Fix dependence of docx comments with empty text 2018-05-29 16:01:50 +03:00
0d158e46b5 OdfFormatWriter - extending number formats 2018-05-29 16:03:08 +03:00
dde6b8bdc7 . 2018-05-29 14:15:32 +03:00
b66bb0d63f RtfFormatReader - add commetns 2018-05-29 14:14:33 +03:00
d666da2697 OdfFormatReader - fix bug #37832 2018-05-28 13:35:45 +03:00
8e35f9b063 [ios][x2t] fixed build 2018-05-25 12:25:37 +03:00
25268b706d OdfFormatreader - content of illustrations 2018-05-24 18:40:01 +03:00
97ff1efba8 XlsFormat -fix issue 308 2018-05-24 17:52:21 +03:00
1879ce8dbb v5.1.4 2018-05-24 15:34:46 +03:00
50ff5fc0b2 v5.1.4 2018-05-24 15:32:34 +03:00
537e774f79 . 2018-05-24 15:08:20 +03:00
6d3761c20b XlsFormatReader - fix arrow 2018-05-24 12:18:43 +03:00
ee41b4ccb2 [x2t] Replace XmlUtils::CStringWriter with NSStringUtils::CStringBuilder 2018-05-24 12:00:53 +03:00
7b0f902c0f [x2t] Turn on DeleteNoUnicode option for bug #37789 2018-05-23 20:32:03 +03:00
e6039f7f6f OdfFormatReader - convert table content to sdt table content 2018-05-23 19:28:29 +03:00
1c2b86519e [bug] Fix bug 37565 2018-05-23 16:38:24 +03:00
323d1b44cd openssl 2018-05-23 13:36:26 +03:00
83fa44edcd Use system libcurl 2018-05-21 18:12:06 +03:00
2ead42a513 Build on linux 2018-05-17 15:32:23 +03:00
427046cb8f Fix build on mac 2018-05-17 12:14:12 +03:00
e60cc05b6e Downgrade icu to v58.2
ICU58 is the last version that works on Windows XP and Windows Vista.
2018-05-16 12:20:15 +03:00
130 changed files with 4009 additions and 2013 deletions

View File

@ -39,7 +39,7 @@ namespace Writers
{
class DocumentWriter : public ContentWriter
{
XmlUtils::CStringWriter m_oWriter;
NSStringUtils::CStringBuilder m_oWriter;
HeaderFooterWriter& m_oHeaderFooterWriter;
public:
std::wstring m_sDir;

View File

@ -40,9 +40,9 @@ namespace Writers
class ContentWriter
{
public:
XmlUtils::CStringWriter m_oBackground;
XmlUtils::CStringWriter m_oContent;
XmlUtils::CStringWriter m_oSecPr;
NSStringUtils::CStringBuilder m_oBackground;
NSStringUtils::CStringBuilder m_oContent;
NSStringUtils::CStringBuilder m_oSecPr;
};
class HdrFtrItem
{

View File

@ -38,7 +38,7 @@ namespace Writers
{
class MediaWriter
{
XmlUtils::CStringWriter m_oWriter;
NSStringUtils::CStringBuilder m_oWriter;
std::wstring m_sDir;
std::wstring m_sMediaDir;
public:

View File

@ -41,11 +41,11 @@ namespace Writers
class NumberingWriter
{
XmlUtils::CStringWriter m_oWriter;
NSStringUtils::CStringBuilder m_oWriter;
std::wstring m_sDir;
public:
XmlUtils::CStringWriter m_oANum;
XmlUtils::CStringWriter m_oNumList;
NSStringUtils::CStringBuilder m_oANum;
NSStringUtils::CStringBuilder m_oNumList;
NumberingWriter( std::wstring sDir) : m_sDir(sDir)
{

View File

@ -516,7 +516,7 @@ public:
bRStyle || bSpacing || bDStrikeout || bCaps || bSmallCaps || bPosition || bFontHint || bBoldCs || bItalicCs || bFontSizeCs || bCs || bRtl || bLang || bLangBidi || bLangEA || bThemeColor || bVanish ||
!Outline.empty() || !Fill.empty() || !Del.empty() || !Ins.empty() || !MoveFrom.empty() || !MoveTo.empty() || !rPrChange.empty();
}
void Write(XmlUtils::CStringWriter* pCStringWriter)
void Write(NSStringUtils::CStringBuilder* pCStringWriter)
{
pCStringWriter->WriteString(L"<w:rPr>");
if(bRStyle)
@ -834,7 +834,7 @@ public:
bpersonalCompose = false;
bpersonalReply = false;
}
void Write(XmlUtils::CStringWriter* pCStringWriter)
void Write(NSStringUtils::CStringBuilder* pCStringWriter)
{
std::wstring sType;
switch(byteType)
@ -990,7 +990,7 @@ public:
class tblStylePr
{
public:
XmlUtils::CStringWriter Writer;
NSStringUtils::CStringBuilder Writer;
BYTE Type;
bool bType;
public:
@ -1050,7 +1050,7 @@ public:
bHeight = false;
bPaddings = false;
}
void Write(XmlUtils::CStringWriter* pCStringWriter)
void Write(NSStringUtils::CStringBuilder* pCStringWriter)
{
if(bType)
{
@ -1111,7 +1111,7 @@ public:
// tblPr()
// {
// }
// void Write(CStringWriter* pCStringWriter)
// void Write(NSStringUtils::CStringBuilder* pCStringWriter)
// {
// }
//};
@ -1131,7 +1131,7 @@ public:
bW = false;
bWDocx = false;
}
void Write(XmlUtils::CStringWriter& pCStringWriter, const std::wstring& sName)
void Write(NSStringUtils::CStringBuilder& pCStringWriter, const std::wstring& sName)
{
pCStringWriter.WriteString(Write(sName));
}
@ -1185,7 +1185,7 @@ public:
bValue = false;
bThemeColor = false;
}
void Write(std::wstring sName, XmlUtils::CStringWriter* pCStringWriter, bool bCell)
void Write(std::wstring sName, NSStringUtils::CStringBuilder* pCStringWriter, bool bCell)
{
if(bValue)
{
@ -1276,7 +1276,7 @@ public:
{
return !(bLeft || bTop || bRight || bBottom || bInsideV || bInsideH || bBetween);
}
void Write(XmlUtils::CStringWriter* pCStringWriter, bool bCell)
void Write(NSStringUtils::CStringBuilder* pCStringWriter, bool bCell)
{
if(bLeft)
oLeft.Write(L"w:left", pCStringWriter, bCell);
@ -1318,8 +1318,8 @@ public:
long Restart;
long Start;
BYTE Suff;
XmlUtils::CStringWriter ParaPr;
XmlUtils::CStringWriter TextPr;
NSStringUtils::CStringBuilder ParaPr;
NSStringUtils::CStringBuilder TextPr;
std::wstring PStyle;
bool bILvl;
@ -1352,7 +1352,7 @@ public:
delete Text[i];
}
}
void Write(XmlUtils::CStringWriter& oWriter)
void Write(NSStringUtils::CStringBuilder& oWriter)
{
oWriter.WriteString(L"<w:lvl");
if(bILvl)
@ -1475,7 +1475,7 @@ public:
{
RELEASEOBJECT(Lvl);
}
void Write(XmlUtils::CStringWriter& oWriter)
void Write(NSStringUtils::CStringBuilder& oWriter)
{
oWriter.WriteString(L"<w:lvlOverride");
if (bILvl)
@ -1518,7 +1518,7 @@ public:
delete Lvls[i];
}
}
void Write(XmlUtils::CStringWriter& oWriterANum)
void Write(NSStringUtils::CStringBuilder& oWriterANum)
{
if(bId)
{
@ -1561,7 +1561,7 @@ public:
RELEASEOBJECT(LvlOverrides[i]);
}
}
void Write(XmlUtils::CStringWriter& oWriterNumList)
void Write(NSStringUtils::CStringBuilder& oWriterNumList)
{
if(bAId && bId)
{
@ -1585,7 +1585,7 @@ public:
sName = name;
bGridAfter = false;
}
void Write(XmlUtils::CStringWriter& writer)
void Write(NSStringUtils::CStringBuilder& writer)
{
if(bGridAfter && nGridAfter > 0)
{
@ -1602,7 +1602,7 @@ public:
std::wstring href;
std::wstring anchor;
std::wstring tooltip;
XmlUtils::CStringWriter writer;
NSStringUtils::CStringBuilder writer;
static WriteHyperlink* Parse(std::wstring fld)
{
WriteHyperlink* res = NULL;
@ -1681,7 +1681,7 @@ public:
}
return res;
}
void Write(XmlUtils::CStringWriter& wr)
void Write(NSStringUtils::CStringBuilder& wr)
{
if(false == rId.empty())
{
@ -1877,25 +1877,22 @@ public:
sRes += L"\"";
}
sRes += L">";
if(false == pComment->Text.empty())
std::wstring sText = pComment->Text;
XmlUtils::replace_all(sText, L"\r", L"");
bool bFirst = true;
int nPrevIndex = 0;
for (int i = 0; i < (int)sText.length(); i++)
{
std::wstring sText = pComment->Text;
XmlUtils::replace_all(sText, L"\r", L"");
bool bFirst = true;
int nPrevIndex = 0;
for (int i = 0; i < (int)sText.length(); i++)
wchar_t cToken = sText[i];
if('\n' == cToken)
{
wchar_t cToken = sText[i];
if('\n' == cToken)
{
bFirst = writeContentWritePart(pComment, sText, nPrevIndex, i, bFirst, sRes);
nPrevIndex = i + 1;
}
bFirst = writeContentWritePart(pComment, sText, nPrevIndex, i, bFirst, sRes);
nPrevIndex = i + 1;
}
writeContentWritePart(pComment, sText, nPrevIndex, (int)sText.length(), bFirst, sRes);
}
writeContentWritePart(pComment, sText, nPrevIndex, (int)sText.length(), bFirst, sRes);
sRes += L"</w:comment>";
return sRes;
}
@ -2590,7 +2587,7 @@ public: CFramePr()
{
return !(bDropCap || bH || bHAnchor || bHRule || bHSpace || bLines || bVAnchor || bVSpace || bW || bWrap || bX || bXAlign || bY || bYAlign);
}
void Write(XmlUtils::CStringWriter& oStringWriter)
void Write(NSStringUtils::CStringBuilder& oStringWriter)
{
oStringWriter.WriteString(L"<w:framePr");
if(bDropCap)
@ -2728,7 +2725,7 @@ public:
std::wstring sDocLocation;
std::wstring sTgtFrame;
XmlUtils::CStringWriter writer;
NSStringUtils::CStringBuilder writer;
bool bHistory;
public:
@ -2736,7 +2733,7 @@ public:
{
bHistory = false;
}
void Write(XmlUtils::CStringWriter& wr)
void Write(NSStringUtils::CStringBuilder& wr)
{
if(false == rId.empty())
{
@ -2767,12 +2764,12 @@ public:
class CFldSimple{
public:
std::wstring sInstr;
XmlUtils::CStringWriter writer;
NSStringUtils::CStringBuilder writer;
public:
CFldSimple()
{
}
void Write(XmlUtils::CStringWriter& wr)
void Write(NSStringUtils::CStringBuilder& wr)
{
if(false == sInstr.empty())
{
@ -2797,14 +2794,14 @@ public:
long* vMergeOrigin;
rPr* RPr;
XmlUtils::CStringWriter* PPr;
NSStringUtils::CStringBuilder* PPr;
SectPr* sectPr;
CWiterTblPr* tblPr;
XmlUtils::CStringWriter* tblGridChange;
XmlUtils::CStringWriter* trPr;
XmlUtils::CStringWriter* tcPr;
XmlUtils::CStringWriter* content;
XmlUtils::CStringWriter* contentRun;
NSStringUtils::CStringBuilder* tblGridChange;
NSStringUtils::CStringBuilder* trPr;
NSStringUtils::CStringBuilder* tcPr;
NSStringUtils::CStringBuilder* content;
NSStringUtils::CStringBuilder* contentRun;
TrackRevision()
{
Id = NULL;
@ -2841,11 +2838,11 @@ public:
}
std::wstring ToString(std::wstring sName)
{
XmlUtils::CStringWriter writer;
NSStringUtils::CStringBuilder writer;
Write(&writer, sName);
return writer.GetData();
}
void Write(XmlUtils::CStringWriter* pCStringWriter, std::wstring sName)
void Write(NSStringUtils::CStringBuilder* pCStringWriter, std::wstring sName)
{
if(IsNoEmpty())
{

View File

@ -659,7 +659,7 @@ public:
int ReadContent( BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
NSStringUtils::CStringBuilder* pCStringWriter = static_cast<NSStringUtils::CStringBuilder*>(poResult);
switch(type)
{
case c_oSerProp_pPrType::ContextualSpacing:
@ -672,7 +672,7 @@ public:
}break;
case c_oSerProp_pPrType::Ind:
{
XmlUtils::CStringWriter oTempWriter;
NSStringUtils::CStringBuilder oTempWriter;
READ2_DEF(length, res, this->ReadInd, &oTempWriter);
if(oTempWriter.GetCurSize() > 0)
{
@ -915,7 +915,7 @@ public:
READ1_TRACKREV(type, length, pPPrChange)
else if(c_oSerProp_RevisionType::pPrChange == type)
{
pPPrChange->PPr = new XmlUtils::CStringWriter();
pPPrChange->PPr = new NSStringUtils::CStringBuilder();
res = Read(length, pPPrChange->PPr);
}
else
@ -925,7 +925,7 @@ public:
int ReadInd(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
NSStringUtils::CStringBuilder* pCStringWriter = static_cast<NSStringUtils::CStringBuilder*>(poResult);
switch(type)
{
case c_oSerProp_pPrType::Ind_Left:
@ -1032,7 +1032,7 @@ public:
int ReadNumPr(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
NSStringUtils::CStringBuilder* pCStringWriter = static_cast<NSStringUtils::CStringBuilder*>(poResult);
if(c_oSerProp_pPrType::numPr_lvl == type)
{
long nLvl = m_oBufferedStream.GetLong();
@ -1723,7 +1723,7 @@ public:
}
else if( c_oSerProp_tblPrType::TableCellMar == type )
{
XmlUtils::CStringWriter oTempWriter;
NSStringUtils::CStringBuilder oTempWriter;
READ1_DEF(length, res, this->ReadCellMargins, &oTempWriter);
if(oTempWriter.GetCurSize() > 0)
{
@ -1738,7 +1738,7 @@ public:
READ1_DEF(length, res, oBinary_pPrReader.ReadBorders, &odocBorders);
if(false == odocBorders.IsEmpty())
{
XmlUtils::CStringWriter oTempWriter;
NSStringUtils::CStringBuilder oTempWriter;
odocBorders.Write(&oTempWriter, false);
pWiterTblPr->TableBorders += L"<w:tblBorders>";
pWiterTblPr->TableBorders += oTempWriter.GetData();
@ -1754,7 +1754,7 @@ public:
}
else if( c_oSerProp_tblPrType::tblpPr == type )
{
XmlUtils::CStringWriter oTempWriter;
NSStringUtils::CStringBuilder oTempWriter;
READ2_DEF(length, res, this->Read_tblpPr, &oTempWriter);
pWiterTblPr->tblpPr += L"<w:tblpPr w:vertAnchor=\"page\" w:horzAnchor=\"page\"";
pWiterTblPr->tblpPr += oTempWriter.GetData();
@ -1762,7 +1762,7 @@ public:
}
else if( c_oSerProp_tblPrType::tblpPr2 == type )
{
XmlUtils::CStringWriter oTempWriter;
NSStringUtils::CStringBuilder oTempWriter;
READ2_DEF(length, res, this->Read_tblpPr2, &oTempWriter);
pWiterTblPr->tblpPr += L"<w:tblpPr";
pWiterTblPr->tblpPr += oTempWriter.GetData();
@ -1852,7 +1852,7 @@ public:
int ReadCellMargins(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
NSStringUtils::CStringBuilder* pCStringWriter = static_cast<NSStringUtils::CStringBuilder*>(poResult);
if( c_oSerMarginsType::left == type )
{
docW oLeft;
@ -1884,7 +1884,7 @@ public:
int Read_tblpPr(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
NSStringUtils::CStringBuilder* pCStringWriter = static_cast<NSStringUtils::CStringBuilder*>(poResult);
if( c_oSer_tblpPrType::X == type )
{
double dX = m_oBufferedStream.GetDouble();
@ -1938,7 +1938,7 @@ public:
int Read_tblpPr2(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
NSStringUtils::CStringBuilder* pCStringWriter = static_cast<NSStringUtils::CStringBuilder*>(poResult);
if( c_oSer_tblpPrType2::HorzAnchor == type )
{
std::wstring sXml;
@ -2017,7 +2017,7 @@ public:
int Read_RowPr(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
NSStringUtils::CStringBuilder* pCStringWriter = static_cast<NSStringUtils::CStringBuilder*>(poResult);
if( c_oSerProp_rowPrType::CantSplit == type )
{
BYTE CantSplit = m_oBufferedStream.GetUChar();
@ -2186,7 +2186,7 @@ public:
int Read_CellPr(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
NSStringUtils::CStringBuilder* pCStringWriter = static_cast<NSStringUtils::CStringBuilder*>(poResult);
if( c_oSerProp_cellPrType::GridSpan == type )
{
long nGridSpan = m_oBufferedStream.GetLong();
@ -2215,7 +2215,7 @@ public:
}
else if( c_oSerProp_cellPrType::CellMar == type )
{
XmlUtils::CStringWriter oTempWriter;
NSStringUtils::CStringBuilder oTempWriter;
READ1_DEF(length, res, this->ReadCellMargins, &oTempWriter);
if(oTempWriter.GetCurSize() > 0)
{
@ -2340,7 +2340,7 @@ public:
int ReadPaddings2(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
NSStringUtils::CStringBuilder* pCStringWriter = static_cast<NSStringUtils::CStringBuilder*>(poResult);
if (c_oSerPaddingType::left == type)
{
double dLeft = m_oBufferedStream.GetDouble();
@ -2411,7 +2411,7 @@ public:
READ1_TRACKREV(type, length, pTrackRevision)
else if (c_oSerProp_RevisionType::tblPrChange == type)
{
pTrackRevision->trPr = new XmlUtils::CStringWriter();
pTrackRevision->trPr = new NSStringUtils::CStringBuilder();
READ2_DEF(length, res, this->Read_RowPr, pTrackRevision->trPr);
}
else
@ -2425,7 +2425,7 @@ public:
READ1_TRACKREV(type, length, pTrackRevision)
else if (c_oSerProp_RevisionType::tcPrChange == type)
{
pTrackRevision->tcPr = new XmlUtils::CStringWriter();
pTrackRevision->tcPr = new NSStringUtils::CStringBuilder();
READ2_DEF(length, res, this->Read_CellPr, pTrackRevision->tcPr);
}
else
@ -2827,14 +2827,14 @@ public:
res = oBinary_rPrReader.Read(length, &oNew_rPr);
if(oNew_rPr.IsNoEmpty())
{
XmlUtils::CStringWriter oTempWriter;
NSStringUtils::CStringBuilder oTempWriter;
oNew_rPr.Write(&oTempWriter);
odocStyle->TextPr = oTempWriter.GetData();
}
}
else if(c_oSer_sts::Style_ParaPr == type)
{
XmlUtils::CStringWriter oTempWriter;
NSStringUtils::CStringBuilder oTempWriter;
oBinary_pPrReader.m_nCurNumId = -1;
oBinary_pPrReader.m_nCurLvl = -1;
res = oBinary_pPrReader.Read(length, &oTempWriter);
@ -2848,14 +2848,14 @@ public:
}
else if(c_oSer_sts::Style_RowPr == type)
{
XmlUtils::CStringWriter oTempWriter;
NSStringUtils::CStringBuilder oTempWriter;
READ2_DEF(length, res, oBinary_tblPrReader.Read_RowPr, &oTempWriter);
std::wstring sRowPr = oTempWriter.GetData();
odocStyle->RowPr = sRowPr;
}
else if(c_oSer_sts::Style_CellPr == type)
{
XmlUtils::CStringWriter oTempWriter;
NSStringUtils::CStringBuilder oTempWriter;
READ2_DEF(length, res, oBinary_tblPrReader.Read_CellPr, &oTempWriter);
std::wstring sCellPr = oTempWriter.GetData();
odocStyle->CellPr = sCellPr;
@ -2912,7 +2912,7 @@ public:
READ1_DEF(length, res, this->ReadTblStyleProperty, &otblStylePr);
if(otblStylePr.bType && otblStylePr.Writer.GetCurSize() > 0)
{
XmlUtils::CStringWriter oCStringWriter;
NSStringUtils::CStringBuilder oCStringWriter;
switch(otblStylePr.Type)
{
case ETblStyleOverrideType::tblstyleoverridetypeBand1Horz: oCStringWriter.WriteString(std::wstring(_T("<w:tblStylePr w:type=\"band1Horz\">")));break;
@ -2959,7 +2959,7 @@ public:
}
else if(c_oSerProp_tblStylePrType::ParPr == type)
{
XmlUtils::CStringWriter oTempWriter;
NSStringUtils::CStringBuilder oTempWriter;
res = oBinary_pPrReader.Read(length, &oTempWriter);
if(oTempWriter.GetCurSize() > 0)
{
@ -2978,7 +2978,7 @@ public:
}
else if(c_oSerProp_tblStylePrType::TrPr == type)
{
XmlUtils::CStringWriter oTempWriter;
NSStringUtils::CStringBuilder oTempWriter;
READ2_DEF(length, res, oBinary_tblPrReader.Read_RowPr, &oTempWriter);
if(oTempWriter.GetCurSize() > 0)
@ -2990,7 +2990,7 @@ public:
}
else if(c_oSerProp_tblStylePrType::TcPr == type)
{
XmlUtils::CStringWriter oTempWriter;
NSStringUtils::CStringBuilder oTempWriter;
READ2_DEF(length, res, oBinary_tblPrReader.Read_CellPr, &oTempWriter);
if(oTempWriter.GetCurSize() > 0)
{
@ -3711,10 +3711,10 @@ private:
Binary_pPrReader oBinary_pPrReader;
Binary_rPrReader oBinary_rPrReader;
Binary_tblPrReader oBinary_tblPrReader;
XmlUtils::CStringWriter* m_pCurWriter;
NSStringUtils::CStringBuilder* m_pCurWriter;
rPr m_oCur_rPr;
rPr m_oMath_rPr;
XmlUtils::CStringWriter m_oCur_pPr;
NSStringUtils::CStringBuilder m_oCur_pPr;
BYTE m_byteLastElemType;
CComments* m_pComments;
public:
@ -3747,7 +3747,7 @@ public:
READ_TABLE_DEF(res, this->ReadDocumentContent, NULL);
return res;
}
XmlUtils::CStringWriter& GetRunStringWriter()
NSStringUtils::CStringBuilder& GetRunStringWriter()
{
if(NULL != m_pCurWriter)
return *m_pCurWriter;
@ -3990,8 +3990,8 @@ public:
READ1_TRACKREV(type, length, pTrackRevision)
else if ( c_oSerProp_RevisionType::Content == type )
{
pTrackRevision->content = new XmlUtils::CStringWriter();
XmlUtils::CStringWriter* pPrevWriter = m_pCurWriter;
pTrackRevision->content = new NSStringUtils::CStringBuilder();
NSStringUtils::CStringBuilder* pPrevWriter = m_pCurWriter;
m_pCurWriter = pTrackRevision->content;
READ1_DEF(length, res, this->ReadParagraphContent, NULL);
m_pCurWriter = pPrevWriter;
@ -4157,7 +4157,7 @@ public:
pFldSimple->sInstr = m_oBufferedStream.GetString3(length);
else if ( c_oSer_FldSimpleType::Content == type )
{
XmlUtils::CStringWriter* pPrevWriter = m_pCurWriter;
NSStringUtils::CStringBuilder* pPrevWriter = m_pCurWriter;
m_pCurWriter = &pFldSimple->writer;
READ1_DEF(length, res, this->ReadParagraphContent, NULL);
m_pCurWriter = pPrevWriter;
@ -4447,7 +4447,7 @@ public:
pHyperlink->sTgtFrame = m_oBufferedStream.GetString3(length);
else if ( c_oSer_HyperlinkType::Content == type )
{
XmlUtils::CStringWriter* pPrevWriter = m_pCurWriter;
NSStringUtils::CStringBuilder* pPrevWriter = m_pCurWriter;
m_pCurWriter = &pHyperlink->writer;
READ1_DEF(length, res, this->ReadParagraphContent, NULL);
long rId;
@ -6119,8 +6119,8 @@ public:
READ1_TRACKREV(type, length, pTrackRevision)
else if(c_oSerProp_RevisionType::ContentRun == type)
{
pTrackRevision->contentRun = new XmlUtils::CStringWriter();
XmlUtils::CStringWriter* pPrevWriter = m_pCurWriter;
pTrackRevision->contentRun = new NSStringUtils::CStringBuilder();
NSStringUtils::CStringBuilder* pPrevWriter = m_pCurWriter;
m_pCurWriter = pTrackRevision->contentRun;
READ1_DEF(length, res, this->ReadMathMRun, NULL);
m_pCurWriter = pPrevWriter;
@ -7028,7 +7028,7 @@ public:
int ReadDocTable(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
NSStringUtils::CStringBuilder* pCStringWriter = static_cast<NSStringUtils::CStringBuilder*>(poResult);
if( c_oSerDocTableType::tblPr == type )
{
CWiterTblPr oWiterTblPr;
@ -7053,7 +7053,7 @@ public:
int Read_tblGrid(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
NSStringUtils::CStringBuilder* pCStringWriter = static_cast<NSStringUtils::CStringBuilder*>(poResult);
if( c_oSerDocTableType::tblGrid_Item == type )
{
double dgridCol = m_oBufferedStream.GetDouble();
@ -7083,7 +7083,7 @@ public:
else if(c_oSerProp_RevisionType::tblGridChange == type)
{
oBinary_tblPrReader.m_aCurTblGrid.clear();
pTrackRevision->tblGridChange = new XmlUtils::CStringWriter();
pTrackRevision->tblGridChange = new NSStringUtils::CStringBuilder();
READ2_DEF(length, res, this->Read_tblGrid, pTrackRevision->tblGridChange);
}
else
@ -7093,7 +7093,7 @@ public:
int Read_TableContent(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
NSStringUtils::CStringBuilder* pCStringWriter = static_cast<NSStringUtils::CStringBuilder*>(poResult);
if( c_oSerDocTableType::Row == type )
{
pCStringWriter->WriteString(std::wstring(_T("<w:tr>")));
@ -7124,7 +7124,7 @@ public:
int Read_Row(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
NSStringUtils::CStringBuilder* pCStringWriter = static_cast<NSStringUtils::CStringBuilder*>(poResult);
if( c_oSerDocTableType::Row_Pr == type )
{
pCStringWriter->WriteString(std::wstring(_T("<w:trPr>")));
@ -7142,7 +7142,7 @@ public:
int ReadRowContent(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
NSStringUtils::CStringBuilder* pCStringWriter = static_cast<NSStringUtils::CStringBuilder*>(poResult);
if( c_oSerDocTableType::Cell == type )
{
pCStringWriter->WriteString(std::wstring(_T("<w:tc>")));
@ -7173,7 +7173,7 @@ public:
int ReadCell(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
NSStringUtils::CStringBuilder* pCStringWriter = static_cast<NSStringUtils::CStringBuilder*>(poResult);
if( c_oSerDocTableType::Cell_Pr == type )
{
pCStringWriter->WriteString(std::wstring(_T("<w:tcPr>")));
@ -8260,7 +8260,7 @@ public:
}
else if ( c_oSerNotes::NoteContent == type )
{
XmlUtils::CStringWriter& writer = pBinary_DocumentTableReader->m_oDocumentWriter.m_oContent;
NSStringUtils::CStringBuilder& writer = pBinary_DocumentTableReader->m_oDocumentWriter.m_oContent;
if(m_bIsFootnote)
{
writer.WriteString(L"<w:footnote");

View File

@ -43,7 +43,7 @@ namespace Writers
class SettingWriter
{
std::wstring m_sDir;
XmlUtils::CStringWriter m_oSettingWriter;
NSStringUtils::CStringBuilder m_oSettingWriter;
HeaderFooterWriter& m_oHeaderFooterWriter;
public:
SettingWriter(std::wstring sDir, HeaderFooterWriter& oHeaderFooterWriter):m_sDir(sDir),m_oHeaderFooterWriter(oHeaderFooterWriter)

View File

@ -46,12 +46,12 @@ namespace Writers
class StylesWriter
{
XmlUtils::CStringWriter m_oWriter;
NSStringUtils::CStringBuilder m_oWriter;
std::wstring m_sDir;
public:
XmlUtils::CStringWriter m_Styles;
XmlUtils::CStringWriter m_rPrDefault;
XmlUtils::CStringWriter m_pPrDefault;
NSStringUtils::CStringBuilder m_Styles;
NSStringUtils::CStringBuilder m_rPrDefault;
NSStringUtils::CStringBuilder m_pPrDefault;
int m_nVersion;
StylesWriter(std::wstring sDir, int nVersion):m_sDir(sDir),m_nVersion(nVersion)
{

View File

@ -43,7 +43,7 @@ namespace Writers
class FontTableWriter
{
XmlUtils::CStringWriter m_oWriter;
NSStringUtils::CStringBuilder m_oWriter;
std::wstring m_sDir;
NSFonts::IApplicationFonts* m_pApplicationFonts;
NSFonts::IFontManager* m_pFontManager;

View File

@ -19,9 +19,10 @@ 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}
{50E20601-4A8D-4AFB-8870-63828D328429} = {50E20601-4A8D-4AFB-8870-63828D328429}
{609ED938-3CA8-4BED-B363-25096D4C4812} = {609ED938-3CA8-4BED-B363-25096D4C4812}
{94954A67-A853-43B1-A727-6EF2774C5A6A} = {94954A67-A853-43B1-A727-6EF2774C5A6A}
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C} = {C27E9A9F-3A17-4482-9C5F-BF15C01E747C}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeFileCrypt", "..\..\OfficeCryptReader\win32\ECMACryptReader.vcproj", "{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}"

View File

@ -77,6 +77,7 @@ SOURCES += \
../src/odf/office_settings.cpp \
../src/odf/office_spreadsheet.cpp \
../src/odf/office_text.cpp \
../src/odf/office_meta.cpp \
../src/odf/paragraph_elements.cpp \
../src/odf/ruby.cpp \
../src/odf/search_table_cell.cpp \
@ -185,6 +186,7 @@ SOURCES += \
../src/odf/datatypes/styleverticalrel.cpp \
../src/odf/datatypes/stylewrap.cpp \
../src/odf/datatypes/stylewrapcontourmode.cpp \
../src/odf/datatypes/stylenumformat.cpp \
../src/odf/datatypes/tablealign.cpp \
../src/odf/datatypes/tablecentering.cpp \
../src/odf/datatypes/tablemode.cpp \
@ -341,6 +343,7 @@ HEADERS += \
../src/odf/office_settings.h \
../src/odf/office_spreadsheet.h \
../src/odf/office_text.h \
../src/odf/office_meta.h \
../src/odf/paragraph_elements.h \
../src/odf/ruby.h \
../src/odf/search_table_cell.h \
@ -449,6 +452,7 @@ HEADERS += \
../src/odf/datatypes/styleverticalpos.h \
../src/odf/datatypes/styleverticalrel.h \
../src/odf/datatypes/stylewrap.h \
../src/odf/datatypes/stylenumformat.h \
../src/odf/datatypes/stylewrapcontourmode.h \
../src/odf/datatypes/tablealign.h \
../src/odf/datatypes/tablecentering.h \

View File

@ -67,6 +67,7 @@
#include "../src/odf/office_settings.cpp"
#include "../src/odf/office_spreadsheet.cpp"
#include "../src/odf/office_text.cpp"
#include "../src/odf/office_meta.cpp"
#include "../src/odf/paragraph_elements.cpp"
#include "../src/odf/ruby.cpp"
#include "../src/odf/search_table_cell.cpp"

View File

@ -128,3 +128,4 @@
#include "../src/odf/datatypes/tableorder.cpp"
#include "../src/odf/datatypes/dategroup.cpp"
#include "../src/odf/datatypes/commandtype.cpp"
#include "../src/odf/datatypes/stylenumformat.cpp"

View File

@ -190,6 +190,7 @@ docx_conversion_context::docx_conversion_context(odf_reader::odf_document * OdfD
in_paragraph_ (false),
in_header_ (false),
in_drawing_content_ (false),
in_table_content_ (false),
text_tracked_context_ (*this),
table_context_ (*this),
output_document_ (NULL),
@ -303,20 +304,21 @@ void docx_conversion_context::finish_paragraph()
void docx_conversion_context::finish_run()
{
if (in_run_)
{
output_stream() << L"</w:r>";
in_run_ = false;
if (get_comments_context().state()==2)
{
output_stream()<< L"<w:commentRangeEnd w:id=\"" << get_comments_context().current_id() << L"\" />";
add_element_to_run();
output_stream()<< L"<w:commentReference w:id=\"" << get_comments_context().current_id() << L"\" />";
get_comments_context().state(0);
finish_run();
}
}
if (false == in_run_) return;
output_stream() << L"</w:r>";
in_run_ = false;
if (get_comments_context().state()==2)
{
output_stream()<< L"<w:commentRangeEnd w:id=\"" << get_comments_context().current_id() << L"\"/>";
add_element_to_run();
output_stream()<< L"<w:commentReference w:id=\"" << get_comments_context().current_id() << L"\"/>";
get_comments_context().state(0);
finish_run();
}
}
void docx_conversion_context::start_math_formula()
{
@ -332,6 +334,73 @@ void docx_conversion_context::end_math_formula()
output_stream() << L"<m:oMath>" << math_content << L"</m:oMath>";
}
}
void docx_conversion_context::start_table_content(int type)
{
in_table_content_ = true;
std::wstring sType;
switch(type)
{
case 1: sType = L"Table of Contents"; break;
case 2: sType = L"List od Illustrations"; break;
}
output_stream() << L"<w:sdt>";
output_stream() << L"<w:sdtPr>";
//output_stream() << L"<w:id w:val=\"-505364165\"/>";
output_stream() << L"<w:docPartObj>";
output_stream() << L"<w:docPartGallery w:val=\"" << sType << L"\"/>";
output_stream() << L"<w:docPartUnique/>";
output_stream() << L"</w:docPartObj>";
output_stream() << L"</w:sdtPr>";
output_stream() << L"<w:sdtContent>";
}
void docx_conversion_context::end_table_content()
{
if (!in_table_content_) return;
output_stream() << L"</w:sdtContent>";
output_stream() << L"</w:sdt>";
in_table_content_ = false;
}
void docx_conversion_context::start_bookmark (const std::wstring &name)
{
std::map<std::wstring, int>::iterator pFind = mapBookmarks.find(name);
int id = -1;
if (pFind == mapBookmarks.end())
{
id = mapBookmarks.size() + 1;
mapBookmarks.insert(std::make_pair(name, id));
}
else
{
id = pFind->second;
}
finish_run();
output_stream() << L"<w:bookmarkStart w:id=\"" << std::to_wstring(id) << L"\" w:name=\"" << name << L"\"/>";
}
void docx_conversion_context::end_bookmark (const std::wstring &name)
{
std::map<std::wstring, int>::iterator pFind = mapBookmarks.find(name);
int id = -1;
if (pFind == mapBookmarks.end())
{
return; //???
}
else
{
id = pFind->second;
}
finish_run();
output_stream() << L"<w:bookmarkEnd w:id=\"" << std::to_wstring(id) << L"\"/>";
}
void docx_conversion_context::start_chart(std::wstring name)
{
@ -993,7 +1062,8 @@ void docx_conversion_context::start_automatic_style(const std::wstring & ParentI
void docx_conversion_context::end_automatic_style()
{
in_automatic_style_ = false;
automatic_parent_style_ = L"";
automatic_parent_style_.clear();
tabs_context_.clear();
}
bool docx_conversion_context::in_automatic_style()
@ -1207,33 +1277,36 @@ int docx_conversion_context::process_paragraph_attr(odf_reader::text::paragraph_
if (odf_reader::style_content * styleContent = styleInst->content())
{
std::wstring id;
//office_element_ptr parent_tab_stops_;
if (const odf_reader::style_instance * parentStyleContent = styleInst->parent())
{
id = styles_map_.get( parentStyleContent->name(), parentStyleContent->type() );
//odf_reader::paragraph_format_properties parent_properties = odf_reader::calc_paragraph_properties_content(styleInst);
//parent_tab_stops_ = parent_properties.style_tab_stops_;
}
start_automatic_style(id);
{//вытаскивает rtl c цепочки стилей !! - просто прописать в наследуемом НЕЛЬЗЯ !!
odf_reader::paragraph_format_properties properties = odf_reader::calc_paragraph_properties_content(styleInst);
if (properties.style_writing_mode_)
odf_reader::calc_tab_stops(styleInst, get_tabs_context());
//вытаскивает rtl c цепочки стилей !! - просто прописать в наследуемом НЕЛЬЗЯ !!
odf_reader::paragraph_format_properties properties = odf_reader::calc_paragraph_properties_content(styleInst);
if (properties.style_writing_mode_)
{
odf_types::writing_mode::type type = properties.style_writing_mode_->get_type();
switch(type)
{
odf_types::writing_mode::type type = properties.style_writing_mode_->get_type();
switch(type)
{
case odf_types::writing_mode::RlTb:
case odf_types::writing_mode::TbRl:
case odf_types::writing_mode::Rl:
set_rtl(true);
break;
default:
set_rtl(false);
}
case odf_types::writing_mode::RlTb:
case odf_types::writing_mode::TbRl:
case odf_types::writing_mode::Rl:
set_rtl(true);
break;
default:
set_rtl(false);
}
set_margin_left(properties.fo_margin_left_? 20.0 * properties.fo_margin_left_->get_length().get_value_unit(odf_types::length::pt) : 0);
//for calculate tabs
}
set_margin_left(properties.fo_margin_left_? 20.0 * properties.fo_margin_left_->get_length().get_value_unit(odf_types::length::pt) : 0);
styleContent->docx_convert(*this);
@ -1346,7 +1419,7 @@ void docx_conversion_context::process_page_break_after(const odf_reader::style_i
{
if (inst->content() && inst->content()->get_style_paragraph_properties())
{
_CP_OPT(odf_types::fo_break) fo_break_val = inst->content()->get_style_paragraph_properties()->content().fo_break_after_;
_CP_OPT(odf_types::fo_break) fo_break_val = inst->content()->get_style_paragraph_properties()->content_.fo_break_after_;
if (fo_break_val)
{
if (fo_break_val->get_type() == odf_types::fo_break::Page)
@ -1742,6 +1815,7 @@ void docx_conversion_context::add_user_field(const std::wstring & name, const st
{
map_user_fields.insert(std::make_pair(name, value));
}
std::wstring docx_conversion_context::get_user_field(const std::wstring & name)
{
std::map<std::wstring, std::wstring>::iterator pFind = map_user_fields.find(name);

View File

@ -222,6 +222,7 @@ public:
{
current_level_--;
frames_.pop_back();
caption_.clear();
}
std::wstring & get_text_stream_frame()
@ -257,6 +258,7 @@ public:
current_shape_ = NULL;
shape_text_content_.clear();
current_shape_id_ = 0;
caption_.clear();
}
void stop_control()
{
@ -264,6 +266,7 @@ public:
current_control_ = NULL;
shape_text_content_.clear();
current_shape_id_ = 0;
caption_.clear();
}
void stop_group()
{
@ -288,6 +291,11 @@ public:
else return NULL;
}
odf_reader::draw_shape * get_current_shape() const { return current_shape_; }
void set_next_object_caption(const std::wstring & value)
{
caption_ = value;
}
private:
std::wstring shape_text_content_;
@ -306,6 +314,7 @@ private:
odf_reader::draw_control*current_control_;
std::wstring zero_string_;
std::wstring caption_;
};
@ -627,7 +636,7 @@ public:
void add_user_field (const std::wstring & name, const std::wstring & value);
std::wstring get_user_field (const std::wstring & name);
void add_element_to_run (std::wstring parenStyleId = _T(""));
void add_element_to_run (std::wstring parenStyleId = _T(""));
void finish_run ();
void add_new_run (std::wstring parentStyleId = _T(""));
bool get_run_state () { return in_run_; }
@ -636,6 +645,7 @@ public:
void start_paragraph (bool is_header = false);
void finish_paragraph ();
bool is_table_content () { return in_table_content_; }
bool is_paragraph_header () { return in_header_; }
bool get_paragraph_state () { return in_paragraph_; }
void set_paragraph_state (bool val) { in_paragraph_ = val; }
@ -674,7 +684,10 @@ public:
void start_office_text ();
void end_office_text ();
void process_styles ();
void start_table_content (int type);
void end_table_content ();
void process_styles ();
void process_fonts ();
void process_list_styles ();
@ -748,6 +761,7 @@ public:
notes_context & get_notes_context() { return notes_context_; }
text_tracked_context& get_text_tracked_context(){ return text_tracked_context_; }
text_forms_context & get_forms_context() { return text_forms_context_; }
tabs_context & get_tabs_context() { return tabs_context_;}
void docx_convert_delayed ();
void add_delayed_element (odf_reader::office_element * Elm);
@ -781,6 +795,9 @@ public:
void start_text_changes (std::wstring id);
void end_text_changes (std::wstring id);
void start_bookmark (const std::wstring &name);
void end_bookmark (const std::wstring &name);
void set_process_headers_footers(bool Val) { process_headers_footers_ = Val; }
headers_footers & get_headers_footers() { return headers_footers_; }
header_footer_context & get_header_footer_context() { return header_footer_context_; }
@ -806,6 +823,7 @@ private:
std::wstringstream footer_xml_;
std::wstringstream header_xml_;
std::wstringstream settings_xml_;
std::wstringstream meta_xml_;
styles_context styles_context_;
math_context math_context_;
@ -818,6 +836,7 @@ private:
notes_context notes_context_;
text_tracked_context text_tracked_context_;
text_forms_context text_forms_context_;
tabs_context tabs_context_;
boost::shared_ptr<streams_man> streams_man_;
@ -844,6 +863,7 @@ private:
bool in_automatic_style_;
bool in_drawing_content_;
bool in_table_content_;
bool in_paragraph_;
bool in_run_;
bool in_header_;
@ -862,6 +882,7 @@ private:
boost::unordered_map<std::wstring, std::wstring> list_style_renames_;// цепочки переименований нумераций
std::map<std::wstring, std::wstring> map_user_fields;
std::map<std::wstring, int> mapBookmarks;
};
}

View File

@ -39,10 +39,9 @@
namespace cpdoccore {
namespace oox {
/**/
docx_table_state::docx_table_state(docx_conversion_context & Context,
const std::wstring & StyleName) : context_(Context),
docx_table_state::docx_table_state(docx_conversion_context & Context, const std::wstring & StyleName) :
context_(Context),
table_style_(StyleName),
current_table_column_(-1),
columns_spanned_num_(0),
@ -93,6 +92,19 @@ std::wstring docx_table_state::current_row_style() const
return L"";
}
double docx_table_state::get_current_cell_width()
{
if (current_table_column_ < columns_width_.size())
return columns_width_[current_table_column_];
else
return 0;
}
void docx_table_state::add_column_width(double width)
{
columns_width_.push_back(width);
}
void docx_table_state::start_cell()
{
current_table_column_++;
@ -102,7 +114,6 @@ void docx_table_state::start_cell()
void docx_table_state::end_cell()
{}
bool docx_table_state::start_covered_cell(docx_conversion_context & Context)
{
std::wostream & _Wostream = context_.output_stream();

View File

@ -70,6 +70,8 @@ public:
void set_rows_spanned(unsigned int Column, unsigned int Val, unsigned int ColumnsSpanned, const std::wstring & Style);
unsigned int current_rows_spanned(unsigned int Column) const;
double get_current_cell_width();
void add_column_width(double width);
private:
docx_conversion_context & context_;
std::wstring table_style_;
@ -81,7 +83,8 @@ private:
std::vector<table_row_spanned> rows_spanned_;
bool close_table_covered_cell_;
std::vector<unsigned int> columns_;
std::vector<std::wstring> columnsDefaultCellStyleName_;
std::vector<double> columns_width_;
std::vector<std::wstring> columnsDefaultCellStyleName_;
};
@ -135,6 +138,14 @@ public:
{
return table_states_.back().start_cell();
}
double get_current_cell_width()
{
return table_states_.back().get_current_cell_width();
}
void add_column_width(double width)
{
table_states_.back().add_column_width(width);
}
void end_cell()
{

View File

@ -39,9 +39,58 @@
#include "../odf/odfcontext.h"
#include "../odf/style_text_properties.h"
#include "../odf/style_paragraph_properties.h"
namespace cpdoccore {
void tabs_context::reset()
{
for (size_t i = 0; i < tabs.size(); i++)
{
odf_reader::style_tab_stop *tab_stop = dynamic_cast<odf_reader::style_tab_stop*>(tabs[i].get());
if (tab_stop)
{
clear_tabs.insert(std::make_pair(tab_stop->style_position_.get_value(), tabs[i]));
}
}
tabs.clear();
}
void tabs_context::add(const odf_reader::office_element_ptr & element)
{
odf_reader::style_tab_stop *tab_stop = dynamic_cast<odf_reader::style_tab_stop*>(element.get());
if (tab_stop)
{
std::map<double, odf_reader::office_element_ptr>::iterator pFind = clear_tabs.find(tab_stop->style_position_.get_value());
if (pFind != clear_tabs.end())
{
clear_tabs.erase(pFind);
}
tabs.push_back(element);
}
}
void tabs_context::docx_convert(oox::docx_conversion_context & Context)
{
if (clear_tabs.empty() && tabs.empty()) return;
std::wstringstream & _pPr = Context.get_styles_context().paragraph_nodes();
_pPr << L"<w:tabs>";
for (std::map<double, odf_reader::office_element_ptr>::iterator it = clear_tabs.begin(); it != clear_tabs.end(); ++it)
{
odf_reader::style_tab_stop * tab_stop = dynamic_cast<odf_reader::style_tab_stop*>(it->second.get());
tab_stop->docx_convert(Context, true);
}
for (size_t i = 0; i < tabs.size(); i++)
{
odf_reader::style_tab_stop * tab_stop = dynamic_cast<odf_reader::style_tab_stop*>(tabs[i].get());
tab_stop->docx_convert(Context, false);
}
_pPr << L"</w:tabs>";
}
void styles_context::start_process_style(const odf_reader::style_instance * Instance)
{
current_processed_style_ = Instance;

View File

@ -33,6 +33,8 @@
#include <sstream>
#include <iosfwd>
#include <map>
#include <vector>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
@ -40,14 +42,41 @@
namespace cpdoccore {
namespace oox{
class docx_conversion_context;
class pptx_conversion_context;
};
namespace odf_reader
{
class style_instance;
class style_text_properties;
class fonts_container;
typedef boost::shared_ptr<style_text_properties> style_text_properties_ptr;
class office_element;
typedef boost::shared_ptr<office_element> office_element_ptr;
};
class tabs_context : boost::noncopyable
{
public:
std::vector<odf_reader::office_element_ptr> tabs;
std::map<double, odf_reader::office_element_ptr> clear_tabs;
void clear()
{
tabs.clear();
clear_tabs.clear();
}
void reset();
void add(const odf_reader::office_element_ptr & element);
void docx_convert(oox::docx_conversion_context & Context);
};
class styles_context : boost::noncopyable
{
public:

View File

@ -31,8 +31,6 @@
*/
#include "calcs_styles.h"
#include <boost/foreach.hpp>
#include <vector>
#include <algorithm>
namespace cpdoccore {
@ -44,10 +42,10 @@ namespace odf_reader {
text_format_properties_content calc_text_properties_content(const std::vector<const style_text_properties*> & textProps)
{
text_format_properties_content result;
BOOST_FOREACH(const style_text_properties* v, textProps)
for (size_t i = 0; i < textProps.size(); i++)
{
if (v)
result.apply_from(v->content());
if (textProps[i])
result.apply_from(textProps[i]->content());
}
return result;
}
@ -60,20 +58,21 @@ text_format_properties_content calc_text_properties_content(const style_instance
{
if (const style_content * content = styleInstance->content())
if (const style_text_properties * textProp = content->get_style_text_properties())
textProps.push_back(textProp);
{
textProps.insert(textProps.begin(), textProp);
}
styleInstance = styleInstance->parent();
}
reverse(textProps.begin(), textProps.end());
return calc_text_properties_content(textProps);
}
text_format_properties_content calc_text_properties_content(const std::vector<const style_instance *> & styleInstances)
{
text_format_properties_content result;
BOOST_FOREACH(const style_instance * inst, styleInstances)
for (size_t i = 0; i < styleInstances.size(); i++)
{
result.apply_from(calc_text_properties_content(inst));
result.apply_from(calc_text_properties_content(styleInstances[i]));
}
return result;
}
@ -82,10 +81,10 @@ text_format_properties_content calc_text_properties_content(const std::vector<co
graphic_format_properties calc_graphic_properties_content(const std::vector<const graphic_format_properties*> & graphicProps)
{
graphic_format_properties result;
BOOST_FOREACH(const graphic_format_properties* v, graphicProps)
for (size_t i = 0; i < graphicProps.size(); i++)
{
if (v)
result.apply_from(v);
if (graphicProps[i])
result.apply_from(graphicProps[i]);
}
return result;
}
@ -97,20 +96,22 @@ graphic_format_properties calc_graphic_properties_content(const style_instance *
{
if (const style_content * content = styleInstance->content())
if (const graphic_format_properties * graphicProp = content->get_graphic_properties())
graphicProps.push_back(graphicProp);
{
graphicProps.insert(graphicProps.begin(), graphicProp);
}
styleInstance = styleInstance->parent();
}
reverse(graphicProps.begin(), graphicProps.end());
return calc_graphic_properties_content(graphicProps);
}
graphic_format_properties calc_graphic_properties_content(const std::vector<const style_instance *> & styleInstances)
{
graphic_format_properties result;
BOOST_FOREACH(const style_instance * inst, styleInstances)
{
graphic_format_properties f = calc_graphic_properties_content(inst);
for (size_t i = 0; i < styleInstances.size(); i++)
{
graphic_format_properties f = calc_graphic_properties_content(styleInstances[i]);
result.apply_from(&f);
}
return result;
@ -121,10 +122,11 @@ graphic_format_properties calc_graphic_properties_content(const std::vector<cons
paragraph_format_properties calc_paragraph_properties_content(const std::vector<const style_paragraph_properties*> & parProps)
{
paragraph_format_properties result;
BOOST_FOREACH(const style_paragraph_properties* v, parProps)
for (size_t i = 0; i < parProps.size(); i++)
{
if (v)
result.apply_from(v->content());
if (parProps[i])
result.apply_from(parProps[i]->content_);
}
return result;
}
@ -136,32 +138,60 @@ paragraph_format_properties calc_paragraph_properties_content(const style_instan
{
if (const style_content * content = styleInstance->content())
if (const style_paragraph_properties * parProp = content->get_style_paragraph_properties())
parProps.push_back(parProp);
{
parProps.insert(parProps.begin(), parProp);
}
styleInstance = styleInstance->parent();
}
reverse(parProps.begin(), parProps.end());
return calc_paragraph_properties_content(parProps);
}
paragraph_format_properties calc_paragraph_properties_content(const std::vector<const style_instance *> & styleInstances)
{
paragraph_format_properties result;
BOOST_FOREACH(const style_instance * inst, styleInstances)
for (size_t i = 0; i < styleInstances.size(); i++)
{
result.apply_from(calc_paragraph_properties_content(inst));
result.apply_from(calc_paragraph_properties_content(styleInstances[i]));
}
return result;
}
void calc_tab_stops(const style_instance * styleInstance, tabs_context & context)
{
std::vector<const style_paragraph_properties*> parProps;
while (styleInstance)
{
if (const style_content * content = styleInstance->content())
if (const style_paragraph_properties * parProp = content->get_style_paragraph_properties())
{
parProps.insert(parProps.begin(), parProp);
}
styleInstance = styleInstance->parent();
}
for (size_t i = 0; i < parProps.size(); i++)
{
if (parProps[i]->content_.style_tab_stops_)
{
style_tab_stops *tab_stops = dynamic_cast<style_tab_stops*>(parProps[i]->content_.style_tab_stops_.get());
context.reset();
for (size_t j = 0; j < tab_stops->content_.size(); j++)
{
context.add(tab_stops->content_[j]);
}
}
}
}
//////
style_table_cell_properties_attlist calc_table_cell_properties(const std::vector<const style_table_cell_properties*> & props)
{
style_table_cell_properties_attlist result;
BOOST_FOREACH(const style_table_cell_properties* v, props)
for (size_t i = 0; i < props.size(); i++)
{
if (v)
result.apply_from(v->attlist_);
if (props[i])
result.apply_from(props[i]->attlist_);
}
return result;
}
@ -173,19 +203,20 @@ style_table_cell_properties_attlist calc_table_cell_properties(const style_insta
{
if (const style_content * content = styleInstance->content())
if (const style_table_cell_properties * prop = content->get_style_table_cell_properties())
props.push_back(prop);
{
props.insert(props.begin(), prop);
}
styleInstance = styleInstance->parent();
}
reverse(props.begin(), props.end());
return calc_table_cell_properties(props);
}
style_table_cell_properties_attlist calc_table_cell_properties(const std::vector<const style_instance *> & styleInstances)
{
style_table_cell_properties_attlist result;
BOOST_FOREACH(const style_instance * inst, styleInstances)
for (size_t i = 0; i < styleInstances.size(); i++)
{
result.apply_from(calc_table_cell_properties(inst));
result.apply_from(calc_table_cell_properties(styleInstances[i]));
}
return result;
}

View File

@ -41,6 +41,7 @@
#include <vector>
namespace cpdoccore {
class tabs_context;
namespace odf_reader {
graphic_format_properties calc_graphic_properties_content(const style_instance * styleInstance);
@ -55,5 +56,6 @@ paragraph_format_properties calc_paragraph_properties_content(const std::vector<
style_table_cell_properties_attlist calc_table_cell_properties(const style_instance * styleInstance);
style_table_cell_properties_attlist calc_table_cell_properties(const std::vector<const style_instance *> & styleInstances);
void calc_tab_stops(const style_instance * styleInstance, tabs_context & context);
}
}

View File

@ -49,6 +49,7 @@
#include "styleverticalpos.h"
#include "stylehorizontalpos.h"
#include "stylehorizontalrel.h"
#include "stylenumformat.h"
#include "percentorscale.h"
#include "anchortype.h"
#include "linewidth.h"
@ -331,8 +332,8 @@ public:
void apply_from(const common_num_format_attlist & Other);
void serialize(CP_ATTR_NODE);
_CP_OPT(std::wstring) style_num_format_;
_CP_OPT(Bool) style_num_letter_sync_;
_CP_OPT(odf_types::style_numformat) style_num_format_;
_CP_OPT(Bool) style_num_letter_sync_;
};

View File

@ -0,0 +1,140 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "stylenumformat.h"
#include <boost/algorithm/string.hpp>
#include <ostream>
namespace cpdoccore { namespace odf_types {
std::wostream & operator << (std::wostream & _Wostream, const style_numformat & _Val)
{
switch(_Val.get_type())
{
case style_numformat::arabic:
_Wostream << L"1";
break;
case style_numformat::romanUc:
_Wostream << L"I";
break;
case style_numformat::romanLc:
_Wostream << L"i";
break;
case style_numformat::alphaUc:
_Wostream << L"A";
break;
case style_numformat::alphaLc:
_Wostream << L"a";
break;
case style_numformat::aiueo:
_Wostream << L"ア, イ, ウ, ...";
break;
case style_numformat::chineseCounting:
_Wostream << L"イ, ロ, ハ, ...";
break;
case style_numformat::chineseLegal:
_Wostream << L"一, 二, 三, ...";
break;
case style_numformat::ideographLegal:
_Wostream << L"壹, 貳, 參, ...";
break;
case style_numformat::ideographTraditional:
_Wostream << L"甲, 乙, 丙, ...";
break;
case style_numformat::ideographZodiac:
_Wostream << L"子, 丑, 寅, ...";
break;
case style_numformat::ideographZodiacTraditional:
_Wostream << L"甲子, 乙丑, 丙寅, ...";
break;
case style_numformat::iroha:
_Wostream << L"イ, ロ, ハ, ...";
break;
case style_numformat::koreanDigital:
_Wostream << L"일, 이, 삼, ...";
break;
case style_numformat::russianLo:
_Wostream << L"А, Б, .., Аа, Аб, ... (ru)";
break;
case style_numformat::russianUp:
_Wostream << L"А, Б, .., Аа, Аб, ... (ru)";
break;
default:
break;
}
return _Wostream;
}
style_numformat style_numformat::parse(const std::wstring & Str)
{
std::wstring tmp = Str;
boost::algorithm::to_lower(tmp);
if (tmp == L"1")
return style_numformat( arabic );
else if (tmp == L"I")
return style_numformat( romanUc );
else if (tmp == L"i")
return style_numformat( romanLc );
else if (tmp == L"A")
return style_numformat( alphaUc );
else if (tmp == L"a")
return style_numformat( alphaLc );
else if (tmp == L"А, Б, .., Аа, Аб, ... (ru)")
return style_numformat( russianUp );
else if (tmp == L"일, 이, 삼, ...")
return style_numformat( koreanDigital );
else if (tmp == L"イ, ロ, ハ, ...")
return style_numformat( iroha );
else if (tmp == L"甲, 乙, 丙, ...")
return style_numformat( ideographTraditional );
else if (tmp == L"甲子, 乙丑, 丙寅, ...")
return style_numformat( ideographZodiacTraditional );
else if (tmp == L"子, 丑, 寅, ...")
return style_numformat( ideographZodiac );
else if (tmp == L"壹, 貳, 參, ...")
return style_numformat( ideographLegal );
else if (tmp == L"一, 二, 三, ...")
return style_numformat( chineseLegal );
else if (tmp == L"イ, ロ, ハ, ...")
return style_numformat( chineseCounting );
else if (tmp == L"ア, イ, ウ, ...")
return style_numformat( aiueo );
else
{
return style_numformat( arabic );
}
}
} }

View File

@ -0,0 +1,94 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#ifndef _CPDOCCORE_ODF_STYLENUMFORMAT_H_
#define _CPDOCCORE_ODF_STYLENUMFORMAT_H_
#ifdef _MSC_VER
#pragma once
#endif
#include <iosfwd>
#include <string>
#include "odfattributes.h"
namespace cpdoccore { namespace odf_types {
class style_numformat
{
public:
enum type
{
arabic,
romanUc,
romanLc,
alphaUc,
alphaLc,
aiueo,
chineseCounting,
chineseLegal,
ideographLegal,
ideographTraditional,
ideographZodiac,
ideographZodiacTraditional,
iroha,
koreanDigital,
russianLo,
russianUp
};
style_numformat() {}
style_numformat(type _Type) : type_(_Type)
{}
type get_type() const
{
return type_;
};
static style_numformat parse(const std::wstring & Str);
private:
type type_;
};
std::wostream & operator << (std::wostream & _Wostream, const style_numformat & _Val);
}
APPLY_PARSE_XML_ATTRIBUTES(odf_types::style_numformat);
}
#endif

View File

@ -1247,10 +1247,13 @@ void draw_text_box::docx_convert(oox::docx_conversion_context & Context)
size_t min_y = get_value_emu(draw_text_box_attlist_.fo_min_height_->get_length());
if (drawing->cy < min_y)
{
auto_fit_text = true;
drawing->cy = min_y;
}
if (drawing->cy < 36000) auto_fit_shape = true;
//if (drawing->cy < 36000)
//{
// auto_fit_shape = true;
//}
auto_fit_shape = true;
}
@ -1262,7 +1265,11 @@ void draw_text_box::docx_convert(oox::docx_conversion_context & Context)
auto_fit_text = true;
drawing->cx = min_x;
}
if (drawing->cx < 36000) auto_fit_shape = true;
if (drawing->cx < 36000)
{
auto_fit_text = false;
auto_fit_shape = true;
}
}

View File

@ -77,6 +77,10 @@ void content_xml_t::add_child_element( xml::sax * Reader, const std::wstring & N
create_element_and_read(Reader, Ns, Name, content_, &context_, true);
}
else if CP_CHECK_NAME(L"office", L"document-settings")
{
create_element_and_read(Reader, Ns, Name, content_, &context_, true);
}
else if CP_CHECK_NAME(L"office", L"document-meta")
{
create_element_and_read(Reader, Ns, Name, content_, &context_, true);
}
@ -88,6 +92,7 @@ void content_xml_t::add_child_element( xml::sax * Reader, const std::wstring & N
{
create_element_and_read(Reader, Ns, Name, content_, &context_, true);
}
}
void content_xml_t::add_text(const std::wstring & Text)

View File

@ -56,6 +56,7 @@
#include "office_scripts.h"
#include "office_forms.h"
#include "office_event_listeners.h"
#include "office_meta.h"
#include "styles.h"
#include "style_regions.h"
@ -142,6 +143,9 @@ odf_document::Impl::Impl(xml::sax * Reader, const std::wstring & tempPath):
_CP_LOG << L"[info] parse manifest" << std::endl;
parse_manifests(content_xml_->get_content());
_CP_LOG << L"[info] parse meta" << std::endl;
parse_meta(content_xml_->get_content());
_CP_LOG << L"[info] parse settings" << std::endl;
parse_settings(content_xml_->get_content());
@ -207,6 +211,8 @@ odf_document::Impl::Impl(const std::wstring & srcPath, const std::wstring & temp
_CP_LOG << L"[info] read styles.xml" << std::endl;
styles_xml_ = read_file_content(styles_xml);
_CP_LOG << L"[info] read meta.xml" << std::endl;
meta_xml_ = read_file_content(meta_xml);
//----------------------------------------------------------------------------------------
_CP_LOG << L"[info] parse fonts" << std::endl;
parse_fonts(content_xml_ ? content_xml_->get_content() : NULL);
@ -217,6 +223,8 @@ odf_document::Impl::Impl(const std::wstring & srcPath, const std::wstring & temp
_CP_LOG << L"[info] parse settings" << std::endl;
parse_settings(settings_xml_ ? settings_xml_->get_content() : NULL);
_CP_LOG << L"[info] parse meta" << std::endl;
parse_meta(meta_xml_ ? meta_xml_->get_content() : NULL);
}
else
{
@ -636,7 +644,26 @@ void odf_document::Impl::parse_settings(office_element *element)
}
}
}
}
}
void odf_document::Impl::parse_meta(office_element *element)
{
office_document_base * document = dynamic_cast<office_document_base *>( element );
if (!document) return;
office_meta * meta = dynamic_cast<office_meta*>(document->office_meta_.get());
if (!meta) return;
for (size_t i = 0; i < meta->meta_user_defined_.size(); i++)
{
meta_user_defined * user_defined = dynamic_cast<meta_user_defined*>(meta->meta_user_defined_[i].get());
if (!user_defined) continue;
if (user_defined->meta_name_.empty()) continue;
context_->Settings().add_user_defined(user_defined->meta_name_, user_defined->content_);
}
}
void odf_document::Impl::parse_styles(office_element *element)
@ -691,12 +718,13 @@ void odf_document::Impl::parse_styles(office_element *element)
( L"common:" + styleInst->style_name_,
styleInst->style_display_name_.get_value_or(L""),
styleInst->style_family_.get_type(),
&(styleInst->style_content_),
&(styleInst->content_),
true,
false,
styleInst->style_parent_style_name_.get_value_or(L""),
styleInst->style_next_style_name_.get_value_or(L""),
styleInst->style_data_style_name_.get_value_or(L"")
styleInst->style_data_style_name_.get_value_or(L""),
styleInst->style_class_.get_value_or(L"")
);
}
// list styles
@ -770,12 +798,13 @@ void odf_document::Impl::parse_styles(office_element *element)
context_->styleContainer().add_style(L"",
L"",
styleInst->style_family_.get_type(),
&(styleInst->style_content_),
&(styleInst->content_),
false,
true,
L"",
L"",
L"");
L"",
L"");
}
for (size_t i = 0; i < docStyles->style_presentation_page_layout_.size(); i++)
{
@ -807,12 +836,13 @@ void odf_document::Impl::parse_styles(office_element *element)
context_->styleContainer().add_style(styleInst->style_name_,
styleInst->style_display_name_.get_value_or(L""),
styleInst->style_family_.get_type(),
&(styleInst->style_content_),
&(styleInst->content_),
false,
false,
styleInst->style_parent_style_name_.get_value_or(L""),
styleInst->style_next_style_name_.get_value_or(L""),
styleInst->style_data_style_name_.get_value_or(L"")
styleInst->style_data_style_name_.get_value_or(L""),
styleInst->style_class_.get_value_or(L"")
);
}
@ -957,12 +987,13 @@ void odf_document::Impl::parse_styles(office_element *element)
context_->styleContainer().add_style(styleInst->style_name_,
styleInst->style_display_name_.get_value_or(L""),
styleInst->style_family_.get_type(),
&(styleInst->style_content_),
&(styleInst->content_),
true,
false,
styleInst->style_parent_style_name_.get_value_or(L""),
styleInst->style_next_style_name_.get_value_or(L""),
styleInst->style_data_style_name_.get_value_or(L"")
styleInst->style_data_style_name_.get_value_or(L""),
styleInst->style_class_.get_value_or(L"")
);
}

View File

@ -96,6 +96,7 @@ private:
void parse_fonts (office_element *elemen);
void parse_manifests(office_element *element);
void parse_settings (office_element *element);
void parse_meta (office_element *element);
bool decrypt_folder (const std::wstring &password, const std::wstring & srcPath, const std::wstring & dstPath);
bool decrypt_file (const std::wstring &password, const std::wstring & srcPath, const std::wstring & dstPath, office_element_ptr data, int size );

View File

@ -47,7 +47,8 @@ style_instance::style_instance(
bool IsDefault,
const std::wstring & ParentStyleName,
const std::wstring & NextStyleName,
const std::wstring & DataStyleName
const std::wstring & DataStyleName,
const std::wstring & StyleClass
) :
container_ (Container),
name_ (Name),
@ -56,6 +57,7 @@ style_instance::style_instance(
is_automatic_ (IsAutomatic),
is_default_ (IsDefault),
next_name_ (NextStyleName),
style_class_ (StyleClass),
next_ (Container->style_by_name(NextStyleName, style_type_, false)),
data_style_name_(DataStyleName)
{
@ -83,7 +85,8 @@ void styles_container::add_style( const std::wstring & Name,
bool IsDefault,
const std::wstring & ParentStyleName_,
const std::wstring & NextStyleName,
const std::wstring & DataStyleName)
const std::wstring & DataStyleName,
const std::wstring & StyleClass)
{
std::wstring ParentStyleName = ParentStyleName_;
@ -91,9 +94,8 @@ void styles_container::add_style( const std::wstring & Name,
{
ParentStyleName = L"";//иначе в коде возможно зацикливание.
}
style_instance_ptr newStyle = style_instance_ptr(
new style_instance(this, Name, Type, Content, IsAutomatic, IsDefault, ParentStyleName, NextStyleName, DataStyleName)
);
style_instance_ptr newStyle = style_instance_ptr( new style_instance(this, Name, Type, Content, IsAutomatic, IsDefault,
ParentStyleName, NextStyleName, DataStyleName, StyleClass));
instances_.push_back(newStyle);
int pos = static_cast<int>(instances_.size() - 1);
@ -180,6 +182,10 @@ const std::wstring & style_instance::data_style_name() const
{
return data_style_name_;
}
const std::wstring & style_instance::style_class() const
{
return style_class_;
}
style_instance * styles_container::style_by_name(const std::wstring & Name, style_family::type Type, bool object_in_styles) const
{

View File

@ -64,7 +64,8 @@ public:
bool IsDefault,
const std::wstring & ParentStyleName,
const std::wstring & NextStyleName,
const std::wstring & DataStyleName
const std::wstring & DataStyleName,
const std::wstring & StyleClass
);
@ -77,6 +78,7 @@ public:
const std::wstring & next_name() const;
const styles_container * container() const { return container_; }
const std::wstring & data_style_name() const;
const std::wstring & style_class() const;
bool is_automatic() const;
bool is_default() const;
@ -90,6 +92,7 @@ private:
bool is_automatic_;
bool is_default_;
std::wstring style_class_;
std::wstring parent_name_;
std::wstring next_name_;
mutable style_instance * parent_;
@ -145,7 +148,8 @@ public:
bool IsDefault,
const std::wstring & ParentStyleName,
const std::wstring & NextStyleName,
const std::wstring & DataStyleName);
const std::wstring & DataStyleName,
const std::wstring & StyleClass);
void add_master_page_name(const std::wstring & StyleName, const std::wstring & MasterPageName);

View File

@ -74,7 +74,9 @@ void office_document_base::add_child_element( xml::sax * Reader, const std::wstr
CP_CREATE_ELEMENT(office_scripts_);
else if CP_CHECK_NAME(L"office", L"settings")
CP_CREATE_ELEMENT(office_settings_);
else if CP_CHECK_NAME(L"manifest", L"file-entry")
else if CP_CHECK_NAME(L"office", L"meta")
CP_CREATE_ELEMENT(office_meta_);
else if CP_CHECK_NAME(L"manifest", L"file-entry")
CP_CREATE_ELEMENT(manifests_);
else
CP_NOT_APPLICABLE_ELM();

View File

@ -46,9 +46,14 @@ enum ElementType
typeTextBookmark,
typeTextBookmarkStart,
typeTextBookmarkEnd,
typeTextBookmarkRef,
typeTextReferenceMark,
typeTextReferenceMarkStart,
typeTextReferenceMarkEnd,
typeTextFieldFieldmarkStart,
typeTextFieldFieldmarkEnd,
typeTextSpan,
typeTextA,
typeTextNote,
@ -99,6 +104,9 @@ enum ElementType
typeDcCreator,
typeDcDate,
typeDcDescription,
typeDcSubject,
typeDcTitle,
typeDrawA,
@ -151,6 +159,8 @@ enum ElementType
typeTextUserFieldSet,
typeTextUserFieldInput,
typeTextUserDefined,
typeTextTrackedChanges,
typeTextChangedRegion,
typeTextChangeStart,
@ -369,6 +379,15 @@ enum ElementType
typeOfficeSettingsConfigItemMapNamed,
typeOfficeSettingsConfigItemMapEntry,
typeOfficeMeta,
typeOfficeMetaUserDefined,
typeOfficeMetaDocumentStatistic,
typeOfficeMetaGenerator,
typeOfficeMetaCreationDate,
typeOfficeMetaKeyword,
typeOfficeMetaEditingCycles,
typeOfficeMetaEditingDuration,
typeDrawG,
typeDrawFrame,
typeDrawImage,

View File

@ -0,0 +1,111 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "office_meta.h"
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include "serialize_elements.h"
namespace cpdoccore {
namespace odf_reader {
// office:meta
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * office_meta::ns = L"office";
const wchar_t * office_meta::name = L"meta";
void office_meta::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void office_meta::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (Ns==L"meta" && Name == L"generator")
{
CP_CREATE_ELEMENT(meta_generator_);
}
else if (Ns==L"meta" && Name == L"document-statistic")
{
CP_CREATE_ELEMENT(meta_document_statistic_);
}
else if (Ns==L"meta" && Name == L"user-defined")
{
CP_CREATE_ELEMENT(meta_user_defined_);
}
else
{
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * meta_generator::ns = L"meta";
const wchar_t * meta_generator::name = L"generator";
void meta_generator::add_text(const std::wstring & text)
{
content_ = text;
}
// config_item
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * meta_document_statistic::ns = L"meta";
const wchar_t * meta_document_statistic::name = L"document-statistic";
void meta_document_statistic::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"meta:table-count", meta_table_count_);
CP_APPLY_ATTR(L"meta:image-count", meta_image_count_);
CP_APPLY_ATTR(L"meta:object-count", meta_object_count_);
CP_APPLY_ATTR(L"meta:page-count", meta_page_count_);
CP_APPLY_ATTR(L"meta:paragraph-count", meta_paragraph_count_);
CP_APPLY_ATTR(L"meta:word-count", meta_word_count_);
CP_APPLY_ATTR(L"meta:character-count", meta_character_count_);
}
// meta_user_defined
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * meta_user_defined::ns = L"meta";
const wchar_t * meta_user_defined::name = L"user-defined";
void meta_user_defined::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"meta:name", meta_name_, std::wstring(L""));
}
void meta_user_defined::add_text(const std::wstring & text)
{
content_ = text;
}
}
}

View File

@ -0,0 +1,132 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include <iosfwd>
#include <cpdoccore/CPOptional.h>
#include <cpdoccore/xml/xmlelement.h>
#include <cpdoccore/xml/nodetype.h>
#include "office_elements.h"
#include "office_elements_create.h"
namespace cpdoccore {
namespace odf_reader {
// office:meta
class office_meta : public office_element_impl<office_meta>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeMeta;
CPDOCCORE_DEFINE_VISITABLE();
office_element_ptr_array meta_user_defined_;
office_element_ptr meta_generator_;
office_element_ptr meta_document_statistic_;
private:
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){}
};
CP_REGISTER_OFFICE_ELEMENT2(office_meta);
// meta:generator
class meta_generator : public office_element_impl<meta_generator>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeMetaGenerator;
CPDOCCORE_DEFINE_VISITABLE();
std::wstring content_;
private:
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);
};
CP_REGISTER_OFFICE_ELEMENT2(meta_generator);
// meta:document-statistic
class meta_document_statistic : public office_element_impl<meta_document_statistic>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeMetaDocumentStatistic;
CPDOCCORE_DEFINE_VISITABLE();
_CP_OPT(int) meta_table_count_;
_CP_OPT(int) meta_image_count_;
_CP_OPT(int) meta_object_count_;
_CP_OPT(int) meta_page_count_;
_CP_OPT(int) meta_paragraph_count_;
_CP_OPT(int) meta_word_count_;
_CP_OPT(int) meta_character_count_;
private:
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){}
};
CP_REGISTER_OFFICE_ELEMENT2(meta_document_statistic);
// meta:user-defined
class meta_user_defined : public office_element_impl<meta_user_defined>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeMetaUserDefined;
CPDOCCORE_DEFINE_VISITABLE();
std::wstring meta_name_;
std::wstring content_;
private:
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);
};
CP_REGISTER_OFFICE_ELEMENT2(meta_user_defined);
}
}

View File

@ -287,13 +287,25 @@ std::wostream & line_break::text_to_stream(std::wostream & _Wostream) const
_Wostream << std::wstring(L"\r\n");
return _Wostream;
}
void line_break::docx_convert(oox::docx_conversion_context & Context)
{
Context.add_element_to_run();
Context.output_stream() << L"<w:br/>";
}
bool in_drawing = false;
if (Context.get_drawing_context().get_current_shape() || Context.get_drawing_context().get_current_frame())
{
in_drawing = true;
Context.finish_run();
Context.finish_paragraph();
Context.start_paragraph();
}
else
{
Context.add_element_to_run();
Context.output_stream() << L"<w:br/>";
}
}
void line_break::xlsx_convert(oox::xlsx_conversion_context & Context)
{
Context.get_text_context().add_text(L"\n");
@ -316,7 +328,6 @@ void bookmark::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"text:name", text_name_, std::wstring(L""));
}
//------------------------------------------------------------------------------------------------------------
const wchar_t * bookmark_start::ns = L"text";
const wchar_t * bookmark_start::name = L"bookmark-start";
@ -325,12 +336,14 @@ std::wostream & bookmark_start::text_to_stream(std::wostream & _Wostream) const
{
return _Wostream;
}
void bookmark_start::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"text:name", text_name_, std::wstring(L""));
CP_APPLY_ATTR(L"text:name", name_, std::wstring(L""));
}
void bookmark_start::docx_convert(oox::docx_conversion_context & Context)
{
Context.start_bookmark(name_);
}
//------------------------------------------------------------------------------------------------------------
const wchar_t * bookmark_end::ns = L"text";
const wchar_t * bookmark_end::name = L"bookmark-end";
@ -339,12 +352,32 @@ std::wostream & bookmark_end::text_to_stream(std::wostream & _Wostream) const
{
return _Wostream;
}
void bookmark_end::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"text:name", text_name_, std::wstring(L""));
CP_APPLY_ATTR(L"text:name", name_, std::wstring(L""));
}
void bookmark_end::docx_convert(oox::docx_conversion_context & Context)
{
Context.end_bookmark(name_);
}
//------------------------------------------------------------------------------------------------------------
const wchar_t * bookmark_ref::ns = L"text";
const wchar_t * bookmark_ref::name = L"bookmark-ref";
std::wostream & bookmark_ref::text_to_stream(std::wostream & _Wostream) const
{
return _Wostream;
}
void bookmark_ref::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"text:ref-name", text_ref_name_, std::wstring(L""));
CP_APPLY_ATTR(L"text:reference-format", text_reference_format_);
}
void bookmark_ref::add_text(const std::wstring & Text)
{
content_ = Text;
}
// text:reference-mark
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * reference_mark::ns = L"text";
@ -539,25 +572,33 @@ void a::add_text(const std::wstring & Text)
void a::docx_convert(oox::docx_conversion_context & Context)
{
bool pushed = false;
bool addNewRun = false;
bool pushed_style = false;
bool addNewRun = false;
Context.finish_run();
style_text_properties_ptr tempStyleTextProp;
std::wostream & _Wostream = Context.output_stream();
std::wstring rId;
rId = Context.add_hyperlink(xlink_attlist_.href_.get_value_or(L""), false);
_Wostream << L"<w:hyperlink r:id=\"" << rId << L"\">";
std::wstring ref = xlink_attlist_.href_.get_value_or(L"");
if (Context.is_table_content())
{
_Wostream << L"<w:hyperlink w:anchor=\"" << ref.substr(1) << L"\" w:history=\"1\">"; //без #
}
else
{
std::wstring rId;
rId = Context.add_hyperlink(ref, false);
_Wostream << L"<w:hyperlink r:id=\"" << rId << L"\">";
}
style_instance * styleInst = NULL;
style_text_properties_ptr tempStyleTextProp;
if (!text_style_name_.empty())
styleInst = Context.root()->odf_context().styleContainer().style_by_name(text_style_name_, style_family::Text,Context.process_headers_footers_);
else
styleInst = Context.root()->odf_context().styleContainer().style_by_name(text_style_name_, style_family::Text, Context.process_headers_footers_);
else if (false == Context.is_table_content())
styleInst = Context.root()->odf_context().styleContainer().hyperlink_style();
if (styleInst)
@ -567,7 +608,7 @@ void a::docx_convert(oox::docx_conversion_context & Context)
if (const style_content * styleContent = styleInst->content())
{
Context.push_text_properties(styleContent->get_style_text_properties());
pushed = true;
pushed_style = true;
Context.get_styles_context().start_process_style(styleInst);
Context.add_new_run();
Context.get_styles_context().end_process_style();
@ -576,16 +617,15 @@ void a::docx_convert(oox::docx_conversion_context & Context)
}
else
{
const std::wstring id = Context.styles_map_.get( styleInst->name(), styleInst->type() );
const std::wstring id = Context.styles_map_.get( styleInst->name(), styleInst->type() );
tempStyleTextProp = style_text_properties_ptr( new style_text_properties(id) );
Context.push_text_properties( tempStyleTextProp.get() );
pushed = true;
pushed_style = true;
Context.add_new_run();
addNewRun = true;
}
}
}
if (!addNewRun)
Context.add_new_run();
@ -597,7 +637,7 @@ void a::docx_convert(oox::docx_conversion_context & Context)
Context.finish_run();
if (pushed)
if (pushed_style)
Context.pop_text_properties();
_Wostream << L"</w:hyperlink>";
}
@ -1137,6 +1177,11 @@ std::wostream & sequence::text_to_stream(std::wostream & _Wostream) const
void sequence::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"style:num-format", style_num_format_);
CP_APPLY_ATTR(L"style:num-letter-sync", style_num_letter_sync_);
CP_APPLY_ATTR(L"text:formula", text_formula_);
CP_APPLY_ATTR(L"text:ref-name", text_ref_name_);
CP_APPLY_ATTR(L"text:name", text_name_);
}
void sequence::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
@ -1152,10 +1197,75 @@ void sequence::add_text(const std::wstring & Text)
void sequence::docx_convert(oox::docx_conversion_context & Context)
{
for (size_t i = 0; i < text_.size(); i++)
{
text_[i]->docx_convert(Context);
}
std::wstring ref;
if (text_ref_name_ && text_name_)
{
size_t pos = text_ref_name_->find(L"ref" + *text_name_);
if (pos != std::wstring::npos)
{
ref = *text_name_ + L"!" + text_ref_name_->substr(pos + 3 + text_name_->length()) + L"|sequence";
}
}
if (!ref.empty())
{
Context.start_bookmark(ref);
}
Context.add_new_run();
Context.output_stream() << L"<w:t>" << template_ << L"</w:t>";
Context.finish_run();
std::wstring num_format = L"ARABIC";
if (style_num_format_)
{
switch(style_num_format_->get_type())
{
case odf_types::style_numformat::romanUc: num_format= L"ROMANUC"; break;
case odf_types::style_numformat::romanLc: num_format= L"ROMANLC"; break;
case odf_types::style_numformat::alphaUc: num_format= L"ALPHAUC"; break;
case odf_types::style_numformat::alphaLc: num_format= L"ALPHALC"; break;
case odf_types::style_numformat::arabic:
default:
num_format= L"ARABIC"; break;
}
}
Context.output_stream() << L"<w:fldSimple w:instr=\" SEQ " << template_ << L" \\* " << num_format << L" \">";
Context.add_new_run();
for (size_t i = 0; i < text_.size(); i++)
{
text_[i]->docx_convert(Context);
}
Context.finish_run();
if (!ref.empty())
{
Context.end_bookmark(ref);
}
Context.output_stream() << L"</w:fldSimple>";
//Context.add_new_run();
// Context.output_stream() << L"<w:fldChar w:fldCharType=\"begin\"/>";
//Context.finish_run();
//
//Context.add_new_run();
//Context.output_stream() << L"<w:instrText xml:space=\"preserve\"> SEQ " << template_ << L" \\* ARABIC </w:instrText>";
// Context.finish_run();
//Context.add_new_run();
// Context.output_stream() << L"<w:fldChar w:fldCharType=\"separate\"/>";
//Context.finish_run();
//
//for (size_t i = 0; i < text_.size(); i++)
//{
// text_[i]->docx_convert(Context);
//}
//Context.end_bookmark();
//
//Context.add_new_run();
// Context.output_stream() << L"<w:fldChar w:fldCharType=\"end\"/>";
//Context.finish_run();
}
void sequence::pptx_convert(oox::pptx_conversion_context & Context)
{
@ -1423,11 +1533,41 @@ void text_user_field_get::docx_convert(oox::docx_conversion_context & Context)
if (!text_)
{
std::wstring value = Context.get_user_field(*text_name_);
text_ = text::create(value) ;
if (!value.empty())
text_ = text::create(value) ;
}
docx_serialize_run(text_, Context);
}
//---------------------------------------------------------------------------------------------------
const wchar_t * text_user_defined::ns = L"text";
const wchar_t * text_user_defined::name = L"user-defined";
void text_user_defined::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"style:data-style-name", style_data_style_name_);
CP_APPLY_ATTR(L"text:name", text_name_);
CP_APPLY_ATTR(L"text:fixed", text_fixed_);
office_value_.add_attributes(Attributes);
}
void text_user_defined::add_text(const std::wstring & Text)
{
text_ = text::create(Text) ;//cache
}
void text_user_defined::docx_convert(oox::docx_conversion_context & Context)
{
if (!text_name_) return;
odf_reader::odf_read_context & odfContext = Context.root()->odf_context();
std::wstring value = odfContext.Settings().get_user_defined(*text_name_);
if (!value.empty())
text_ = text::create(value) ;
docx_serialize_run(text_, Context);
}
}//namespace text
//------------------------------------------------------------------------------------------------------------
@ -1446,6 +1586,17 @@ void presentation_date_time::pptx_convert(oox::pptx_conversion_context & Context
{
Context.get_text_context().start_field(oox::date, L"");
}
//------------------------------------------------------------------------------------------------------------
const wchar_t * field_fieldmark_start::ns = L"field";
const wchar_t * field_fieldmark_start::name = L"fieldmark-start";
void field_fieldmark_start::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"text:name", text_name_);
CP_APPLY_ATTR(L"field:type", field_type_);
}
//------------------------------------------------------------------------------------------------------------
const wchar_t * field_fieldmark_end::ns = L"field";
const wchar_t * field_fieldmark_end::name = L"fieldmark-end";
}
}

View File

@ -202,14 +202,13 @@ public:
bookmark() {}
bookmark(const std::wstring & Name) : text_name_(Name){};
const std::wstring & attr_name() const { return text_name_; }
std::wstring text_name_;
private:
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) {}
std::wstring text_name_;
};
CP_REGISTER_OFFICE_ELEMENT2(bookmark);
@ -226,11 +225,12 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
virtual void docx_convert(oox::docx_conversion_context & Context);
bookmark_start() {}
bookmark_start(const std::wstring & Name) : text_name_(Name){};
bookmark_start(const std::wstring & Name) : name_(Name){};
std::wstring text_name_;
std::wstring name_;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
@ -238,7 +238,6 @@ private:
virtual void add_text(const std::wstring & Text) {}
};
CP_REGISTER_OFFICE_ELEMENT2(bookmark_start);
//-------------------------------------------------------------------------------------------------------------------
// text:bookmark-end
@ -252,12 +251,13 @@ public:
static const ElementType type = typeTextBookmarkEnd;
CPDOCCORE_DEFINE_VISITABLE();
virtual void docx_convert(oox::docx_conversion_context & Context);
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
bookmark_end() {} ;
bookmark_end(const std::wstring & Name) : text_name_(Name){};
bookmark_end(const std::wstring & Name) : name_(Name){};
std::wstring text_name_;
std::wstring name_;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
@ -265,8 +265,35 @@ private:
virtual void add_text(const std::wstring & Text) {}
};
CP_REGISTER_OFFICE_ELEMENT2(bookmark_end);
//-------------------------------------------------------------------------------------------------------------------
// text:bookmark-ref
//-------------------------------------------------------------------------------------------------------------------
class bookmark_ref : public paragraph_content_element<bookmark_ref>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeTextBookmarkRef;
CPDOCCORE_DEFINE_VISITABLE();
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
bookmark_ref() {} ;
std::wstring text_ref_name_;
_CP_OPT(std::wstring) text_reference_format_;
std::wstring content_;
private:
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);
};
CP_REGISTER_OFFICE_ELEMENT2(bookmark_ref);
//-------------------------------------------------------------------------------------------------------------------
// text:reference-mark
//-------------------------------------------------------------------------------------------------------------------
@ -597,13 +624,13 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
virtual void add_text(const std::wstring & Text);
_CP_OPT(std::wstring) style_num_format_;
_CP_OPT(odf_types::Bool) style_num_letter_sync_;
_CP_OPT(odf_types::Bool) text_fixed_;
_CP_OPT(int) text_page_adjust_;
_CP_OPT(std::wstring) text_select_page_; //todooo to type
_CP_OPT(odf_types::style_numformat) style_num_format_;
_CP_OPT(odf_types::Bool) style_num_letter_sync_;
_CP_OPT(odf_types::Bool) text_fixed_;
_CP_OPT(int) text_page_adjust_;
_CP_OPT(std::wstring) text_select_page_; //todooo to type
office_element_ptr text_;
office_element_ptr text_;
};
CP_REGISTER_OFFICE_ELEMENT2(text_page_number);
@ -624,8 +651,8 @@ public:
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
_CP_OPT(std::wstring) style_num_format_;
_CP_OPT(odf_types::Bool) style_num_letter_sync_;
_CP_OPT(odf_types::style_numformat) style_num_format_;
_CP_OPT(odf_types::Bool) style_num_letter_sync_;
office_element_ptr text_;
private:
@ -791,13 +818,19 @@ public:
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
_CP_OPT(odf_types::style_numformat) style_num_format_;
_CP_OPT(std::wstring) style_num_letter_sync_;
_CP_OPT(std::wstring) text_formula_;
_CP_OPT(std::wstring) text_name_;
_CP_OPT(std::wstring) text_ref_name_;
_CP_OPT(std::wstring) template_;
office_element_ptr_array text_;
private:
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);
// todooo attributes
office_element_ptr_array text_;
};
CP_REGISTER_OFFICE_ELEMENT2(sequence);
@ -1120,6 +1153,35 @@ private:
office_element_ptr text_;
};
CP_REGISTER_OFFICE_ELEMENT2(text_user_field_get);
//-------------------------------------------------------------------------------------------------------------------
//text:user-defined
//---------------------------------------------------------------------------------------------------
class text_user_defined : public paragraph_content_element<text_user_defined>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeTextUserDefined;
CPDOCCORE_DEFINE_VISITABLE()
virtual void docx_convert(oox::docx_conversion_context & Context);
private:
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);
_CP_OPT(std::wstring) style_data_style_name_;
_CP_OPT(std::wstring) text_name_;
_CP_OPT(odf_types::Bool) text_fixed_;
odf_types::common_value_and_type_attlist office_value_;
office_element_ptr text_;
};
CP_REGISTER_OFFICE_ELEMENT2(text_user_defined);
} // namespace text
//-------------------------------------------------------------------------------------------------------------------
//presentation:footer
@ -1165,5 +1227,44 @@ private:
};
CP_REGISTER_OFFICE_ELEMENT2(presentation_date_time);
//-------------------------------------------------------------------------------------------------------------------
// field:fieldmark-start
//-------------------------------------------------------------------------------------------------------------------
class field_fieldmark_start : public text::paragraph_content_element<field_fieldmark_start>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeTextFieldFieldmarkStart;
CPDOCCORE_DEFINE_VISITABLE();
_CP_OPT(std::wstring) text_name_;
_CP_OPT(std::wstring) field_type_;
private:
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) {}
};
CP_REGISTER_OFFICE_ELEMENT2(field_fieldmark_start);
//-------------------------------------------------------------------------------------------------------------------
// field:fieldmark-end
//-------------------------------------------------------------------------------------------------------------------
class field_fieldmark_end : public text::paragraph_content_element<field_fieldmark_end>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeTextFieldFieldmarkStart;
CPDOCCORE_DEFINE_VISITABLE();
private:
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) {}
};
CP_REGISTER_OFFICE_ELEMENT2(field_fieldmark_end);
} // namespace odf_reader
} // namespace cpdoccore

View File

@ -89,22 +89,16 @@ std::wostream & style_tab_stops::text_to_stream(std::wostream & _Wostream) const
return _Wostream;
}
void style_tab_stops::add_attributes( const xml::attributes_wc_ptr & Attributes )
{}
void style_tab_stops::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (L"style" == Ns && L"tab-stop" == Name)
CP_CREATE_ELEMENT(style_tab_stops_);
CP_CREATE_ELEMENT(content_);
else
{
CP_NOT_APPLICABLE_ELM();
}
}
void style_tab_stops::add_text(const std::wstring & Text)
{}
// style:drop-cap
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * style_drop_cap::ns = L"style";
@ -382,12 +376,12 @@ std::wostream & style_paragraph_properties::text_to_stream(std::wostream & _Wost
void style_paragraph_properties::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
style_paragraph_properties_content_.add_attributes(Attributes);
content_.add_attributes(Attributes);
}
void style_paragraph_properties::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if (!style_paragraph_properties_content_.add_child_element(Reader, Ns, Name, getContext()))
if (!content_.add_child_element(Reader, Ns, Name, getContext()))
CP_NOT_APPLICABLE_ELM();
}
@ -408,14 +402,12 @@ void paragraph_format_properties::apply_from(const paragraph_format_properties &
_CP_APPLY_PROP(fo_widows_, Other.fo_widows_);
_CP_APPLY_PROP(fo_orphans_, Other.fo_orphans_);
// TODO
_CP_APPLY_PROP(style_tab_stops_, Other.style_tab_stops_);
//style_tab_stops_ calc in context
_CP_APPLY_PROP(style_tab_stop_distance_, Other.style_tab_stop_distance_);
_CP_APPLY_PROP(fo_hyphenation_keep_, Other.fo_hyphenation_keep_);
_CP_APPLY_PROP(fo_hyphenation_ladder_count_, Other.fo_hyphenation_ladder_count_);
// TODO
_CP_APPLY_PROP(style_drop_cap_, Other.style_drop_cap_);
_CP_APPLY_PROP(style_register_true_, Other.style_register_true_);

View File

@ -88,6 +88,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
void docx_convert(oox::docx_conversion_context & Context);
void docx_convert(oox::docx_conversion_context & Context, bool clear = false);
void pptx_convert(oox::pptx_conversion_context & Context);
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
@ -96,8 +98,8 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
private:
odf_types::length style_position_;
public:
odf_types::length style_position_;
_CP_OPT(odf_types::style_type) style_type_;
_CP_OPT(wchar_t) style_char_;
@ -124,20 +126,17 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
size_t size() const { return style_tab_stops_.size(); }
void docx_convert(oox::docx_conversion_context & Context);
void pptx_convert(oox::pptx_conversion_context & Context);
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
office_element_ptr_array content_;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
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);
virtual void add_text(const std::wstring & Text){}
private:
office_element_ptr_array style_tab_stops_;
};
CP_REGISTER_OFFICE_ELEMENT2(style_tab_stops);
@ -212,52 +211,53 @@ public:
void xlsx_convert(std::wostream & strm, bool in_draw);
_CP_OPT(odf_types::line_width) fo_line_height_; // +
_CP_OPT(odf_types::length) style_line_height_at_least_; // +
_CP_OPT(odf_types::length) style_line_spacing_; // +
_CP_OPT(bool) style_font_independent_line_spacing_; // ???
_CP_OPT(odf_types::text_align) fo_text_align_; // +
_CP_OPT(odf_types::text_align) fo_text_align_last_;
_CP_OPT(bool) style_justify_single_word_;
_CP_OPT(odf_types::keep_together) fo_keep_together_; // +
_CP_OPT(unsigned int) fo_widows_; // +
_CP_OPT(unsigned int) fo_orphans_;
office_element_ptr style_tab_stops_; // +
_CP_OPT(odf_types::length) style_tab_stop_distance_;
_CP_OPT(odf_types::hyphenation_keep) fo_hyphenation_keep_;
_CP_OPT(odf_types::integer_or_nolimit) fo_hyphenation_ladder_count_;
office_element_ptr style_drop_cap_;
_CP_OPT(bool) style_register_true_;
_CP_OPT(odf_types::length_or_percent) fo_margin_left_; // +
_CP_OPT(odf_types::length_or_percent) fo_margin_right_; // +
_CP_OPT(odf_types::length_or_percent) fo_text_indent_; // +
_CP_OPT(bool) style_auto_text_indent_; // ???
_CP_OPT(odf_types::length_or_percent) fo_margin_top_; // +
_CP_OPT(odf_types::length_or_percent) fo_margin_bottom_; // +
_CP_OPT(odf_types::length_or_percent) fo_margin_;
_CP_OPT(odf_types::fo_break) fo_break_before_; // +
_CP_OPT(odf_types::fo_break) fo_break_after_;
_CP_OPT(odf_types::background_color) fo_background_color_;
office_element_ptr style_background_image_;
_CP_OPT(odf_types::border_style) fo_border_; // +
_CP_OPT(odf_types::border_style) fo_border_top_; // +
_CP_OPT(odf_types::border_style) fo_border_bottom_; // +
_CP_OPT(odf_types::border_style) fo_border_left_; // +
_CP_OPT(odf_types::border_style) fo_border_right_; // +
_CP_OPT( odf_types::border_widths ) style_border_line_width_; // +
_CP_OPT(odf_types::line_width) fo_line_height_;
_CP_OPT(odf_types::length) style_line_height_at_least_;
_CP_OPT(odf_types::length) style_line_spacing_;
_CP_OPT(bool) style_font_independent_line_spacing_; // ???
_CP_OPT(odf_types::text_align) fo_text_align_;
_CP_OPT(odf_types::text_align) fo_text_align_last_;
_CP_OPT(bool) style_justify_single_word_;
_CP_OPT(odf_types::keep_together) fo_keep_together_;
_CP_OPT(unsigned int) fo_widows_;
_CP_OPT(unsigned int) fo_orphans_;
_CP_OPT(odf_types::length) style_tab_stop_distance_;
_CP_OPT(odf_types::hyphenation_keep) fo_hyphenation_keep_;
_CP_OPT(odf_types::integer_or_nolimit) fo_hyphenation_ladder_count_;
_CP_OPT(bool) style_register_true_;
_CP_OPT(odf_types::length_or_percent) fo_margin_left_;
_CP_OPT(odf_types::length_or_percent) fo_margin_right_;
_CP_OPT(odf_types::length_or_percent) fo_text_indent_;
_CP_OPT(bool) style_auto_text_indent_; // ???
_CP_OPT(odf_types::length_or_percent) fo_margin_top_;
_CP_OPT(odf_types::length_or_percent) fo_margin_bottom_;
_CP_OPT(odf_types::length_or_percent) fo_margin_;
_CP_OPT(odf_types::fo_break) fo_break_before_;
_CP_OPT(odf_types::fo_break) fo_break_after_;
_CP_OPT(odf_types::background_color) fo_background_color_;
_CP_OPT( odf_types::border_widths ) style_border_line_width_top_; // +
_CP_OPT( odf_types::border_widths ) style_border_line_width_bottom_;// +
_CP_OPT( odf_types::border_widths ) style_border_line_width_left_; // +
_CP_OPT( odf_types::border_widths ) style_border_line_width_right_; // +
office_element_ptr style_background_image_;
office_element_ptr style_drop_cap_;
office_element_ptr style_tab_stops_;
_CP_OPT(odf_types::length) fo_padding_; // +
_CP_OPT(odf_types::length) fo_padding_top_; // +
_CP_OPT(odf_types::length) fo_padding_bottom_; // +
_CP_OPT(odf_types::length) fo_padding_left_; // +
_CP_OPT(odf_types::length) fo_padding_right_; // +
_CP_OPT(odf_types::border_style) fo_border_;
_CP_OPT(odf_types::border_style) fo_border_top_;
_CP_OPT(odf_types::border_style) fo_border_bottom_;
_CP_OPT(odf_types::border_style) fo_border_left_;
_CP_OPT(odf_types::border_style) fo_border_right_;
_CP_OPT( odf_types::border_widths ) style_border_line_width_;
_CP_OPT( odf_types::border_widths ) style_border_line_width_top_;
_CP_OPT( odf_types::border_widths ) style_border_line_width_bottom_;
_CP_OPT( odf_types::border_widths ) style_border_line_width_left_;
_CP_OPT( odf_types::border_widths ) style_border_line_width_right_;
_CP_OPT(odf_types::length) fo_padding_;
_CP_OPT(odf_types::length) fo_padding_top_;
_CP_OPT(odf_types::length) fo_padding_bottom_;
_CP_OPT(odf_types::length) fo_padding_left_;
_CP_OPT(odf_types::length) fo_padding_right_;
_CP_OPT(odf_types::shadow_type) style_shadow_;
_CP_OPT(odf_types::keep_together) fo_keep_with_next_;
_CP_OPT(bool) text_number_lines_;
@ -289,7 +289,7 @@ public:
void docx_convert(oox::docx_conversion_context & Context);
void pptx_convert(oox::pptx_conversion_context & Context);
const paragraph_format_properties & content() const { return style_paragraph_properties_content_; }
paragraph_format_properties content_;
public:
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
@ -301,7 +301,6 @@ private:
private:
paragraph_format_properties style_paragraph_properties_content_;
};

View File

@ -415,131 +415,106 @@ void paragraph_format_properties::docx_convert(oox::docx_conversion_context & Co
Context.set_page_break_after(true);
}
}
if (style_tab_stops_)
style_tab_stops_->docx_convert(Context);
Context.get_tabs_context().docx_convert(Context);
//if (style_tab_stops_)
//{
// style_tab_stops_->docx_convert(Context);
//}
}
void style_tab_stops::docx_convert(oox::docx_conversion_context & Context)
{
if (style_tab_stops_.size()<1)return;
if (content_.empty()) return;
std::wstringstream & _pPr = Context.get_styles_context().paragraph_nodes();
_pPr << L"<w:tabs>";
if (style_tab_stops_.size() > 0)
{
for (size_t i = 0; i < style_tab_stops_.size(); i++)
for (size_t i = 0; i < content_.size(); i++)
{
style_tab_stops_[i]->docx_convert(Context);
content_[i]->docx_convert(Context);
}
}
_pPr << L"</w:tabs>";
}
void style_tab_stop::docx_convert(oox::docx_conversion_context & Context)
void style_tab_stop::docx_convert(oox::docx_conversion_context & Context, bool clear)
{
std::wstringstream & _pPr = Context.get_styles_context().paragraph_nodes();
_pPr << L"<w:tab ";
_pPr << L"<w:tab";
length def_tab = length(1.0, length::cm);// в ms значение 0.8 не корректно оО
int tab_pos = (int)( 20.0 * style_position_.get_value_unit(length::pt) ) ;
int min_tab_pos = (int)( 20.0 * def_tab.get_value_unit(length::pt) ) ;
int margin_left_pos = Context.get_margin_left();
if ((style_type_) && (style_type_->get_type() == style_type::Right))
{
tab_pos += margin_left_pos;
}
tab_pos += margin_left_pos;
if (tab_pos < min_tab_pos)
tab_pos = min_tab_pos;
_pPr << L"w:pos=\"" << tab_pos << "\" ";
{
std::wstring val = L"left"; //????
if (style_type_)
{
switch(style_type_->get_type())
{
case style_type::Left:
val = L"left";
break;
case style_type::Center:
val = L"center";
break;
case style_type::Right:
val = L"right";
break;
case style_type::Char:
val = L"decimal";
break;
}
}
if (!val.empty())
_pPr << L"w:val=\"" << val << "\" ";
}
{
std::wstring leader;
std::wstring val = clear ? L"clear" : L"left"; //????
if (style_type_ && !clear)
{
switch(style_type_->get_type())
{
case style_type::Left: val = L"left"; break;
case style_type::Center:val = L"center"; break;
case style_type::Right: val = L"right"; break;
case style_type::Char: val = L"decimal"; break;
}
}
_pPr << L" w:val=\"" << val << "\"";
_pPr << L" w:pos=\"" << tab_pos << "\"";
std::wstring leader;
if ((style_leader_type_ && style_leader_type_->get_type() == line_type::None) ||
(style_leader_style_ && style_leader_style_->get_type() == line_style::None))
{
leader = L"none";
}
else if (!style_leader_type_ || style_leader_type_ && style_leader_type_->get_type() != line_type::None)
{
if (style_leader_style_)
{
switch(style_leader_style_->get_type())
{
case line_style::None:
leader = L"";
break;
case line_style::Solid:
if (style_leader_text_)
{
if (*style_leader_text_ == L"-")
leader = L"hyphen";
else if (*style_leader_text_ == L"_")
leader = L"underscore";
}
break;
case line_style::Dotted:
leader = L"dot";
break;
case line_style::Dash:
leader = L"hyphen";
break;
case line_style::LongDash:
leader = L"middleDot";
break;
case line_style::DotDash:
leader = L"middleDot";
break;
case line_style::DotDotDash:
leader = L"middleDot";
break;
case line_style::Wave:
leader = L"middleDot";
break;
}
}
}
if (!leader.empty())
_pPr << L"w:leader=\"" << leader << "\" ";
}
_pPr << L" />";
if ((style_leader_type_ && style_leader_type_->get_type() == line_type::None) ||
(style_leader_style_ && style_leader_style_->get_type() == line_style::None))
{
leader = L"none";
}
else if (!style_leader_type_ || style_leader_type_ && style_leader_type_->get_type() != line_type::None)
{
if (style_leader_style_)
{
switch(style_leader_style_->get_type())
{
case line_style::None: leader.clear(); break;
case line_style::Solid:
{
if (style_leader_text_)
{
if (*style_leader_text_ == L"-")
leader = L"hyphen";
else if (*style_leader_text_ == L"_")
leader = L"underscore";
}
}break;
case line_style::Dotted: leader = L"dot"; break;
case line_style::Dash: leader = L"hyphen"; break;
case line_style::LongDash: leader = L"middleDot"; break;
case line_style::DotDash: leader = L"middleDot"; break;
case line_style::DotDotDash: leader = L"middleDot"; break;
case line_style::Wave: leader = L"middleDot"; break;
}
}
}
if (!clear && !leader.empty())
{
_pPr << L" w:leader=\"" << leader << "\"";
}
_pPr << L"/>";
}
void style_tab_stop::docx_convert(oox::docx_conversion_context & Context)
{
docx_convert(Context, false);
}
void style_paragraph_properties::docx_convert(oox::docx_conversion_context & Context)
{
style_paragraph_properties_content_.docx_convert(Context);
content_.docx_convert(Context);
}

View File

@ -635,7 +635,7 @@ void style_tab_stop::pptx_convert(oox::pptx_conversion_context & Context)
void style_paragraph_properties::pptx_convert(oox::pptx_conversion_context & Context)
{
style_paragraph_properties_content_.pptx_convert(Context);
content_.pptx_convert(Context);
}

View File

@ -207,10 +207,9 @@ void style_table_column_properties::docx_convert(oox::docx_conversion_context &
{
std::wostream & strm = Context.output_stream();
if (attlist_.style_column_width_)
{
double kf_max_width_ms =1.;
double kf_max_width_ms = 1.;
const page_layout_instance * pp = Context.root()->odf_context().pageLayoutContainer().page_layout_first();//
if ((pp) && (pp->properties()))
@ -226,17 +225,15 @@ void style_table_column_properties::docx_convert(oox::docx_conversion_context &
int val = attlist_.style_column_width_->get_value_unit(length::pt);
double width = 0.5 + 20.0 * val * kf_max_width_ms;
//_CP_OPT(int) iUnormalWidth;
//if (odf_reader::GetProperty(Context.get_settings_properties(),L"UnormalWidthPage",iUnormalWidth))
{
//kf_max_width_ms = 31680./iUnormalWidth.get();//эквивалент 22"
}
strm << L"<w:gridCol w:w=\"" <<
(int)(0.5 + 20.0 * val * kf_max_width_ms) << "\"/>";
Context.get_table_context().add_column_width(width);
strm << L"<w:gridCol w:w=\"" << (int)(width) << "\"/>";
}
else
{
Context.get_table_context().add_column_width(0);
}
}
@ -244,7 +241,6 @@ void style_table_column_properties::pptx_convert(oox::pptx_conversion_context &
{
std::wostream & strm = Context.get_table_context().tableData();
if (attlist_.style_column_width_)
{
int val = attlist_.style_column_width_->get_value_unit(length::emu);

View File

@ -303,7 +303,7 @@ void default_style::add_attributes( const xml::attributes_wc_ptr & Attributes )
void default_style::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
style_content_.add_child_element(Reader, Ns, Name, getContext());
content_.add_child_element(Reader, Ns, Name, getContext());
}
void default_style::add_text(const std::wstring & Text)
@ -433,7 +433,7 @@ void style::add_child_element( xml::sax * Reader, const std::wstring & Ns, const
CP_CREATE_ELEMENT(style_map_);
}
else
style_content_.add_child_element(Reader, Ns, Name, getContext());
content_.add_child_element(Reader, Ns, Name, getContext());
}
void style::add_text(const std::wstring & Text)

View File

@ -136,7 +136,7 @@ public:
odf_types::style_family style_family_;
style_content style_content_;
style_content content_;
friend class odf_document;
@ -251,6 +251,7 @@ private:
};
CP_REGISTER_OFFICE_ELEMENT2(draw_opacity);
// style_draw_fill_image
class draw_fill_image : public office_element_impl<draw_fill_image>
{
@ -281,7 +282,6 @@ typedef weak_ptr<style>::Type style_weak_ptr;
typedef std::vector< style_weak_ptr > style_weak_ptr_array;
typedef std::vector< style_ptr > style_ptr_array;
// style
/// style:style
class style : public office_element_impl<style>
{
@ -302,7 +302,6 @@ private:
virtual void add_text(const std::wstring & Text);
public:
// attr
std::wstring style_name_;
bool style_auto_update_; // default = false
@ -317,7 +316,7 @@ public:
_CP_OPT( std::wstring ) style_class_;
_CP_OPT( std::wstring ) style_default_outline_level_;
style_content style_content_;
style_content content_;
office_element_ptr_array style_map_;
friend class odf_document;

View File

@ -244,22 +244,6 @@ void text_list_level_style_bullet::add_child_element( xml::sax * Reader, const s
namespace {
std::wstring GetNumFormat(const std::wstring & Format)
{
if (L"1" == Format)
return L"decimal";
else if (L"i" == Format)
return L"lowerRoman";
else if (L"I" == Format)
return L"upperRoman";
else if (L"a" == Format)
return L"lowerLetter";
else if (L"A" == Format)
return L"upperLetter";
else
return L"decimal";
}
std::wstring GetLevelText(unsigned int displayLevels,
unsigned int textLevel,
oox::docx_conversion_context & Context)
@ -356,7 +340,21 @@ void text_list_level_style_number::docx_convert(oox::docx_conversion_context & C
}
CP_XML_NODE(L"w:numFmt")
{
CP_XML_ATTR(L"w:val",GetNumFormat( text_list_level_style_number_attr_.common_num_format_attlist_.style_num_format_.get_value_or(L"") ));
std::wstring num_format = L"arabic";
if (text_list_level_style_number_attr_.common_num_format_attlist_.style_num_format_)
{
switch(text_list_level_style_number_attr_.common_num_format_attlist_.style_num_format_->get_type())
{
case odf_types::style_numformat::romanUc: num_format= L"upperRoman"; break;
case odf_types::style_numformat::romanLc: num_format= L"lowerRoman"; break;
case odf_types::style_numformat::alphaUc: num_format= L"upperLetter"; break;
case odf_types::style_numformat::alphaLc: num_format= L"lowerLetter"; break;
case odf_types::style_numformat::arabic:
default:
num_format= L"decimal"; break;
}
}
CP_XML_ATTR(L"w:val", num_format);
}
CP_XML_NODE(L"w:suff")
{
@ -477,19 +475,17 @@ void text_list_level_style_number::pptx_convert(oox::pptx_conversion_context & C
if (text_list_level_style_number_attr_.common_num_format_attlist_.style_num_format_)
{
if (*text_list_level_style_number_attr_.common_num_format_attlist_.style_num_format_ == L"1")
num_format= L"arabic";
else if (*text_list_level_style_number_attr_.common_num_format_attlist_.style_num_format_ == L"I")
num_format= L"romanUc";
else if (*text_list_level_style_number_attr_.common_num_format_attlist_.style_num_format_ == L"i")
num_format= L"romanLc";
else if (*text_list_level_style_number_attr_.common_num_format_attlist_.style_num_format_ == L"A")
num_format= L"alphaUc";
else if (*text_list_level_style_number_attr_.common_num_format_attlist_.style_num_format_ == L"a")
num_format= L"alphaLc";
else
num_format= L"arabic";
}else num_format= L"arabic";
switch(text_list_level_style_number_attr_.common_num_format_attlist_.style_num_format_->get_type())
{
case odf_types::style_numformat::romanUc: num_format= L"romanUc"; break;
case odf_types::style_numformat::romanLc: num_format= L"romanLc"; break;
case odf_types::style_numformat::alphaUc: num_format= L"alphaUc"; break;
case odf_types::style_numformat::alphaLc: num_format= L"alphaLc"; break;
case odf_types::style_numformat::arabic:
default:
num_format= L"arabic"; break;
}
}
if (text_list_level_style_number_attr_.common_num_format_prefix_suffix_attlist_.style_num_prefix_)
{

View File

@ -113,6 +113,8 @@ public:
bool inViewTable;
bool inView;
std::map<std::wstring, std::wstring> map_user_defineds;
};
settings_container::settings_container(): impl_(new settings_container::Impl() )
@ -264,6 +266,16 @@ _CP_OPT(std::wstring) settings_container::find_view_by_name(const std::wstring &
}
return value;
}
void settings_container::add_user_defined(const std::wstring & name, const std::wstring & value)
{
impl_->map_user_defineds.insert(std::make_pair(name, value));
}
std::wstring settings_container::get_user_defined(const std::wstring & name)
{
std::map<std::wstring, std::wstring>::iterator pFind = impl_->map_user_defineds.find(name);
return pFind != impl_->map_user_defineds.end() ? pFind->second : L"";
}
}
}

View File

@ -79,6 +79,9 @@ public:
void end_table_view ();
void add_view (const std::wstring & name, const std::wstring & value);
void add_user_defined(const std::wstring & name, const std::wstring & value);
std::wstring get_user_defined(const std::wstring & name);
private:
class Impl;
_CP_SCOPED_PTR(Impl) impl_;

View File

@ -162,7 +162,8 @@ void table_table::add_child_element( xml::sax * Reader, const std::wstring & Ns,
else if ((L"table" == Ns && L"table-row-group" == Name) ||
(L"table" == Ns && L"table-rows" == Name) ||
(L"table" == Ns && L"table-row" == Name) ||
(L"table" == Ns && L"table-header-rows" == Name))
(L"table" == Ns && L"table-header-rows" == Name)||
(L"text" == Ns && L"soft-page-break" == Name))
{
table_rows_and_groups_.add_child_element(Reader, Ns, Name, getContext());
}
@ -533,7 +534,8 @@ void table_rows::add_child_element( xml::sax * Reader, const std::wstring & Ns,
{
CP_CREATE_ELEMENT_SIMPLE(table_table_rows_);
}
else if CP_CHECK_NAME(L"table", L"table-row")
else if (CP_CHECK_NAME(L"table", L"table-row") || CP_CHECK_NAME(L"text", L"soft-page-break"))
{
CP_CREATE_ELEMENT_SIMPLE(table_table_row_);
}
@ -605,7 +607,8 @@ void table_rows_no_group::add_child_element( xml::sax * Reader, const std::wstri
}
void table_rows_no_group::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context)
{
if (CP_CHECK_NAME(L"table", L"table-rows") || CP_CHECK_NAME(L"table", L"table-row"))
if (CP_CHECK_NAME(L"table", L"table-rows") || CP_CHECK_NAME(L"table", L"table-row") ||
CP_CHECK_NAME(L"text", L"soft-page-break"))
{
if (!was_header_)
table_rows_1_.add_child_element(Reader, Ns, Name, Context);
@ -639,7 +642,8 @@ void table_rows_and_groups::add_child_element( xml::sax * Reader, const std::wst
{
CP_CREATE_ELEMENT_SIMPLE(content_);
}
else if (L"table" == Ns && (L"table-rows" == Name || L"table-row" == Name || L"table-header-rows" == Name) )
else if ((L"table" == Ns && (L"table-rows" == Name || L"table-row" == Name || L"table-header-rows" == Name)) ||
(L"text" == Ns && L"soft-page-break" == Name))
{
bool add_new_no_group = false;
if (content_.empty()) add_new_no_group = true;

View File

@ -238,16 +238,24 @@ void table_table_column::docx_convert(oox::docx_conversion_context & Context)
for (unsigned int i = 0; i < columnsRepeated; ++i)
{
bool bAddWidth = false;
if (table_table_column_attlist_.table_style_name_)
{
const std::wstring colStyleName = table_table_column_attlist_.table_style_name_.get();
if (style_instance * inst =
Context.root()->odf_context().styleContainer().style_by_name( colStyleName , style_family::TableColumn,Context.process_headers_footers_ ))
Context.root()->odf_context().styleContainer().style_by_name( colStyleName , style_family::TableColumn, Context.process_headers_footers_ ))
{
if (inst->content())
{
inst->content()->docx_convert(Context);
bAddWidth = true;
}
}
}
if (false == bAddWidth)
{
Context.get_table_context().add_column_width(0);
}
}
}
@ -266,22 +274,27 @@ void table_table_cell::docx_convert(oox::docx_conversion_context & Context)
_Wostream << L"<w:tcPr>";
const std::wstring styleName = attlist_.table_style_name_.get_value_or(L"");
//_Wostream << L"<w:tcW w:w=\"0\" w:type=\"auto\" />";
if (attlist_extra_.table_number_rows_spanned_ > 1)
{
_Wostream << L"<w:vMerge w:val=\"restart\" />";
_Wostream << L"<w:vMerge w:val=\"restart\"/>";
Context.get_table_context().set_rows_spanned(Context.get_table_context().current_column(),
attlist_extra_.table_number_rows_spanned_ - 1,
attlist_extra_.table_number_columns_spanned_ - 1,
styleName
);
}
double width = Context.get_table_context().get_current_cell_width();
if (width > 0.01)
{
_Wostream << L"<w:tcW w:w=\"" << (int)width << L"\" w:type=\"dxa\"/>";
}
if (attlist_extra_.table_number_columns_spanned_ > 1)
{
_Wostream << L"<w:gridSpan w:val=\"" << attlist_extra_.table_number_columns_spanned_ << "\" />";
_Wostream << L"<w:gridSpan w:val=\"" << attlist_extra_.table_number_columns_spanned_ << "\"/>";
Context.get_table_context().set_columns_spanned(attlist_extra_.table_number_columns_spanned_ - 1);
}
@ -324,8 +337,7 @@ void table_table_cell::docx_convert(oox::docx_conversion_context & Context)
/// Стиль по умолчанию для данной строки
{
const std::wstring & defaultCellStyle =
Context.get_table_context().get_default_cell_style_row();
const std::wstring & defaultCellStyle = Context.get_table_context().get_default_cell_style_row();
if (const style_instance * inst =
Context.root()->odf_context().styleContainer().style_by_name(defaultCellStyle, style_family::TableCell,Context.process_headers_footers_))

View File

@ -68,7 +68,7 @@ void process_paragraph_drop_cap_attr(const paragraph_attrs & Attr, oox::docx_con
if (Attr.text_style_name_.empty())return;
style_instance * styleInst
= Context.root()->odf_context().styleContainer().style_by_name(Attr.text_style_name_, style_family::Paragraph,Context.process_headers_footers_);
= Context.root()->odf_context().styleContainer().style_by_name(Attr.text_style_name_, style_family::Paragraph, Context.process_headers_footers_);
if ((!styleInst) || (styleInst->is_automatic() == false))return;
style_content * styleContent = styleInst->content();
@ -78,7 +78,7 @@ void process_paragraph_drop_cap_attr(const paragraph_attrs & Attr, oox::docx_con
if (!paragraph_properties)return;
const office_element_ptr & elm_style_drop_cap = paragraph_properties->content().style_drop_cap_;
const office_element_ptr & elm_style_drop_cap = paragraph_properties->content_.style_drop_cap_;
if (!elm_style_drop_cap)return;
@ -103,164 +103,27 @@ void process_paragraph_drop_cap_attr(const paragraph_attrs & Attr, oox::docx_con
text_properties->content().fo_font_size_, Context.get_styles_context().get_current_processed_style(), false, //1.);
7.25 * (Context.get_drop_cap_context().Scale + (Context.get_drop_cap_context().Scale-1) * 0.7));//формула ачуметь !! - подбор вручную
}
return;
}
//int process_paragraph_attr(const paragraph_attrs & Attr, oox::docx_conversion_context & Context)
//{
// bool in_drawing = false;
//
// if (Context.get_drawing_context().get_current_shape() || Context.get_drawing_context().get_current_frame())
// {
// in_drawing = true;
// }
//
// if (!Attr.text_style_name_.empty())
// {
// if (style_instance * styleInst =
// Context.root()->odf_context().styleContainer().style_by_name(Attr.text_style_name_, style_family::Paragraph, Context.process_headers_footers_)
// )
// {
// process_page_break_after(styleInst, Context);
// if (styleInst->is_automatic())
// {
// if (style_content * styleContent = styleInst->content())
// {
// std::wstring id;
// if (const style_instance * parentStyleContent = styleInst->parent())
// {
// id = Context.styles_map_.get( parentStyleContent->name(), parentStyleContent->type() );
// }
//
// Context.start_automatic_style(id);
//
// {//вытаскивает rtl c цепочки стилей !! - просто прописать в наследуемом НЕЛЬЗЯ !!
// paragraph_format_properties properties = calc_paragraph_properties_content(styleInst);
//
// if (properties.style_writing_mode_)
// {
// writing_mode::type type = properties.style_writing_mode_->get_type();
// switch(type)
// {
// case writing_mode::RlTb:
// case writing_mode::TbRl:
// case writing_mode::Rl:
// Context.set_rtl(true);
// break;
// default:
// Context.set_rtl(false);
// }
// }
// Context.set_margin_left(properties.fo_margin_left_? 20.0 * properties.fo_margin_left_->get_length().get_value_unit(length::pt) : 0);
// //for calculate tabs
// }
//
// styleContent->docx_convert(Context);
//
// Context.end_automatic_style();
//
// Context.push_text_properties(styleContent->get_style_text_properties());
//
// if (!Context.get_section_context().dump_.empty()
// && !Context.get_table_context().in_table()
// && (Context.get_process_note() == oox::docx_conversion_context::noNote)
// && !in_drawing)
// {
// Context.output_stream() << L"<w:pPr>";
// if (Context.is_paragraph_header() )
// {
// Context.output_stream() << Context.get_section_context().dump_;
// Context.get_section_context().dump_.clear();
//
// Context.output_stream() << L"</w:pPr>";
// Context.finish_paragraph();
// Context.start_paragraph();
// }
// else
// {
// Context.output_stream() << Context.get_section_context().dump_;
// Context.get_section_context().dump_.clear();
// Context.output_stream() << L"</w:pPr>";
// }
// }
// return 1;
// }
// }
// else
// {
// const std::wstring id = Context.styles_map_.get( styleInst->name(), styleInst->type() );
// Context.output_stream() << L"<w:pPr>";
////todooo причесать
// if (!Context.get_section_context().dump_.empty()
// && !Context.get_table_context().in_table()
// && (Context.get_process_note() == oox::docx_conversion_context::noNote)
// && !in_drawing)
// {
// if (Context.is_paragraph_header() )
// {
// Context.output_stream() << Context.get_section_context().dump_;
// Context.get_section_context().dump_.clear();
//
// Context.output_stream() << L"</w:pPr>";
// Context.finish_paragraph();
// Context.start_paragraph();
// Context.output_stream() << L"<w:pPr>";
// }
// else
// {
// Context.output_stream() << Context.get_section_context().dump_;
// Context.get_section_context().dump_.clear();
// }
// }
//
// Context.output_stream() << L"<w:pStyle w:val=\"" << id << L"\" />";
//
// if (!Context.get_text_tracked_context().dumpPPr_.empty())
// {
// Context.output_stream() << Context.get_text_tracked_context().dumpPPr_;
// Context.get_text_tracked_context().dumpPPr_.clear();
// }
//
// Context.docx_serialize_list_properties(Context.output_stream());
//
// if ((Attr.outline_level_) && (*Attr.outline_level_ > 0))
// {
// Context.output_stream() << L"<w:outlineLvl w:val=\"" << *Attr.outline_level_ - 1 << L"\" />";
// }
//
// if (!Context.get_text_tracked_context().dumpRPrInsDel_.empty())
// {
// Context.output_stream() << L"<w:rPr>";
// Context.output_stream() << Context.get_text_tracked_context().dumpRPrInsDel_;
// Context.get_text_tracked_context().dumpRPrInsDel_.clear();
// Context.output_stream() << L"</w:rPr>";
// }
// Context.output_stream() << L"</w:pPr>";
// return 2;
// }
// }
// }
// if (!Context.get_section_context().dump_.empty()
// && !Context.get_table_context().in_table()
// && (Context.get_process_note() == oox::docx_conversion_context::noNote)
// && !in_drawing)
// {
// Context.output_stream() << L"<w:pPr>";
// Context.output_stream() << Context.get_section_context().dump_;
// Context.get_section_context().dump_.clear();
// //todooo выяснить реальны ли заголовки без стилей и свойств
// Context.output_stream() << L"</w:pPr>";
// return 3;
// }
//
// return 0;
//}
//
void process_paragraph_index(const paragraph_attrs & Attr, oox::docx_conversion_context & Context)
{
if (false == Context.is_table_content()) return;
if (Attr.text_style_name_.empty())return;
style_instance * styleInst
= Context.root()->odf_context().styleContainer().style_by_name(Attr.text_style_name_, style_family::Paragraph, Context.process_headers_footers_);
if ((!styleInst) || (styleInst->is_automatic() == false))return;
if (L"index" != styleInst->style_class()) return;
}
}
std::wostream & paragraph::text_to_stream(std::wostream & _Wostream) const
{
// TODO!!!!
CP_SERIALIZE_TEXT(content_);
_Wostream << L"\n";
return _Wostream;
@ -273,7 +136,24 @@ void paragraph::add_attributes( const xml::attributes_wc_ptr & Attributes )
void paragraph::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name, document_context * Context)
{
CP_CREATE_ELEMENT_SIMPLE(content_);
if CP_CHECK_NAME(L"text", L"sequence")
{
CP_CREATE_ELEMENT_SIMPLE(sequence_);
if ((false == content_.empty()) && (content_.back()->get_type() == typeTextText))
{
sequence* q = dynamic_cast<sequence*>(sequence_.get());
text* t = dynamic_cast<text*>(content_.back().get());
if (q && t)
{
q->template_ = t->text_;
content_.pop_back();
}
}
content_.push_back(sequence_);
}
else
CP_CREATE_ELEMENT_SIMPLE(content_);
}
void paragraph::add_text(const std::wstring & Text)
@ -398,6 +278,14 @@ void paragraph::docx_convert(oox::docx_conversion_context & Context)
if (Context.get_drawing_context().get_current_shape() || Context.get_drawing_context().get_current_frame())
{
in_drawing = true;
if (sequence_)
{
std::wstringstream _Wostream;
CP_SERIALIZE_TEXT(content_);
Context.get_drawing_context().set_next_object_caption(_Wostream.str());
}
}
bool bIsNewParagraph = true;
@ -423,8 +311,6 @@ void paragraph::docx_convert(oox::docx_conversion_context & Context)
if (bIsNewParagraph)
Context.start_paragraph(is_header_);
std::wostream & _Wostream = Context.output_stream();
const _CP_OPT(std::wstring) masterPageName = Context.root()->odf_context().styleContainer().master_page_name_by_name(styleName);
if (masterPageName)
@ -491,8 +377,8 @@ void paragraph::docx_convert(oox::docx_conversion_context & Context)
if (Context.get_page_break())
{
if (Context.process_headers_footers_ == false)
//_Wostream << L"<w:lastRenderedPageBreak/>";
_Wostream << L"<w:br w:type=\"page\"/>";
//Context.output_stream() << L"<w:lastRenderedPageBreak/>";
Context.output_stream() << L"<w:br w:type=\"page\"/>";
Context.set_page_break(false);
}
content_[i]->docx_convert(Context);
@ -521,7 +407,7 @@ void paragraph::docx_convert(oox::docx_conversion_context & Context)
is_empty = false;
Context.add_new_run(_T(""));
_Wostream << L"<w:br w:type=\"page\"/>";
Context.output_stream() << L"<w:br w:type=\"page\"/>";
Context.finish_run();
}
@ -866,7 +752,7 @@ const wchar_t * text_index_body::name = L"index-body";
std::wostream & text_index_body::text_to_stream(std::wostream & _Wostream) const
{
CP_SERIALIZE_TEXT(index_content_main_);
CP_SERIALIZE_TEXT(content_);
return _Wostream;
}
@ -876,21 +762,21 @@ void text_index_body::add_attributes( const xml::attributes_wc_ptr & Attributes
void text_index_body::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(index_content_main_);
CP_CREATE_ELEMENT(content_);
}
void text_index_body::docx_convert(oox::docx_conversion_context & Context)
{
for (size_t i = 0; i < index_content_main_.size(); i++)
for (size_t i = 0; i < content_.size(); i++)
{
index_content_main_[i]->docx_convert(Context);
content_[i]->docx_convert(Context);
}
}
void text_index_body::pptx_convert(oox::pptx_conversion_context & Context)
{
for (size_t i = 0; i < index_content_main_.size(); i++)
for (size_t i = 0; i < content_.size(); i++)
{
index_content_main_[i]->pptx_convert(Context);
content_[i]->pptx_convert(Context);
}
}
// text:index-title
@ -901,21 +787,21 @@ const wchar_t * text_index_title::name = L"index-title";
void text_index_title::docx_convert(oox::docx_conversion_context & Context)
{
for (size_t i = 0; i < index_content_main_.size(); i++)
for (size_t i = 0; i < content_.size(); i++)
{
index_content_main_[i]->docx_convert(Context);
content_[i]->docx_convert(Context);
}
}
void text_index_title::pptx_convert(oox::pptx_conversion_context & Context)
{
for (size_t i = 0; i < index_content_main_.size(); i++)
for (size_t i = 0; i < content_.size(); i++)
{
index_content_main_[i]->pptx_convert(Context);
content_[i]->pptx_convert(Context);
}
}
std::wostream & text_index_title::text_to_stream(std::wostream & _Wostream) const
{
CP_SERIALIZE_TEXT(index_content_main_);
CP_SERIALIZE_TEXT(content_);
return _Wostream;
}
@ -926,7 +812,7 @@ void text_index_title::add_attributes( const xml::attributes_wc_ptr & Attributes
void text_index_title::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_CREATE_ELEMENT(index_content_main_);
CP_CREATE_ELEMENT(content_);
}
// text:table-of-content
@ -936,8 +822,11 @@ const wchar_t * text_table_of_content::name = L"table-of-content";
void text_table_of_content::docx_convert(oox::docx_conversion_context & Context)
{
if (text_index_body_)
text_index_body_->docx_convert(Context);
if (!text_index_body_) return;
Context.start_table_content(1);
text_index_body_->docx_convert(Context);
Context.end_table_content();
}
void text_table_of_content::pptx_convert(oox::pptx_conversion_context & Context)
@ -964,7 +853,10 @@ void text_table_of_content::add_child_element( xml::sax * Reader, const std::wst
{
CP_CREATE_ELEMENT(text_index_body_);
}
// TODO text-table-of-content-source
else if CP_CHECK_NAME(L"text", L"table-of-content-source")
{
CP_CREATE_ELEMENT(text_table_of_content_source_);
}
}
// text:table-index
@ -1032,14 +924,18 @@ void text_illustration_index::afterReadContent()
}
void text_illustration_index::docx_convert(oox::docx_conversion_context & Context)
{
std::wstring current_page_properties = Context.get_page_properties();
Context.get_section_context().add_section (text_section_attr_.text_name_,text_section_attr_.text_style_name_.get_value_or(L""), current_page_properties);
Context.add_page_properties(current_page_properties);
//std::wstring current_page_properties = Context.get_page_properties();
//
//Context.get_section_context().add_section (text_section_attr_.text_name_,text_section_attr_.text_style_name_.get_value_or(L""), current_page_properties);
//
//Context.add_page_properties(current_page_properties);
if (text_index_body_)
text_index_body_->docx_convert(Context);
// if (text_index_body_)
// text_index_body_->docx_convert(Context);
Context.start_table_content(2);
text_index_body_->docx_convert(Context);
Context.end_table_content();
}
void text_illustration_index::pptx_convert(oox::pptx_conversion_context & Context)
@ -1491,18 +1387,13 @@ const wchar_t * text_variable_set::name = L"variable-set";
void text_variable_set::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"office:value-type", office_value_type_);
CP_APPLY_ATTR(L"style:data-style-name", style_data_style_name_);
CP_APPLY_ATTR(L"text:display", text_display_);
CP_APPLY_ATTR(L"text:name", text_name_);
CP_APPLY_ATTR(L"office:value", office_value_);
CP_APPLY_ATTR(L"office:boolean-value", office_boolean_value_);
CP_APPLY_ATTR(L"office:date-value", office_date_value_);
CP_APPLY_ATTR(L"office:time-value", office_time_value_);
CP_APPLY_ATTR(L"office:string-value", office_string_value_);
CP_APPLY_ATTR(L"office:currency", office_currency_);
CP_APPLY_ATTR(L"office:formula", office_formula_);
office_value_.add_attributes(Attributes);
}
void text_variable_set::docx_convert(oox::docx_conversion_context & Context)
{
@ -1549,17 +1440,10 @@ const wchar_t * text_user_field_decl::name = L"user-field-decl";
void text_user_field_decl::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"office:value-type", office_value_type_);
CP_APPLY_ATTR(L"text:name", text_name_);
CP_APPLY_ATTR(L"office:value", office_value_);
CP_APPLY_ATTR(L"office:boolean-value", office_boolean_value_);
CP_APPLY_ATTR(L"office:date-value", office_date_value_);
CP_APPLY_ATTR(L"office:time-value", office_time_value_);
CP_APPLY_ATTR(L"office:string-value", office_string_value_);
CP_APPLY_ATTR(L"office:currency", office_currency_);
CP_APPLY_ATTR(L"office:formula", office_formula_);
office_value_.add_attributes(Attributes);
}
void text_user_field_decl::docx_convert(oox::docx_conversion_context & Context)
{
@ -1567,12 +1451,12 @@ void text_user_field_decl::docx_convert(oox::docx_conversion_context & Context)
std::wstring value;
if (office_string_value_) value = *office_string_value_;
else if (office_value_) value = *office_value_;
else if (office_date_value_) value = *office_date_value_;
else if (office_time_value_) value = *office_time_value_;
else if (office_currency_) value = *office_currency_;
else if (office_boolean_value_) value = *office_boolean_value_;
if (office_value_.office_string_value_) value = *office_value_.office_string_value_;
else if (office_value_.office_value_) value = *office_value_.office_value_;
else if (office_value_.office_date_value_) value = *office_value_.office_date_value_;
else if (office_value_.office_time_value_) value = *office_value_.office_time_value_;
else if (office_value_.office_currency_) value = *office_value_.office_currency_;
else if (office_value_.office_boolean_value_)value = *office_value_.office_boolean_value_;
Context.add_user_field(*text_name_, value);
}

View File

@ -82,6 +82,7 @@ public:
size_t drop_cap_docx_convert(oox::docx_conversion_context & Context);
office_element_ptr_array content_;
office_element_ptr sequence_;
private:
void drop_cap_text_docx_convert(office_element_ptr first_text_paragraph,oox::docx_conversion_context & Context);
@ -319,7 +320,8 @@ private:
public:
text_section_attr text_section_attr_;
office_element_ptr text_table_of_content_source_;
office_element_ptr text_table_of_content_source_;
office_element_ptr text_index_body_;
};
@ -506,7 +508,7 @@ public:
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
office_element_ptr_array index_content_main_;
office_element_ptr_array content_;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
@ -535,7 +537,7 @@ private:
public:
text_section_attr text_section_attr_;
office_element_ptr_array index_content_main_;
office_element_ptr_array content_;
};
CP_REGISTER_OFFICE_ELEMENT2(text_index_title);
@ -791,18 +793,12 @@ private:
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){}
_CP_OPT(odf_types::office_value_type) office_value_type_;
odf_types::common_value_and_type_attlist office_value_;
_CP_OPT(std::wstring) office_formula_;
_CP_OPT(std::wstring) office_boolean_value_;
_CP_OPT(std::wstring) office_date_value_;
_CP_OPT(std::wstring) office_time_value_;
_CP_OPT(std::wstring) office_string_value_;
_CP_OPT(std::wstring) office_value_;
_CP_OPT(std::wstring) office_currency_;
_CP_OPT(std::wstring) office_formula_;
_CP_OPT(std::wstring) style_data_style_name_;
_CP_OPT(std::wstring) text_display_;
_CP_OPT(std::wstring) text_name_;
_CP_OPT(std::wstring) style_data_style_name_;
_CP_OPT(std::wstring) text_display_;
_CP_OPT(std::wstring) text_name_;
};
CP_REGISTER_OFFICE_ELEMENT2(text_variable_set);
@ -871,15 +867,9 @@ private:
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){}
_CP_OPT(odf_types::office_value_type) office_value_type_;
_CP_OPT(std::wstring) office_boolean_value_;
_CP_OPT(std::wstring) office_date_value_;
_CP_OPT(std::wstring) office_time_value_;
_CP_OPT(std::wstring) office_string_value_;
_CP_OPT(std::wstring) office_value_;
_CP_OPT(std::wstring) office_currency_;
_CP_OPT(std::wstring) office_formula_;
_CP_OPT(std::wstring) text_name_;
odf_types::common_value_and_type_attlist office_value_;
_CP_OPT(std::wstring) office_formula_;
_CP_OPT(std::wstring) text_name_;
};
CP_REGISTER_OFFICE_ELEMENT2(text_user_field_decl);
//---------------------------------------------------------------------------------------------------

View File

@ -99,6 +99,7 @@ namespace
case XmlUtils::XmlNodeType_DocumentType:
return typeDocumentType;
case XmlUtils::XmlNodeType_Whitespace:
case XmlUtils::XmlNodeType_SIGNIFICANT_WHITESPACE:
return typeWhitespace;
case XmlUtils::XmlNodeType_EndElement:
return typeEndElement;

View File

@ -865,6 +865,14 @@
RelativePath="..\src\odf\datatypes\styleleadercolor.h"
>
</File>
<File
RelativePath="..\src\odf\datatypes\stylenumformat.cpp"
>
</File>
<File
RelativePath="..\src\odf\datatypes\stylenumformat.h"
>
</File>
<File
RelativePath="..\src\odf\datatypes\styleposition.cpp"
>

View File

@ -1591,6 +1591,14 @@
RelativePath="..\src\odf\office_forms.h"
>
</File>
<File
RelativePath="..\src\odf\office_meta.cpp"
>
</File>
<File
RelativePath="..\src\odf\office_meta.h"
>
</File>
<File
RelativePath="..\src\odf\office_presentation.cpp"
>

View File

@ -250,13 +250,13 @@ int odf_lists_styles_context::start_style_level(int level, int type)
int odf_type =1;
int format_type = -1;
std::wstring num_format = L"1";
style_numformat num_format;
bool sync_letter = false;
switch(type)
{
case 0: //numberformatAiueo :
case 1: //numberformatAiueoFullWidth :
num_format = L"ア, イ, ウ, ...";
num_format = style_numformat(style_numformat::aiueo);
break;
case 2: //numberformatArabicAbjad :
break;
@ -272,19 +272,19 @@ int odf_lists_styles_context::start_style_level(int level, int type)
case 7: //numberformatChicago :
break;
case 8: //numberformatChineseCounting :
num_format = L"イ, ロ, ハ, ...";
num_format = style_numformat(style_numformat::chineseCounting);
break;
case 9: //numberformatChineseCountingThousand :
break;
case 10: //numberformatChineseLegalSimplified :
num_format = L"一, 二, 三, ...";
num_format = style_numformat(style_numformat::chineseLegal);
break;
case 11: //numberformatChosung :
break;
case 12: //numberformatCustom :
break;
case 13: //numberformatDecimal :
num_format = L"1";
num_format = style_numformat(style_numformat::arabic);
break;
case 14: //numberformatDecimalEnclosedCircle :
break;
@ -326,19 +326,19 @@ int odf_lists_styles_context::start_style_level(int level, int type)
case 32: //numberformatIdeographEnclosedCircle :
break;
case 33: //numberformatIdeographLegalTraditional :
num_format = L"壹, 貳, 參, ...";
num_format = style_numformat(style_numformat::ideographLegal);
break;
case 34: //numberformatIdeographTraditional :
num_format = L"甲, 乙, 丙, ...";
num_format = style_numformat(style_numformat::ideographTraditional);
break;
case 35: //numberformatIdeographZodiac :
num_format = L"子, 丑, 寅, ...";
num_format = style_numformat(style_numformat::ideographZodiac);
break;
case 36: //numberformatIdeographZodiacTraditional :
num_format = L"甲子, 乙丑, 丙寅, ...";
num_format = style_numformat(style_numformat::ideographZodiacTraditional);
break;
case 37: //numberformatIroha :
num_format = L"イ, ロ, ハ, ...";
num_format = style_numformat(style_numformat::iroha);
break;
case 38: //numberformatIrohaFullWidth :
break;
@ -350,21 +350,21 @@ int odf_lists_styles_context::start_style_level(int level, int type)
break;
case 42: //numberformatKoreanCounting :
case 43: //numberformatKoreanDigital :
num_format = L"일, 이, 삼, ...";
num_format = style_numformat(style_numformat::koreanDigital);
break;
case 44: //numberformatKoreanDigital2 :
break;
case 45: //numberformatKoreanLegal :
break;
case 46: //numberformatLowerLetter
num_format = L"a";
num_format = style_numformat(style_numformat::alphaLc);
sync_letter = true;
break;
case 47: //numberformatLowerRoman :
num_format = L"i";
num_format = style_numformat(style_numformat::romanLc);
break;
case 48: //numberformatNone :
num_format = L"";
//num_format = L"";
break;
case 49: //numberformatNumberInDash : //??
//suffix -
@ -375,11 +375,11 @@ int odf_lists_styles_context::start_style_level(int level, int type)
case 51: //numberformatOrdinalText :
break;
case 52: //numberformatRussianLower :
num_format = L"А, Б, .., Аа, Аб, ... (ru)";
num_format = style_numformat(style_numformat::russianLo);
sync_letter = true;
break;
case 53: //numberformatRussianUpper :
num_format = L"А, Б, .., Аа, Аб, ... (ru)";
num_format = style_numformat(style_numformat::russianUp);
sync_letter = true;
break;
case 54: //numberformatTaiwaneseCounting :
@ -395,11 +395,11 @@ int odf_lists_styles_context::start_style_level(int level, int type)
case 59: //numberformatThaiNumbers :
break;
case 60: //numberformatUpperLetter :
num_format = L"A";
num_format = style_numformat(style_numformat::alphaUc);
sync_letter = true;
break;
case 61: //numberformatUpperRoman :
num_format = L"I";
num_format = style_numformat(style_numformat::romanUc);
break;
case 62: //numberformatVietnameseCounting :
break;

View File

@ -537,7 +537,7 @@ void odf_page_layout_context::set_page_number_format(_CP_OPT(int) & type, _CP_OP
case 34: break; //numberformatIdeographTraditional = 34,
case 35: break; //numberformatIdeographZodiac = 35,
case 36: break; //numberformatIdeographZodiacTraditional = 36,
case 37: break; //numberformatIroha = 37,
case 37: layout_state_list_.back().page_number_format = style_numformat(style_numformat::iroha); break;
case 38: break; //numberformatIrohaFullWidth = 38,
case 39: break; //numberformatJapaneseCounting = 39,
case 40: break; //numberformatJapaneseDigitalTenThousand = 40,
@ -546,26 +546,27 @@ void odf_page_layout_context::set_page_number_format(_CP_OPT(int) & type, _CP_OP
case 43: break; //numberformatKoreanDigital = 43,
case 44: break; //numberformatKoreanDigital2 = 44,
case 45: break; //numberformatKoreanLegal = 45,
case 46: layout_state_list_.back().page_number_format = L"a"; break; //numberformatLowerLetter = 46,
case 47: layout_state_list_.back().page_number_format = L"i"; break; //numberformatLowerRoman = 47,
case 46: layout_state_list_.back().page_number_format = style_numformat(style_numformat::alphaLc); break; //numberformatLowerLetter = 46,
case 47: layout_state_list_.back().page_number_format = style_numformat(style_numformat::romanLc); break; //numberformatLowerRoman = 47,
case 48: break; //numberformatNone = 48,
case 49: break; //numberformatnumberInDash = 49,
case 50: break; //numberformatOrdinal = 50,
case 51: break; //numberformatOrdinalText = 51,
case 52: break; //numberformatRussianLower = 52,
case 53: break; //numberformatRussianUpper = 53,
case 52: layout_state_list_.back().page_number_format = style_numformat(style_numformat::russianUp); break;
case 53: layout_state_list_.back().page_number_format = style_numformat(style_numformat::russianLo); break;
case 54: break; //numberformatTaiwaneseCounting = 54,
case 55: break; //numberformatTaiwaneseCountingThousand = 55,
case 56: break; //numberformatTaiwaneseDigital = 56,
case 57: break; //numberformatThaiCounting = 57,
case 58: break; //numberformatThaiLetters = 58,
case 59: break; //numberformatThainumbers = 59,
case 60: layout_state_list_.back().page_number_format = L"A"; break; //numberformatUpperLetter = 60,
case 61: layout_state_list_.back().page_number_format = L"I"; break; //numberformatUpperRoman = 61,
case 60: layout_state_list_.back().page_number_format = style_numformat(style_numformat::alphaUc); break; //numberformatUpperLetter = 60,
case 61: layout_state_list_.back().page_number_format = style_numformat(style_numformat::romanUc); break; //numberformatUpperRoman = 61,
case 62: break; //numberformatVietnameseCounting = 62
default:
break;
}
}//todooo
}
}

View File

@ -37,6 +37,7 @@
#include "office_elements_create.h"
#include "length.h"
#include "stylenumformat.h"
namespace cpdoccore {
namespace odf_writer {
@ -106,7 +107,7 @@ public:
_CP_OPT(odf_types::length) header_size_;
_CP_OPT(odf_types::length) footer_size_;
_CP_OPT(std::wstring) page_number_format;
_CP_OPT(odf_types::style_numformat) page_number_format;
private:
std::wstring style_oox_name_;

View File

@ -3590,28 +3590,28 @@ void DocxConverter::convert_comment(int oox_comm_id)
{
if (!docx_document->m_pComments)return;
for (size_t comm = 0 ; comm < docx_document->m_pComments->m_arrComments.size(); comm++)
{
OOX::CComment* oox_comment = docx_document->m_pComments->m_arrComments[comm];
if (oox_comment == NULL) continue;
if (oox_comment->m_oId.IsInit() == false) continue;
if (oox_comment->m_oId->GetValue() == oox_comm_id)
{
odt_context->start_comment_content();
{
if (oox_comment->m_oAuthor.IsInit()) odt_context->comment_context()->set_author (*oox_comment->m_oAuthor);
if (oox_comment->m_oDate.IsInit()) odt_context->comment_context()->set_date (oox_comment->m_oDate->GetValue());
if (oox_comment->m_oInitials.IsInit()) {}
std::map<int, int>::iterator pFind = docx_document->m_pComments->m_mapComments.find(oox_comm_id);
for (std::vector<OOX::WritingElement*>::iterator it = oox_comment->m_arrItems.begin(); it != oox_comment->m_arrItems.end(); ++it)
{
convert(*it);
}
if (pFind == docx_document->m_pComments->m_mapComments.end()) return;
if ( pFind->second < docx_document->m_pComments->m_arrComments.size() && pFind->second >= 0)
{
OOX::CComment* oox_comment = docx_document->m_pComments->m_arrComments[pFind->second];
if (oox_comment == NULL) return;
odt_context->start_comment_content();
{
if (oox_comment->m_oAuthor.IsInit()) odt_context->comment_context()->set_author (*oox_comment->m_oAuthor);
if (oox_comment->m_oDate.IsInit()) odt_context->comment_context()->set_date (oox_comment->m_oDate->GetValue());
if (oox_comment->m_oInitials.IsInit()) {}
for (std::vector<OOX::WritingElement*>::iterator it = oox_comment->m_arrItems.begin(); it != oox_comment->m_arrItems.end(); ++it)
{
convert(*it);
}
odt_context->end_comment_content();
}
odt_context->end_comment_content();
}
}
void DocxConverter::convert_footnote(int oox_ref_id)

View File

@ -1144,7 +1144,7 @@ namespace NSBinPptxRW
CRelsGenerator::CRelsGenerator(CImageManager2* pManager) : m_lNextRelsID(1), m_mapImages()
{
m_pManager = pManager;
m_pWriter = new CStringWriter();
m_pWriter = new NSStringUtils::CStringBuilder();
}
CRelsGenerator::~CRelsGenerator()
{

View File

@ -62,6 +62,10 @@ namespace NSCommon
class nullable_double;
class nullable_sizet;
}
namespace NSStringUtils
{
class CStringBuilder;
}
namespace PPTX
{
class Theme;
@ -85,7 +89,6 @@ namespace NSFontCutter
namespace NSBinPptxRW
{
class CStringWriter;
class CCommonWriter;
class CSeekTableEntry;
@ -400,7 +403,7 @@ namespace NSBinPptxRW
class CRelsGenerator
{
private:
CStringWriter* m_pWriter;
NSStringUtils::CStringBuilder* m_pWriter;
std::map<std::wstring, _relsGeneratorInfo> m_mapImages;
std::map<std::wstring, int> m_mapLinks;
public:

View File

@ -163,78 +163,64 @@ namespace PPTX
COfficeFileFormatChecker office_checker;
office_checker.isOOXFormatFile(oox_file.GetPath());
//if ( std::wstring::npos != sProgID.find(L"Word.Document"))
//-----------------------------------------------------------------------------------------
DocWrapper::FontProcessor oFontProcessor;
NSBinPptxRW::CDrawingConverter oDrawingConverter;
NSCommon::smart_ptr<OOX::IFileContainer> old_rels = *pWriter->m_pCurrentContainer;
NSCommon::smart_ptr<PPTX::Theme> old_theme = *pWriter->m_pTheme;
NSShapeImageGen::CMediaManager* old_manager = oDrawingConverter.m_pBinaryWriter->m_pCommon->m_pMediaManager;
oDrawingConverter.m_pBinaryWriter->m_pCommon->m_pMediaManager = pWriter->m_pCommon->m_pMediaManager;
oDrawingConverter.SetFontPicker(pWriter->m_pCommon->m_pFontPicker);
int type = 0;
if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX ||
office_checker.nFileType == AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCM )
{
pWriter->StartRecord(1);
pWriter->WriteBYTE(1);
pWriter->EndRecord();
DocWrapper::FontProcessor oFontProcessor;
NSBinPptxRW::CDrawingConverter oDrawingConverter;
BinDocxRW::CDocxSerializer oDocxSerializer;
NSBinPptxRW::CBinaryFileWriter* old_writer = oDrawingConverter.m_pBinaryWriter;
NSCommon::smart_ptr<OOX::IFileContainer> old_rels = *pWriter->m_pCurrentContainer;
BinDocxRW::CDocxSerializer* old_serial = pWriter->m_pMainDocument;
NSCommon::smart_ptr<PPTX::Theme> old_theme = *pWriter->m_pTheme;
oDrawingConverter.m_pBinaryWriter = pWriter;
oDocxSerializer.m_pParamsWriter = new BinDocxRW::ParamsWriter(pWriter, &oFontProcessor, &oDrawingConverter, NULL);
pWriter->m_pMainDocument = &oDocxSerializer;
type = 1;
BinDocxRW::CDocxSerializer* old_serializer = pWriter->m_pMainDocument;
BinDocxRW::CDocxSerializer oDocxSerializer;
oDrawingConverter.m_pBinaryWriter->m_pMainDocument = &oDocxSerializer;
oDocxSerializer.m_pParamsWriter = new BinDocxRW::ParamsWriter(oDrawingConverter.m_pBinaryWriter, &oFontProcessor, &oDrawingConverter, NULL);
BinDocxRW::BinaryFileWriter oBinaryFileWriter(*oDocxSerializer.m_pParamsWriter);
pWriter->StartRecord(2);
oBinaryFileWriter.intoBindoc(oox_unpacked.GetPath());
pWriter->EndRecord();
oDrawingConverter.m_pBinaryWriter = old_writer;
*pWriter->m_pCurrentContainer = old_rels;
pWriter->m_pMainDocument = old_serial;
*pWriter->m_pTheme = old_theme;
oBinaryFileWriter.intoBindoc(oox_unpacked.GetPath());
pWriter->m_pMainDocument = old_serializer;
}
else if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX ||
office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSM)
//if ( std::wstring::npos != sProgID.find(L"Excel.Sheet")) //"ET.Xlsx.6" !!!
{
pWriter->StartRecord(1);
pWriter->WriteBYTE(2);
pWriter->EndRecord();
DocWrapper::FontProcessor fp;
NSBinPptxRW::CDrawingConverter oDrawingConverter;
type = 2;
NSBinPptxRW::CBinaryFileWriter* old_writer = oDrawingConverter.m_pBinaryWriter;
NSCommon::smart_ptr<OOX::IFileContainer> old_rels = *pWriter->m_pCurrentContainer;
NSCommon::smart_ptr<PPTX::Theme> old_theme = *pWriter->m_pTheme;
oDrawingConverter.m_pBinaryWriter = pWriter;
BinXlsxRW::BinaryFileWriter xlsxBinaryWriter(fp);
BinXlsxRW::BinaryFileWriter xlsxBinaryWriter(oFontProcessor);
OOX::Spreadsheet::CXlsx oXlsxEmbedded(oox_unpacked);
pWriter->StartRecord(2);
xlsxBinaryWriter.intoBindoc(oXlsxEmbedded, *pWriter , NULL, &oDrawingConverter);
pWriter->EndRecord();
oDrawingConverter.m_pBinaryWriter = old_writer;
*pWriter->m_pCurrentContainer = old_rels;
*pWriter->m_pTheme = old_theme;
xlsxBinaryWriter.intoBindoc(oXlsxEmbedded, *oDrawingConverter.m_pBinaryWriter , NULL, &oDrawingConverter);
}
//else if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX)
//{
//}
else
{//unknown ms package
pWriter->StartRecord(1);
pWriter->WriteBYTE(0);
pWriter->EndRecord();
pWriter->WriteString1(2, ole_file->filename().GetFilename());
oDrawingConverter.m_pBinaryWriter->WriteString1(2, ole_file->filename().GetFilename());
}
*pWriter->m_pCurrentContainer = old_rels;
*pWriter->m_pTheme = old_theme;
oDrawingConverter.m_pBinaryWriter->m_pCommon->m_pMediaManager = old_manager;
//---------------------------------------------------------------------------------------------------------------------
pWriter->StartRecord(1);
pWriter->WriteBYTE(type);
pWriter->EndRecord();
pWriter->StartRecord(2);
pWriter->WriteBYTEArray(oDrawingConverter.m_pBinaryWriter->GetBuffer(), oDrawingConverter.m_pBinaryWriter->GetPosition());
pWriter->EndRecord();
NSDirectory::DeleteDirectory(oox_unpacked.GetPath());
}
else if ( std::wstring::npos != sProgID.find(L"Equation"))
@ -359,14 +345,8 @@ namespace PPTX
std::wstring sThemePath, sMediaPath, sEmbedPath;
oDocxSerializer.CreateDocxFolders (sDstEmbeddedTemp, sThemePath, sMediaPath, sEmbedPath);
NSBinPptxRW::CBinaryFileReader* old_reader = oDrawingConverter.m_pReader;
NSBinPptxRW::CRelsGenerator* old_rels = pReader->m_pRels;
//m_mapEnumeratedGlobal.clear();
oDrawingConverter.m_pReader = pReader;
pReader->m_pRels = new NSBinPptxRW::CRelsGenerator();
oDrawingConverter.m_pReader->Init(pReader->GetData() + pReader->GetPos(), 0, _embed_data_size);
oDrawingConverter.SetMainDocument(&oDocxSerializer);
@ -390,46 +370,24 @@ namespace PPTX
OOX::CContentTypes *pContentTypes = oDrawingConverter.GetContentTypes();
//docProps
OOX::CPath pathDocProps = sDstEmbeddedTemp + FILE_SEPARATOR_STR + _T("docProps");
OOX::CPath pathDocProps = sDstEmbeddedTemp + FILE_SEPARATOR_STR + L"docProps";
NSDirectory::CreateDirectory(pathDocProps.GetPath());
OOX::CPath DocProps = std::wstring(_T("docProps"));
OOX::CPath DocProps = std::wstring(L"docProps");
OOX::CApp oApp(NULL);
oApp.SetDefaults();
oApp.write(pathDocProps + FILE_SEPARATOR_STR + _T("app.xml"), DocProps, *pContentTypes);
OOX::CCore oCore(NULL);
oCore.SetDefaults();
oCore.write(pathDocProps + FILE_SEPARATOR_STR + _T("core.xml"), DocProps, *pContentTypes);
OOX::CApp* pApp = new OOX::CApp(NULL);
if (pApp)
{
pApp->SetApplication(L"ONLYOFFICE");
#if defined(INTVER)
pApp->SetAppVersion(VALUE2STR(INTVER));
#endif
pApp->SetDocSecurity(0);
pApp->SetScaleCrop(false);
pApp->SetLinksUpToDate(false);
pApp->SetSharedDoc(false);
pApp->SetHyperlinksChanged(false);
pApp->write(pathDocProps + FILE_SEPARATOR_STR + _T("app.xml"), DocProps, *pContentTypes);
delete pApp;
}
OOX::CCore* pCore = new OOX::CCore(NULL);
if (pCore)
{
pCore->SetCreator(_T(""));
pCore->SetLastModifiedBy(_T(""));
pCore->write(pathDocProps + FILE_SEPARATOR_STR + _T("core.xml"), DocProps, *pContentTypes);
delete pCore;
}
oDocxSerializer.m_pCurFileWriter->Write();
pContentTypes->Write(sDstEmbeddedTemp);
COfficeUtils oOfficeUtils(NULL);
oOfficeUtils.CompressFileOrDirectory(sDstEmbeddedTemp, sDstEmbedded + FILE_SEPARATOR_STR + sDocxFilename, true);
pReader->m_pRels->CloseRels();
delete pReader->m_pRels;
pReader->m_pRels = old_rels;
oDrawingConverter.m_pReader = old_reader;
//------------------------------------------------------------------
//std::wstring sEmbWorksheetRelsName = L"embeddings/" + sDocxFilename;
//std::wstring sEmbWorksheetRelType = OOX::FileTypes::MicrosoftOfficeWordDocument.RelationType();
@ -455,13 +413,9 @@ namespace PPTX
boost::unordered_map<std::wstring, size_t> old_enum_map = oXlsx.m_mapEnumeratedGlobal;
NSBinPptxRW::CBinaryFileReader* old_reader = oDrawingConverter.m_pReader;
NSBinPptxRW::CRelsGenerator* old_rels = pReader->m_pRels;
oXlsx.m_mapEnumeratedGlobal.clear();
oDrawingConverter.m_pReader = pReader;
pReader->m_pRels = new NSBinPptxRW::CRelsGenerator();
oDrawingConverter.m_pReader->Init(pReader->GetData() + pReader->GetPos(), 0, _embed_data_size);
oDrawingConverter.SetDstPath(sDstEmbeddedTemp + FILE_SEPARATOR_STR + L"xl");
oDrawingConverter.SetSrcPath(pReader->m_strFolder, 2);
@ -470,7 +424,7 @@ namespace PPTX
oDrawingConverter.SetEmbedDstPath(sEmbedPath);
std::wstring sXlsxFilename = L"Microsoft_Excel_Worksheet" + std::to_wstring( id ) + L".xlsx";
oEmbeddedReader.ReadMainTable(oXlsx, *pReader, pReader->m_strFolder, sDstEmbeddedTemp, oSaveParams, &oDrawingConverter);
oEmbeddedReader.ReadMainTable(oXlsx, *oDrawingConverter.m_pReader, pReader->m_strFolder, sDstEmbeddedTemp, oSaveParams, &oDrawingConverter);
oXlsx.PrepareToWrite();
@ -479,11 +433,6 @@ namespace PPTX
COfficeUtils oOfficeUtils(NULL);
oOfficeUtils.CompressFileOrDirectory(sDstEmbeddedTemp, sDstEmbedded + FILE_SEPARATOR_STR + sXlsxFilename, true);
pReader->m_pRels->CloseRels();
delete pReader->m_pRels;
pReader->m_pRels = old_rels;
oDrawingConverter.m_pReader = old_reader;
oXlsx.m_mapEnumeratedGlobal = old_enum_map;
//------------------------------------------------------------------
//std::wstring sEmbWorksheetRelsName = L"embeddings/" + sXlsxFilename;

View File

@ -567,6 +567,10 @@
<Filter
Name="___"
>
<File
RelativePath="..\source\Writer\OOXCommentsWriter.h"
>
</File>
<File
RelativePath="..\source\Writer\OOXContentTypesWriter.h"
>

View File

@ -1007,32 +1007,32 @@ bool RtfCharPropsCommand::ExecuteCommand(RtfDocument& oDocument, RtfReader& oRea
//COMMAND_RTF_BOOL( "ul", charProps->m_bUnderline, sCommand, hasParameter, parameter)
COMMAND_RTF_INT ( "ulc", charProps->m_nUnderlineColor, sCommand, hasParameter, parameter)
COMMAND_RTF_INT ( "uld", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Dotted)
COMMAND_RTF_INT ( "uld", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Dotted)
COMMAND_RTF_INT ( "uldash", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Dashed)
COMMAND_RTF_INT ( "uldashd", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Dash_dotted)
COMMAND_RTF_INT ( "uldashdd", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Dash_dot_dotted)
COMMAND_RTF_INT ( "uldb", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Double)
COMMAND_RTF_INT ( "ulhwave", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Heavy_wave)
COMMAND_RTF_INT ( "ulldash", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Long_dashe)
COMMAND_RTF_INT ( "uldashd", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Dash_dotted)
COMMAND_RTF_INT ( "uldashdd", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Dash_dot_dotted)
COMMAND_RTF_INT ( "uldb", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Double)
COMMAND_RTF_INT ( "ulhwave", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Heavy_wave)
COMMAND_RTF_INT ( "ulldash", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Long_dashe)
COMMAND_RTF_INT ( "ulnone", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_none)
COMMAND_RTF_INT ( "ulth", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Thick)
COMMAND_RTF_INT ( "ulthd", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Thick_dotted)
COMMAND_RTF_INT ( "ulthdash", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Thick_dashed)
COMMAND_RTF_INT ( "ulthdashd", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Thick_dash_dotted)
COMMAND_RTF_INT ( "ulth", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Thick)
COMMAND_RTF_INT ( "ulthd", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Thick_dotted)
COMMAND_RTF_INT ( "ulthdash", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Thick_dashed)
COMMAND_RTF_INT ( "ulthdashd", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Thick_dash_dotted)
COMMAND_RTF_INT ( "ulthdashdd", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Thick_dash_dot_dotted)
COMMAND_RTF_INT ( "ulthldash", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Thick_long_dashed)
COMMAND_RTF_INT ( "ulthldash", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Thick_long_dashed)
COMMAND_RTF_INT ( "ululdbwave", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Double_wave)
COMMAND_RTF_INT ( "ulw", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Word)
COMMAND_RTF_INT ( "ulw", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Word)
COMMAND_RTF_INT ( "ulwave", charProps->m_eUnderStyle, sCommand, true, RtfCharProperty::uls_Wave)
COMMAND_RTF_INT ( "up", charProps->m_nUp, sCommand, hasParameter, parameter)
COMMAND_RTF_INT ( "crauth", charProps->m_nCrAuth, sCommand, hasParameter, parameter)
COMMAND_RTF_INT ( "crdate", charProps->m_nCrDate, sCommand, hasParameter, parameter)
COMMAND_RTF_INT ( "insrsid", charProps->m_nInsrsid, sCommand, hasParameter, parameter)
COMMAND_RTF_INT ( "insrsid", charProps->m_nInsrsid, sCommand, hasParameter, parameter)
COMMAND_RTF_INT ( "revauth", charProps->m_nRevauth, sCommand, hasParameter, parameter)
COMMAND_RTF_INT ( "revdttm", charProps->m_nRevdttm, sCommand, hasParameter, parameter)
COMMAND_RTF_INT ( "revauth", charProps->m_nRevauth, sCommand, hasParameter, parameter)
COMMAND_RTF_INT ( "revdttm", charProps->m_nRevdttm, sCommand, hasParameter, parameter)
COMMAND_RTF_INT ( "revauthdel", charProps->m_nRevauthDel, sCommand, hasParameter, parameter)
COMMAND_RTF_INT ( "revdttmdel", charProps->m_nRevdttmDel, sCommand, hasParameter, parameter)
@ -2814,7 +2814,69 @@ bool RtfParagraphPropDestination::ExecuteCommand(RtfDocument& oDocument, RtfRead
if ( pNewBookmarkEnd->IsValid() )
m_oCurParagraph->AddItem( pNewBookmarkEnd );
}
else if ( "footnote" == sCommand )
else if ( "atrfstart" == sCommand )
{
RtfAnnotElemPtr pNewAnnotElem ( new RtfAnnotElem(1) );
RtfAnnotElemReader oAnnotElemReader ( *pNewAnnotElem );
oAbstrReader.StartSubReader( oAnnotElemReader, oDocument, oReader );
if ( pNewAnnotElem->IsValid() )
m_oCurParagraph->AddItem( pNewAnnotElem );
}
else if ( "atrfend" == sCommand )
{
RtfAnnotElemPtr pNewAnnotElem ( new RtfAnnotElem(2) );
RtfAnnotElemReader oAnnotElemReader ( *pNewAnnotElem );
oAbstrReader.StartSubReader( oAnnotElemReader, oDocument, oReader );
if ( pNewAnnotElem->IsValid() )
m_oCurParagraph->AddItem( pNewAnnotElem );
}
else if ( "annotation" == sCommand )
{
RtfAnnotationPtr pNewAnnot ( new RtfAnnotation() );
RtfAnnotationReader oAnnotReader ( *pNewAnnot );
oAbstrReader.StartSubReader( oAnnotReader, oDocument, oReader );
if ( pNewAnnot->IsValid() )
m_oCurParagraph->AddItem( pNewAnnot );
}
else if ( "atnid" == sCommand )
{
RtfAnnotElemPtr pNewAnnotElem ( new RtfAnnotElem(5) );
RtfAnnotElemReader oAnnotElemReader( *pNewAnnotElem );
oAbstrReader.StartSubReader( oAnnotElemReader, oDocument, oReader );
if ( pNewAnnotElem->IsValid() )
m_oCurParagraph->AddItem( pNewAnnotElem );
}
else if ( "atnauthor" == sCommand )
{
RtfAnnotElemPtr pNewAnnotElem ( new RtfAnnotElem(4) );
RtfAnnotElemReader oAnnotElemReader( *pNewAnnotElem );
oAbstrReader.StartSubReader( oAnnotElemReader, oDocument, oReader );
if ( pNewAnnotElem->IsValid() )
m_oCurParagraph->AddItem( pNewAnnotElem );
}
else if ( "atnref" == sCommand )
{
RtfAnnotElemPtr pNewAnnotElem ( new RtfAnnotElem(3) );
RtfAnnotElemReader oAnnotElemReader ( *pNewAnnotElem );
oAbstrReader.StartSubReader( oAnnotElemReader, oDocument, oReader );
if ( pNewAnnotElem->IsValid() )
m_oCurParagraph->AddItem( pNewAnnotElem );
}
else if ( "footnote" == sCommand )
{
RtfFootnotePtr pNewFootnote ( new RtfFootnote() );
pNewFootnote->m_oCharProp = oReader.m_oState->m_oCharProp;
@ -2825,6 +2887,14 @@ bool RtfParagraphPropDestination::ExecuteCommand(RtfDocument& oDocument, RtfRead
if ( pNewFootnote->IsValid() )
m_oCurParagraph->AddItem( pNewFootnote );
}
//else if ( "chatn" == sCommand )
//{
// RtfCharSpecialPtr pNewChar ( new RtfCharSpecial() );
//
// pNewChar->m_oProperty = oReader.m_oState->m_oCharProp;
// pNewChar->m_eType = RtfCharSpecial::rsc_chatn;
// m_oCurParagraph->AddItem( pNewChar );
//}
else if ( "chftn" == sCommand )
{
if ( 1 == oReader.m_nFootnote )

View File

@ -1513,6 +1513,40 @@ private:
m_oField.m_bTextOnly = true;
}
};
class RtfAnnotElemReader: public RtfAbstractReader
{
public:
RtfAnnotElem& m_oAnnot;
RtfAnnotElemReader( RtfAnnotElem& oAnnot ) : m_oAnnot(oAnnot)
{
}
bool ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader, std::string sCommand, bool hasParameter, int parameter)
{
if( "atrfstart" == sCommand )
;
else if( "atrfend" == sCommand )
;
else if( "atnref" == sCommand )
;
else if( "atndate" == sCommand )
;
else if( "atnid" == sCommand )
;
else if( "atnauthor" == sCommand )
;
else if ( "atnparent" == sCommand )
;
else
return false;
return true;
}
void ExecuteText(RtfDocument& oDocument, RtfReader& oReader, std::wstring sText)
{
m_oAnnot.m_sValue += sText ;
}
};
class RtfBookmarkStartReader: public RtfAbstractReader
{
@ -1679,6 +1713,60 @@ public:
oReader.m_nFootnote = PROP_DEF;
}
};
class RtfAnnotationReader: public RtfAbstractReader
{
private:
RtfParagraphPropDestination m_oParPropDest;
public:
RtfAnnotation& m_oRtfAnnotation;
RtfAnnotationReader( RtfAnnotation& oRtfAnnotation ) : m_oRtfAnnotation(oRtfAnnotation)
{
}
bool ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader, std::string sCommand, bool hasParameter, int parameter)
{
if( "annotation" == sCommand )
{
return true;
}
else if( "atnref" == sCommand )
{
m_oRtfAnnotation.m_oRef = RtfAnnotElemPtr ( new RtfAnnotElem(3) );
RtfAnnotElemReader oAnnotReader ( *m_oRtfAnnotation.m_oRef );
StartSubReader( oAnnotReader, oDocument, oReader );
}
else if( "atndate" == sCommand )
{
m_oRtfAnnotation.m_oDate = RtfAnnotElemPtr ( new RtfAnnotElem(6) );
RtfAnnotElemReader oAnnotReader ( *m_oRtfAnnotation.m_oDate );
StartSubReader( oAnnotReader, oDocument, oReader );
}
else if( "atnparent" == sCommand )
{
m_oRtfAnnotation.m_oParent = RtfAnnotElemPtr ( new RtfAnnotElem(7) );
RtfAnnotElemReader oAnnotReader ( *m_oRtfAnnotation.m_oParent );
StartSubReader( oAnnotReader, oDocument, oReader );
}
else
return m_oParPropDest.ExecuteCommand( oDocument, oReader, (*this), sCommand, hasParameter, parameter );
return true;
}
void ExecuteText( RtfDocument& oDocument, RtfReader& oReader, std::wstring sText )
{
m_oParPropDest.ExecuteText( oDocument, oReader, sText );
}
void ExitReader( RtfDocument& oDocument, RtfReader& oReader )
{
m_oParPropDest.Finalize( oReader );
m_oRtfAnnotation.m_oContent = m_oParPropDest.m_oTextItems;
}
};
class RtfDefParPropReader: public RtfAbstractReader
{
private:

View File

@ -135,14 +135,14 @@ public:
int nId = ooxFtnEdn->m_oId->GetValue();
OOXTextItemReader oTextItemReader;
for (std::vector<OOX::WritingElement*>::iterator it = ooxFtnEdn->m_arrItems.begin(); it != ooxFtnEdn->m_arrItems.end(); ++it)
for (size_t i = 0; i < ooxFtnEdn->m_arrItems.size(); ++i)
{
if( nSeparatorId == nId )
{
TextItemContainerPtr oNewTextItem ( new TextItemContainer() );
oTextItemReader.m_oTextItems = oNewTextItem;
if( true == oTextItemReader.Parse( *it, oParam ) )
if( true == oTextItemReader.Parse( ooxFtnEdn->m_arrItems[i], oParam ) )
{
if( true == bFootnote )
oParam.oRtf->m_oFootnoteSep = oNewTextItem;
@ -155,7 +155,7 @@ public:
TextItemContainerPtr oNewTextItem ( new TextItemContainer() );
oTextItemReader.m_oTextItems = oNewTextItem;
if( true == oTextItemReader.Parse( *it, oParam ) )
if( true == oTextItemReader.Parse( ooxFtnEdn->m_arrItems[i], oParam ) )
{
if( true == bFootnote )
oParam.oRtf->m_oFootnoteCon = oNewTextItem;
@ -168,7 +168,7 @@ public:
TextItemContainerPtr oNewTextItem ( new TextItemContainer() );
oTextItemReader.m_oTextItems = oNewTextItem;
if( true == oTextItemReader.Parse( *it, oParam ) )
if( true == oTextItemReader.Parse( ooxFtnEdn->m_arrItems[i], oParam ) )
{
if( true == bFootnote )
oParam.oReader->m_mapFootnotes[ nId] = oNewTextItem;

View File

@ -32,9 +32,9 @@
#include "OOXParagraphReader.h"
#include "OOXTextItemReader.h"
#include "OOXpPrFrameReader.h"
#include "OOXpPrTabReader.h"
#include "OOXTableReader.h"
#include "../RtfOle.h"
@ -457,6 +457,117 @@ bool OOXParagraphReader::Parse3( ReaderParameter oParam , RtfParagraph& oOutputP
}
}
}break;
case OOX::et_w_commentRangeStart:
case OOX::et_w_commentReference:
{
OOX::Logic::CCommentRangeStart * pCommentStart = dynamic_cast<OOX::Logic::CCommentRangeStart*>(m_ooxElement);
if(pCommentStart->m_oId.IsInit())
{
int nId = pCommentStart->m_oId->GetValue();
std::map<int, OOXReader::_comment>::iterator pFind = oParam.oReader->m_mapComments.find( nId );
if( pFind == oParam.oReader->m_mapComments.end())
{
RtfAnnotElemPtr oNewAnnotElem ( new RtfAnnotElem(1) );
oNewAnnotElem->m_sValue = std::to_wstring(0x7700000 + nId);
OOXReader::_comment comment;
comment.ref = oNewAnnotElem->m_sValue;
comment.index = oParam.oReader->m_mapComments.size();
oParam.oReader->m_mapComments.insert(std::make_pair( nId, comment));
oOutputParagraph.AddItem( oNewAnnotElem );
}
}
}break;
case OOX::et_w_commentRangeEnd:
{
OOX::Logic::CCommentRangeEnd * pCommentEnd = dynamic_cast<OOX::Logic::CCommentRangeEnd*>(m_ooxElement);
int nId = pCommentEnd->m_oId->GetValue();
std::map<int, OOXReader::_comment>::iterator pFindRef = oParam.oReader->m_mapComments.find( nId );
if( pFindRef != oParam.oReader->m_mapComments.end())
{
RtfAnnotElemPtr oNewAnnotElem ( new RtfAnnotElem(2) );
oNewAnnotElem->m_sValue = pFindRef->second.ref;
oOutputParagraph.AddItem( oNewAnnotElem );
//find comment and add info
std::map<int, int>::iterator pFindComment = oParam.oDocx->m_pComments->m_mapComments.find(nId);
if (pFindComment != oParam.oDocx->m_pComments->m_mapComments.end())
{
if ( pFindComment->second < oParam.oDocx->m_pComments->m_arrComments.size() && pFindComment->second >= 0)
{
OOX::CComment* oox_comment = oParam.oDocx->m_pComments->m_arrComments[pFindComment->second];
if (oox_comment)
{
if (oox_comment->m_oAuthor.IsInit())
{
RtfAnnotElemPtr oNewAnnotAuthor ( new RtfAnnotElem(4) );
oNewAnnotAuthor->m_sValue = *oox_comment->m_oAuthor;
oOutputParagraph.AddItem( oNewAnnotAuthor );
}
if (oox_comment->m_oInitials.IsInit())
{
RtfAnnotElemPtr oNewAnnotAuthorId ( new RtfAnnotElem(5) );
oNewAnnotAuthorId->m_sValue = *oox_comment->m_oInitials;
oOutputParagraph.AddItem( oNewAnnotAuthorId );
}
RtfAnnotationPtr oNewAnnotContent(new RtfAnnotation());
oNewAnnotContent->m_oRef = RtfAnnotElemPtr ( new RtfAnnotElem(3) );
oNewAnnotContent->m_oRef->m_sValue = pFindRef->second.ref;
if (oox_comment->m_oDate.IsInit())
{
oNewAnnotContent->m_oDate = RtfAnnotElemPtr ( new RtfAnnotElem(6) );
int nDate = RtfUtility::convertDateTime(oox_comment->m_oDate->GetValue());
oNewAnnotContent->m_oDate->m_sValue = std::to_wstring(nDate);
}
OOXTextItemReader oTextItemReader;
oTextItemReader.m_oTextItems = oNewAnnotContent->m_oContent;
for (size_t i = 0; i < oox_comment->m_arrItems.size(); ++i)
{
if (oParam.oDocx->m_pCommentsExt)
{
OOX::Logic::CParagraph *pParagraph = dynamic_cast<OOX::Logic::CParagraph*>(oox_comment->m_arrItems[i]);
if ((pParagraph) && (pParagraph->m_oParaId.IsInit()))
{
std::map<int, int>::iterator pFindPara = oParam.oDocx->m_pCommentsExt->m_mapComments.find(pParagraph->m_oParaId->GetValue());
if (pFindPara != oParam.oDocx->m_pCommentsExt->m_mapComments.end())
{
oParam.oReader->m_mapCommentsPara.insert(std::make_pair( pParagraph->m_oParaId->GetValue(), pFindRef->second.index));
if (oParam.oDocx->m_pCommentsExt->m_arrComments[pFindPara->second]->m_oParaIdParent.IsInit())
{
std::map<int, int>::iterator pFindParent = oParam.oReader->m_mapCommentsPara.find(oParam.oDocx->m_pCommentsExt->m_arrComments[pFindPara->second]->m_oParaIdParent->GetValue());
if (pFindParent != oParam.oReader->m_mapCommentsPara.end())
{
oNewAnnotContent->m_oParent = RtfAnnotElemPtr ( new RtfAnnotElem(7) );
oNewAnnotContent->m_oParent->m_sValue = std::to_wstring( pFindParent->second - pFindRef->second.index);
}
}
}
}
}
oTextItemReader.Parse(oox_comment->m_arrItems[i], oParam);
}
oOutputParagraph.AddItem( oNewAnnotContent );
}
}
}
}
}break;
default:
break;
}

View File

@ -66,8 +66,17 @@ public:
int m_nCurOleChartId;
int m_nCurFittextId;
std::map<int, std::wstring> m_aBookmarks;
struct _comment
{
std::wstring ref;
int index;
};
std::map<int, _comment> m_mapComments; //nId, ref & index added
std::map<int, int> m_mapCommentsPara; //paraId, index added
std::map<int, int> m_mapPictureBullet;
std::map<int, TextItemContainerPtr> m_mapFootnotes;
std::map<int, TextItemContainerPtr> m_mapEndnotes;

View File

@ -34,6 +34,7 @@
#include "Writer/OOXWriter.h"
#include "Writer/OOXFootnoteWriter.h"
#include "Writer/OOXCommentsWriter.h"
#include "Utils.h"
@ -56,11 +57,10 @@ std::wstring RtfBookmarkStart::RenderToRtf(RenderParameter oRenderParameter)
std::wstring RtfBookmarkStart::RenderToOOX(RenderParameter oRenderParameter)
{
std::wstring sResult;
//ATLASSERT( false == m_sName.empty() );
sResult += L"<w:bookmarkStart";
OOXWriter * poOOXWriter = static_cast<OOXWriter*> ( oRenderParameter.poWriter );
RtfDocument * poDocument = static_cast<RtfDocument*> (oRenderParameter.poDocument);
RtfDocument * poDocument = static_cast<RtfDocument*> ( oRenderParameter.poDocument );
std::map<std::wstring, int>::iterator pPair = poOOXWriter->m_aBookmarksId.find( m_sName );
@ -118,6 +118,131 @@ std::wstring RtfBookmarkEnd::RenderToOOX(RenderParameter oRenderParameter)
sResult += L"/>";
return sResult;
}
std::wstring RtfAnnotElem::RenderToRtf(RenderParameter oRenderParameter)
{
std::wstring sResult;
if (m_nType == 1) sResult += L"{\\*\\atrfstart " + m_sValue + L"}";
else if (m_nType == 2) sResult += L"{\\*\\atrfend " + m_sValue + L"}";
else if (m_nType == 3) sResult += L"{\\*\\atnref " + m_sValue + L"}";
else if (m_nType == 4) sResult += L"{\\*\\atnauthor " + m_sValue + L"}";
else if (m_nType == 5) sResult += L"{\\*\\atnid " + m_sValue + L"}";
else if (m_nType == 6) sResult += L"{\\*\\atndate " + m_sValue + L"}";
else if (m_nType == 7) sResult += L"{\\*\\atnparent " + m_sValue + L"}";
return sResult;
}
std::wstring RtfAnnotElem::RenderToOOX(RenderParameter oRenderParameter)
{
if (m_nType > 8 || m_nType < 1) return L"";
std::wstring sResult;
OOXWriter* poOOXWriter = static_cast<OOXWriter*> (oRenderParameter.poWriter);
OOXCommentsWriter* poCommentsWriter = static_cast<OOXCommentsWriter*>( poOOXWriter->m_poCommentsWriter );
if (m_nType == 4)
{
poCommentsWriter->AddCommentAuthor(m_sValue);
}
else if (m_nType == 5)
{
poCommentsWriter->AddCommentID(m_sValue);
}
else
{
std::map<std::wstring,OOXCommentsWriter::_comment>::iterator pFind = poCommentsWriter->m_mapComments.find(m_sValue);
int id = -1;
if (pFind == poCommentsWriter->m_mapComments.end())
{
id = poCommentsWriter->m_mapComments.size() ;//+ 1;
poCommentsWriter->AddComment(m_sValue, id);
}
else
{
id = pFind->second.nID;
}
if (m_nType == 1)
{
sResult += L"<w:commentRangeStart w:id=\"" + std::to_wstring(id) + L"\"/>";
}
else if (m_nType == 3)
{
sResult += L"<w:commentReference w:id=\"" + std::to_wstring(id) + L"\"/>";
}
else if (m_nType == 2)
{
poCommentsWriter->SetCommentEnd(m_sValue);
sResult += L"<w:commentRangeEnd w:id=\"" + std::to_wstring(id) + L"\"/>";
sResult += L"<w:r><w:commentReference w:id=\"" + std::to_wstring(id) + L"\"/></w:r>";
}
}
return sResult;
}
std::wstring RtfAnnotation::RenderToRtf(RenderParameter oRenderParameter)
{
std::wstring sResult;
sResult += L"\\chatn{\\*\\annotation";
if (m_oRef)
{
sResult += m_oRef->RenderToRtf(oRenderParameter);
}
if (m_oDate)
{
sResult += m_oDate->RenderToRtf(oRenderParameter);
}
if (m_oParent)
{
sResult += m_oParent->RenderToRtf(oRenderParameter);
}
if (m_oContent)
{
sResult += m_oContent->RenderToRtf(oRenderParameter);
}
sResult += L"}";
return sResult;
}
std::wstring RtfAnnotation::RenderToOOX(RenderParameter oRenderParameter)
{
OOXWriter* poOOXWriter = static_cast<OOXWriter*> (oRenderParameter.poWriter);
OOXCommentsWriter* poCommentsWriter = static_cast<OOXCommentsWriter*>( poOOXWriter->m_poCommentsWriter );
if (!m_oRef) return L"";
if (m_oDate)
{
int nValue = boost::lexical_cast<int>(m_oDate->m_sValue);
poCommentsWriter->AddCommentDate(m_oRef->m_sValue, RtfUtility::convertDateTime(nValue));
}
if (m_oContent)
{
RenderParameter oNewParameter = oRenderParameter;
oNewParameter.nType = RENDER_TO_OOX_PARAM_COMMENT;
oNewParameter.poRels = poCommentsWriter->m_oRelsWriter.get();
std::wstring content = m_oContent->RenderToOOX(oNewParameter);
std::wstring sParaId = XmlUtils::IntToString(poOOXWriter->m_nextParaId, L"%08X");//last para id in comment
poCommentsWriter->AddCommentContent(m_oRef->m_sValue, sParaId, content);
}
if (m_oParent)
{
poCommentsWriter->AddCommentParent(m_oRef->m_sValue, m_oParent->m_sValue);
}
return L"";
}
std::wstring RtfFootnote::RenderToRtf(RenderParameter oRenderParameter)
{
std::wstring sResult;
@ -147,9 +272,11 @@ std::wstring RtfFootnote::RenderToOOX(RenderParameter oRenderParameter)
{
int nID = poDocument->m_oIdGenerator.Generate_EndnoteNumber();
OOXEndnoteWriter* poEndnoteWriter = static_cast<OOXEndnoteWriter*>( poOOXWriter->m_poEndnoteWriter );
RenderParameter oNewParameter = oRenderParameter;
oNewParameter.nType = RENDER_TO_OOX_PARAM_UNKNOWN;
oNewParameter.poRels = poEndnoteWriter->m_oRelsWriter.get();
poEndnoteWriter->AddEndnote( L"", nID, m_oContent->RenderToOOX(oNewParameter) );
sResult += L"<w:r>";

View File

@ -64,6 +64,48 @@ public:
std::wstring RenderToRtf(RenderParameter oRenderParameter);
std::wstring RenderToOOX(RenderParameter oRenderParameter);
};
class RtfAnnotElem : public IDocumentElement
{
public:
std::wstring m_sValue;
int m_nType;
RtfAnnotElem(int type = 0) : m_nType (type)
{
}
int GetType()
{
return TYPE_RTF_ANNOTVALUE;
}
std::wstring RenderToRtf(RenderParameter oRenderParameter);
std::wstring RenderToOOX(RenderParameter oRenderParameter);
};
typedef boost::shared_ptr<RtfAnnotElem> RtfAnnotElemPtr;
class RtfAnnotation : public IDocumentElement
{
public:
RtfAnnotElemPtr m_oRef;
RtfAnnotElemPtr m_oDate;
RtfAnnotElemPtr m_oParent;
TextItemContainerPtr m_oContent;
RtfCharProperty m_oCharProp;
RtfAnnotation()
{
m_oContent = TextItemContainerPtr( new TextItemContainer() );
}
int GetType()
{
return TYPE_RTF_ANNOTATION;
}
std::wstring RenderToRtf(RenderParameter oRenderParameter);
std::wstring RenderToOOX(RenderParameter oRenderParameter);
};
typedef boost::shared_ptr<RtfAnnotation> RtfAnnotationPtr;
class RtfFootnote : public IDocumentElement
{
public:

View File

@ -40,7 +40,7 @@ std::wstring RtfChar::RenderToOOX(RenderParameter oRenderParameter)
OOXWriter* poOOXWriter = static_cast<OOXWriter*> (oRenderParameter.poWriter);
std::wstring sResult;
if (RENDER_TO_OOX_PARAM_RUN == oRenderParameter.nType)
if (RENDER_TO_OOX_PARAM_RUN == oRenderParameter.nType)
{
bool bInsert = false;
bool bDelete = false;
@ -69,6 +69,7 @@ std::wstring RtfChar::RenderToOOX(RenderParameter oRenderParameter)
sResult += L"<w:rPr>";
sResult += m_oProperty.RenderToOOX(oRenderParameter);
sResult += L"</w:rPr>";
sResult += renderTextToXML(L"Text", bDelete );
sResult += L"</w:r>";

View File

@ -82,6 +82,11 @@ const long g_cdMaxPercent = 1000000;
#define TYPE_RTF_FOOTNOTE 30
#define TYPE_RTF_ANNOTSTART 31
#define TYPE_RTF_ANNOTEND 32
#define TYPE_RTF_ANNOTVALUE 33
#define TYPE_RTF_ANNOTATION 34
#define RENDER_TO_OOX_PARAM_UNKNOWN 0
#define RENDER_TO_OOX_PARAM_LAST 1
#define RENDER_TO_OOX_PARAM_RUN 2
@ -107,6 +112,7 @@ const long g_cdMaxPercent = 1000000;
#define RENDER_TO_OOX_PARAM_OLE_ONLY 25
#define RENDER_TO_OOX_PARAM_OLDLIST_ABS 26
#define RENDER_TO_OOX_PARAM_OLDLIST_OVR 27
#define RENDER_TO_OOX_PARAM_COMMENT 28
#define RENDER_TO_RTF_PARAM_UNKNOWN 0
#define RENDER_TO_RTF_PARAM_CHAR 1

View File

@ -32,6 +32,8 @@
#include "RtfParagraph.h"
#include "RtfWriter.h"
#include "Writer/OOXWriter.h"
int RtfParagraph::AddItem( IDocumentElementPtr piRend )
{
if( TYPE_RTF_CHAR == piRend->GetType() )
@ -85,7 +87,10 @@ std::wstring RtfParagraph::RenderToRtf(RenderParameter oRenderParameter)
std::wstring RtfParagraph::RenderToOOX(RenderParameter oRenderParameter)
{
std::wstring sResult ;
OOXWriter* poOOXWriter = static_cast<OOXWriter*>(oRenderParameter.poWriter);
std::wstring sResult ;
if( RENDER_TO_OOX_PARAM_PLAIN == oRenderParameter.nType )
{
for (size_t i = 0; i < m_aArray.size(); i++ )
@ -125,8 +130,13 @@ std::wstring RtfParagraph::RenderToOOX(RenderParameter oRenderParameter)
if( NULL != m_oOldList )
bCanConvertToNumbering = m_oOldList->CanConvertToNumbering();
sResult += L"<w:p>";
sResult += L"<w:pPr>";
sResult += L"<w:p";
if (oRenderParameter.nType == RENDER_TO_OOX_PARAM_COMMENT)
{
std::wstring sParaId = XmlUtils::IntToString(++poOOXWriter->m_nextParaId, L"%08X");
sResult += L" w14:paraId=\"" + sParaId + L"\" w14:textId=\"" + sParaId + L"\"";
}
sResult += L"><w:pPr>";
m_oProperty.m_bOldList = (NULL != m_oOldList);
sResult += m_oProperty.RenderToOOX(oRenderParameter);
@ -162,7 +172,15 @@ std::wstring RtfParagraph::RenderToOOX(RenderParameter oRenderParameter)
}
}
}
if (oRenderParameter.nType == RENDER_TO_OOX_PARAM_COMMENT)
{
sResult += L"<w:r>";
sResult += L"<w:rPr>";
sResult += m_oProperty.m_oCharProperty.RenderToOOX(oRenderParameter);
sResult += L"</w:rPr>";
sResult += L"<w:annotationRef/>";
sResult += L"</w:r>";
}
oNewParam.nType = RENDER_TO_OOX_PARAM_RUN;
std::wstring ParagraphContent;

View File

@ -379,7 +379,7 @@ public:
return date_str;
}
static int convertDateTime (std::wstring & dt_)
static int convertDateTime (const std::wstring & dt_)
{
int result = 0;

View File

@ -0,0 +1,236 @@
/*
* (c) Copyright Ascensio System SIA 2010-2018
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "OOXWriter.h"
class OOXCommentsWriter
{
public:
OOXRelsWriterPtr m_oRelsWriter;
OOXCommentsWriter( OOXWriter& oWriter, RtfDocument& oDocument ) : m_oWriter(oWriter), m_oDocument(oDocument)
{
m_oRelsWriter = OOXRelsWriterPtr( new OOXRelsWriter( _T("comments.xml"), oDocument ) );
oWriter.m_oCustomRelsWriter.push_back( m_oRelsWriter );
}
void SetCommentEnd(const std::wstring & ref) //for author
{
m_sCurrent_ref = ref;
}
void AddComment( const std::wstring & ref, int nID)
{
_comment comment(nID);
m_mapComments.insert(std::make_pair(ref, comment));
}
void AddCommentID( const std::wstring & id)
{
std::map<std::wstring, _comment>::iterator pFind = m_mapComments.find(m_sCurrent_ref);
if (pFind != m_mapComments.end())
{
pFind->second.authorId = id;
}
}
void AddCommentAuthor( const std::wstring & author)
{
std::map<std::wstring, _comment>::iterator pFind = m_mapComments.find(m_sCurrent_ref);
if (pFind != m_mapComments.end())
{
pFind->second.author = author;
}
}
void AddCommentContent( const std::wstring & ref, const std::wstring & paraId, const std::wstring & content)
{
std::map<std::wstring, _comment>::iterator pFind = m_mapComments.find(ref);
if (pFind != m_mapComments.end())
{
pFind->second.content = content;
pFind->second.paraId = paraId;
m_mapCommentsParent.insert(std::make_pair(pFind->second.nID, paraId));
}
}
void AddCommentParent( const std::wstring & ref, const std::wstring & parent)
{
std::map<std::wstring, _comment>::iterator pFind = m_mapComments.find(ref);
if (pFind != m_mapComments.end())
{
pFind->second.nParentID = boost::lexical_cast<int>(parent);
}
}
void AddCommentDate( const std::wstring & ref, const std::wstring & date)
{
std::map<std::wstring, _comment>::iterator pFind = m_mapComments.find(ref);
if (pFind != m_mapComments.end())
{
pFind->second.date = date;
}
}
bool Save( std::wstring sFolder )
{
if( m_mapComments.empty() ) return false;
CFile file;
if (file.CreateFile(sFolder + FILE_SEPARATOR_STR + _T("comments.xml"))) return false;
m_oWriter.m_oDocRels.AddRelationship( _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"), _T("comments.xml") );
m_oWriter.m_oContentTypes.AddContent( _T("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"), _T("/word/comments.xml") );
std::wstring sXml = CreateXml();
std::string sXmlUTF = NSFile::CUtf8Converter::GetUtf8StringFromUnicode(sXml);
file.WriteFile((void*)sXmlUTF.c_str(), (DWORD)sXmlUTF.length());
file.CloseFile();
//-------------------------------------------------------------------------------------------------------------------------
if (file.CreateFile(sFolder + FILE_SEPARATOR_STR + L"commentsExtended.xml")) return false;
m_oWriter.m_oDocRels.AddRelationship( L"http://schemas.microsoft.com/office/2011/relationships/commentsExtended", L"commentsExtended.xml" );
m_oWriter.m_oContentTypes.AddContent( L"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml", L"/word/commentsExtended.xml" );
sXml = CreateXmlExtended();
sXmlUTF = NSFile::CUtf8Converter::GetUtf8StringFromUnicode(sXml);
file.WriteFile((void*)sXmlUTF.c_str(), (DWORD)sXmlUTF.length());
file.CloseFile();
return true;
}
struct _comment
{
_comment(int id) : nID(id) {}
int nID = 0;
int nParentID = 0;
std::wstring author;
std::wstring date;
std::wstring content;
std::wstring authorId;
std::wstring paraId;
};
std::map<std::wstring, _comment> m_mapComments;
private:
RtfDocument& m_oDocument;
OOXWriter& m_oWriter;
std::wstring m_sCurrent_ref;
std::wstring m_sCommentsExtended;
std::map<int, std::wstring> m_mapCommentsParent;
std::wstring CreateXml()
{
std::wstring sResult = L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
sResult += L"<w:comments \
xmlns:wpc=\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\" \
xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \
xmlns:o=\"urn:schemas-microsoft-com:office:office\" \
xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" \
xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" \
xmlns:v=\"urn:schemas-microsoft-com:vml\" \
xmlns:wp14=\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\" \
xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" \
xmlns:w10=\"urn:schemas-microsoft-com:office:word\" \
xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" \
xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\" \
xmlns:w15=\"http://schemas.microsoft.com/office/word/2012/wordml\" \
xmlns:wpg=\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\" \
xmlns:wpi=\"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\" \
xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\" \
xmlns:wps=\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\" \
mc:Ignorable=\"w14 w15 wp14\">";
for (std::map<std::wstring, _comment>::iterator it = m_mapComments.begin(); it != m_mapComments.end(); ++it)
{
sResult += L"<w:comment w:id=\"" + std::to_wstring(it->second.nID) + L"\" w:author=\"" +
it->second.author + L"\" w:date=\"" + it->second.date + L"\" w:initials=\"" + it->second.authorId + L"\">";
sResult += it->second.content;
sResult += L"</w:comment>";
//--------------------------------------------------------
m_sCommentsExtended += L"<w15:commentEx w15:paraId=\"" + it->second.paraId + L"\"";
if (it->second.nParentID != 0)
{
it->second.nParentID = it->second.nID + it->second.nParentID;
std::map<int, std::wstring>::iterator pFind = m_mapCommentsParent.find(it->second.nParentID);
if (pFind != m_mapCommentsParent.end())
{
m_sCommentsExtended += L" w15:paraIdParent=\"" + pFind->second + L"\"";
}
}
m_sCommentsExtended += L" w15:done=\"0\"/>";
}
sResult += L"</w:comments>";
return sResult;
}
std::wstring CreateXmlExtended()
{
std::wstring sResult;
sResult += L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
sResult += L"<w15:commentsEx \
xmlns:wpc=\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\" \
xmlns:cx=\"http://schemas.microsoft.com/office/drawing/2014/chartex\" \
xmlns:cx1=\"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex\" \
xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \
xmlns:o=\"urn:schemas-microsoft-com:office:office\" \
xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" \
xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" \
xmlns:v=\"urn:schemas-microsoft-com:vml\" \
xmlns:wp14=\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\" \
xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" \
xmlns:w10=\"urn:schemas-microsoft-com:office:word\" \
xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" \
xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\" \
xmlns:w15=\"http://schemas.microsoft.com/office/word/2012/wordml\" \
xmlns:w16se=\"http://schemas.microsoft.com/office/word/2015/wordml/symex\" \
xmlns:wpg=\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\" \
xmlns:wpi=\"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\" \
xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\" \
xmlns:wps=\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\" \
mc:Ignorable=\"w14 w15 w16se wp14\">";
sResult += m_sCommentsExtended;
sResult += L"</w15:commentsEx>";
return sResult;
}
};

View File

@ -51,27 +51,28 @@ std::wstring OOXDocumentWriter::CreateXmlStart()
//пишем document.xml
std::wstring sResult = L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>\n";
sResult += L"<w:document ";
sResult += L"xmlns:wpc=\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\" \
xmlns:cx=\"http://schemas.microsoft.com/office/drawing/2014/chartex\" \
xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \
xmlns:o=\"urn:schemas-microsoft-com:office:office\" \
xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" \
xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" \
xmlns:v=\"urn:schemas-microsoft-com:vml\" \
xmlns:wp14=\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\" \
xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" \
xmlns:w10=\"urn:schemas-microsoft-com:office:word\" \
sResult += L"<w:document \
xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" \
xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" \
xmlns:v=\"urn:schemas-microsoft-com:vml\" \
xmlns:o=\"urn:schemas-microsoft-com:office:office\" \
xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" \
xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" \
xmlns:w10=\"urn:schemas-microsoft-com:office:word\" \
xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" \
xmlns:wpc=\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\" \
xmlns:cx=\"http://schemas.microsoft.com/office/drawing/2014/chartex\" \
xmlns:cx1=\"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex\" \
xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \
xmlns:wp14=\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\" \
xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\" \
xmlns:w15=\"http://schemas.microsoft.com/office/word/2012/wordml\" \
xmlns:w16se=\"http://schemas.microsoft.com/office/word/2015/wordml/symex\" \
xmlns:wpg=\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\" \
xmlns:wpi=\"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\" \
xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\" \
xmlns:wps=\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\" \
xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" \
mc:Ignorable=\"w14 wp14\"";
sResult += L">";
mc:Ignorable=\"w14 w15 w16se wp14\">";
if (m_oDocument.m_pBackground)
{

View File

@ -41,6 +41,7 @@
#include "OOXSettingsWriter.h"
#include "OOXThemeWriter.h"
#include "OOXFootnoteWriter.h"
#include "OOXCommentsWriter.h"
#include "../../../../Common/DocxFormat/Source/DocxFormat/Docx.h"
#include "../../../../Common/DocxFormat/Source/DocxFormat/App.h"
@ -53,11 +54,13 @@ OOXWriter::OOXWriter( RtfDocument& oDocument, std::wstring sPath ) :
m_sTargetFolder ( sPath.c_str() ),
m_oRels ( L"", oDocument ),
m_nCurTrackChangesId( 0),
m_nextParaId ( 0x00000000),
m_oDocRels ( L"document.xml", oDocument )
{
m_nCurFitWidth = PROP_DEF;
m_poFootnoteWriter = NULL;
m_poEndnoteWriter = NULL;
m_poCommentsWriter = NULL;
m_poDocumentWriter = new OOXDocumentWriter ( *this, m_oDocument );
m_poFootnoteWriter = new OOXFootnoteWriter ( *this, m_oDocument );
@ -66,6 +69,7 @@ OOXWriter::OOXWriter( RtfDocument& oDocument, std::wstring sPath ) :
m_poNumberingWriter = new OOXNumberingWriter( *this, m_oDocument );
m_poSettingsWriter = new OOXSettingsWriter ( *this, m_oDocument );
m_poStylesWriter = new OOXStylesWriter ( *this, m_oDocument );
m_poCommentsWriter = new OOXCommentsWriter ( *this, m_oDocument );
m_poDocPropsApp = new OOX::CApp(NULL);
m_poDocPropsCore = new OOX::CCore(NULL);
@ -88,6 +92,7 @@ OOXWriter::OOXWriter( RtfDocument& oDocument, std::wstring sPath ) :
}
OOXWriter::~OOXWriter()
{
delete ((OOXCommentsWriter*) m_poCommentsWriter);
delete ((OOXDocumentWriter*) m_poDocumentWriter);
delete ((OOXFootnoteWriter*) m_poFootnoteWriter);
delete ((OOXEndnoteWriter*) m_poEndnoteWriter);
@ -142,10 +147,11 @@ bool OOXWriter::SaveByItemEnd()
((OOXFootnoteWriter*) m_poFootnoteWriter)->Save (pathWord.GetPath());
((OOXEndnoteWriter*) m_poEndnoteWriter)->Save (pathWord.GetPath());
((OOXCommentsWriter*) m_poCommentsWriter)->Save (pathWord.GetPath());
((OOXNumberingWriter*) m_poNumberingWriter)->Save (m_sTargetFolder);
((OOXStylesWriter*) m_poStylesWriter)->Save (m_sTargetFolder);
((OOXFontTableWriter*) m_poFontTableWriter)->Save (m_sTargetFolder);
((OOXSettingsWriter*) m_poSettingsWriter)->Save (m_sTargetFolder); //setting в последнюю очередь
//-------------------------------------------------------------------------------------

View File

@ -44,6 +44,8 @@ public:
int m_nCurFitWidth;
int m_nCurTrackChangesId;
long int m_nextParaId;
OOXRelsWriter m_oDocRels;
OOXRelsWriter m_oRels;
@ -57,6 +59,7 @@ public:
void* m_poNumberingWriter;
void* m_poSettingsWriter;
void* m_poStylesWriter;
void* m_poCommentsWriter;
void* m_poDocPropsApp;
void* m_poDocPropsCore;

View File

@ -40,6 +40,19 @@
#include <algorithm>
#include <string>
#if defined(_WIN64)
#pragma comment(lib, "../../build/bin/icu/win_64/icuuc.lib")
#elif defined (_WIN32)
#if defined(_DEBUG)
#pragma comment(lib, "../../build/lib/win_32/DEBUG/graphics.lib")
#pragma comment(lib, "../../build/lib/win_32/DEBUG/kernel.lib")
#else
#pragma comment(lib, "../../build/lib/win_32/graphics.lib")
#pragma comment(lib, "../../build/lib/win_32/kernel.lib")
#endif
#pragma comment(lib, "../../build/bin/icu/win_32/icuuc.lib")
#endif
HRESULT convert_single(std::wstring srcFileName)
{
int n1 = srcFileName.rfind(_T('.'));

View File

@ -2,82 +2,18 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RtfFormatLib", "..\RtfFormatLib\Win32\RtfFormatLib.vcproj", "{AF2D00A7-A351-4700-AE88-C1D9ADE29345}"
ProjectSection(ProjectDependencies) = postProject
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\..\Common\DocxFormat\Projects\DocxFormat2005.vcproj", "{A100103A-353E-45E8-A9B8-90B87CC5C0B0}"
ProjectSection(ProjectDependencies) = postProject
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raster", "..\..\DesktopEditor\raster\raster_vs2005.vcproj", "{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}"
ProjectSection(ProjectDependencies) = postProject
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
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}
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1} = {EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239} = {764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jasper", "..\..\DesktopEditor\cximage\jasper\jasper_vs2005.vcproj", "{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig", "..\..\DesktopEditor\cximage\jbig\jbig_vs2005.vcproj", "{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "..\..\DesktopEditor\cximage\jpeg\Jpeg_vs2005.vcproj", "{818753F2-DBB9-4D3B-898A-A604309BE470}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpsd", "..\..\DesktopEditor\cximage\libpsd\libpsd_vs2005.vcproj", "{9A037A69-D1DF-4505-AB2A-6CB3641C476E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mng", "..\..\DesktopEditor\cximage\mng\mng_vs2005.vcproj", "{40A69F40-063E-43FD-8543-455495D8733E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "png", "..\..\DesktopEditor\cximage\png\png_vs2005.vcproj", "{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdcr", "..\..\DesktopEditor\cximage\raw\libdcr_vs2005.vcproj", "{DF861D33-9BC1-418C-82B1-581F590FE169}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\DesktopEditor\cximage\tiff\Tiff_vs2005.vcproj", "{0588563C-F05C-428C-B21A-DD74756628B3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig2", "..\..\DesktopEditor\raster\JBig2\win32\jbig2.vcproj", "{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeUtilsLib", "..\..\OfficeUtils\win32\OfficeUtilsLib.vcproj", "{F8274B05-168E-4D6E-B843-AA7510725363}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RtfFormatTest", "RtfFormatTest.vcproj", "{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}"
ProjectSection(ProjectDependencies) = postProject
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
{AF2D00A7-A351-4700-AE88-C1D9ADE29345} = {AF2D00A7-A351-4700-AE88-C1D9ADE29345}
{36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302}
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPTXFormat", "..\..\ASCOfficePPTXFile\PPTXLib\PPTXFormat.vcproj", "{36636678-AE25-4BE6-9A34-2561D1BCF302}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\..\DesktopEditor\graphics\graphics_vs2005.vcproj", "{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}"
ProjectSection(ProjectDependencies) = postProject
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "font_engine", "..\..\DesktopEditor\fontengine\font_engine_vs2005.vcproj", "{C739151F-5384-41DF-A1A6-F089E2C1AD56}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "agg2d", "..\..\DesktopEditor\agg-2.4\agg_vs2005.vcproj", "{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "..\..\DesktopEditor\freetype-2.5.2\builds\windows\vc2005\freetype.vcproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml2", "..\..\DesktopEditor\xml\build\vs2005\libxml2.vcproj", "{21663823-DE45-479B-91D0-B4FEF4916EF0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -102,102 +38,6 @@ Global
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|Win32.Build.0 = Release|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|x64.ActiveCfg = Release|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|x64.Build.0 = Release|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|Win32.ActiveCfg = Debug|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|Win32.Build.0 = Debug|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|x64.ActiveCfg = Debug|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|x64.Build.0 = Debug|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|Win32.ActiveCfg = Release|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|Win32.Build.0 = Release|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|x64.ActiveCfg = Release|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|x64.Build.0 = Release|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|Win32.ActiveCfg = Debug|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|Win32.Build.0 = Debug|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|x64.ActiveCfg = Debug|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|x64.Build.0 = Debug|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|Win32.ActiveCfg = Release|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|Win32.Build.0 = Release|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|x64.ActiveCfg = Release|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|x64.Build.0 = Release|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|Win32.ActiveCfg = Debug|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|Win32.Build.0 = Debug|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|x64.ActiveCfg = Debug|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|x64.Build.0 = Debug|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|Win32.ActiveCfg = Release|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|Win32.Build.0 = Release|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|x64.ActiveCfg = Release|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|x64.Build.0 = Release|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|Win32.ActiveCfg = Debug|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|Win32.Build.0 = Debug|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|x64.ActiveCfg = Debug|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|x64.Build.0 = Debug|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|Win32.ActiveCfg = Release|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|Win32.Build.0 = Release|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|x64.ActiveCfg = Release|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|x64.Build.0 = Release|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|Win32.ActiveCfg = Debug|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|Win32.Build.0 = Debug|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|x64.ActiveCfg = Debug|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|x64.Build.0 = Debug|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|Win32.ActiveCfg = Release|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|Win32.Build.0 = Release|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|x64.ActiveCfg = Release|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|x64.Build.0 = Release|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|Win32.ActiveCfg = Debug|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|Win32.Build.0 = Debug|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|x64.ActiveCfg = Debug|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|x64.Build.0 = Debug|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|Win32.ActiveCfg = Release|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|Win32.Build.0 = Release|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|x64.ActiveCfg = Release|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|x64.Build.0 = Release|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|Win32.ActiveCfg = Debug|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|Win32.Build.0 = Debug|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|x64.ActiveCfg = Debug|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|x64.Build.0 = Debug|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Release|Win32.ActiveCfg = Release|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Release|Win32.Build.0 = Release|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Release|x64.ActiveCfg = Release|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Release|x64.Build.0 = Release|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|Win32.ActiveCfg = Debug|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|Win32.Build.0 = Debug|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|x64.ActiveCfg = Debug|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|x64.Build.0 = Debug|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|Win32.ActiveCfg = Release|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|Win32.Build.0 = Release|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|x64.ActiveCfg = Release|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|x64.Build.0 = Release|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|Win32.ActiveCfg = Debug|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|Win32.Build.0 = Debug|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|x64.ActiveCfg = Debug|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|x64.Build.0 = Debug|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|Win32.ActiveCfg = Release|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|Win32.Build.0 = Release|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|x64.ActiveCfg = Release|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|x64.Build.0 = Release|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|Win32.ActiveCfg = Debug|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|Win32.Build.0 = Debug|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|x64.ActiveCfg = Debug|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|x64.Build.0 = Debug|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|Win32.ActiveCfg = Release|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|Win32.Build.0 = Release|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|x64.ActiveCfg = Release|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|x64.Build.0 = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|Win32.ActiveCfg = Debug|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|Win32.Build.0 = Debug|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|x64.ActiveCfg = Debug|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|x64.Build.0 = Debug|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|Win32.ActiveCfg = Release|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|Win32.Build.0 = Release|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|x64.ActiveCfg = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|x64.Build.0 = Release|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|Win32.ActiveCfg = Debug|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|Win32.Build.0 = Debug|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|x64.ActiveCfg = Debug|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|x64.Build.0 = Debug|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|Win32.ActiveCfg = Release|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|Win32.Build.0 = Release|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|x64.ActiveCfg = Release|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|x64.Build.0 = Release|x64
{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}.Debug|Win32.ActiveCfg = Debug|Win32
{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}.Debug|Win32.Build.0 = Debug|Win32
{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}.Debug|x64.ActiveCfg = Debug|x64
@ -214,46 +54,6 @@ Global
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|Win32.Build.0 = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|x64.ActiveCfg = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|x64.Build.0 = Release|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|Win32.ActiveCfg = Debug|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|Win32.Build.0 = Debug|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|x64.ActiveCfg = Debug|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|x64.Build.0 = Debug|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|Win32.ActiveCfg = Release|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|Win32.Build.0 = Release|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|x64.ActiveCfg = Release|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|x64.Build.0 = Release|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|Win32.ActiveCfg = Debug|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|Win32.Build.0 = Debug|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|x64.ActiveCfg = Debug|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|x64.Build.0 = Debug|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|Win32.ActiveCfg = Release|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|Win32.Build.0 = Release|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|x64.ActiveCfg = Release|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|x64.Build.0 = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|Win32.ActiveCfg = Debug|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|Win32.Build.0 = Debug|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|x64.ActiveCfg = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|x64.Build.0 = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|Win32.ActiveCfg = Release|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|Win32.Build.0 = Release|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|x64.ActiveCfg = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|x64.Build.0 = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.ActiveCfg = Debug|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.Build.0 = Debug|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.ActiveCfg = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.Build.0 = Release|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.ActiveCfg = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.Build.0 = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|x64.ActiveCfg = Debug|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|x64.Build.0 = Debug|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.ActiveCfg = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.Build.0 = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|x64.ActiveCfg = Release|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -48,7 +48,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="false"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
@ -427,23 +427,7 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\DesktopEditor\xml\src\xmldom.cpp"
>
</File>
<File
RelativePath="..\..\DesktopEditor\xml\src\xmllight.cpp"
>
</File>
</Filter>
<File
RelativePath="..\..\build\bin\icu\win_32\icudt.lib"
>
</File>
<File
RelativePath="..\..\build\bin\icu\win_32\icuuc.lib"
>
</File>
<File
RelativePath="RtfFormatTest.cpp"
>

View File

@ -76,7 +76,7 @@ namespace Txt2Docx
return converter_->m_inputFile.read(path);
}
void Converter::write(/*const std::wstring& path*/XmlUtils::CStringWriter & stringWriter)
void Converter::write(/*const std::wstring& path*/NSStringUtils::CStringBuilder & stringWriter)
{
for (size_t i = 0; i < converter_->m_outputFile.m_arrItems.size(); ++i)
{

View File

@ -33,7 +33,7 @@
#ifndef TXT_2_DOCX_CONVERTER_INCLUDE_H_
#define TXT_2_DOCX_CONVERTER_INCLUDE_H_
#include "../../../Common/DocxFormat/Source/XML/Utils.h"
#include "../../../DesktopEditor/common/StringBuilder.h"
#include <string>
namespace TxtXml
@ -53,7 +53,7 @@ namespace Txt2Docx
void convert(TxtXml::ITxtXmlEvent& Event);
void read (const std::wstring& path);
void write (XmlUtils::CStringWriter & stringWriter/*const std::wstring& path*/);
void write (NSStringUtils::CStringBuilder & stringWriter/*const std::wstring& path*/);
private:
Converter_Impl * converter_;

View File

@ -2,10 +2,6 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XlsFormat", "..\source\win32\XlsFormat.vcproj", "{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}"
ProjectSection(ProjectDependencies) = postProject
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XlsXlsxConverter", "..\source\win32\XlsXlsxConverter.vcproj", "{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}"
ProjectSection(ProjectDependencies) = postProject
@ -15,99 +11,30 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XlsXlsxConverter", "..\sour
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XlsFormatTest", "XlsFormatTest.vcproj", "{C2882DDD-07E6-4314-AD4B-48F43F38D722}"
ProjectSection(ProjectDependencies) = postProject
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
{36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302}
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA} = {CBEDD0D1-10A8-45C1-AF81-8492F40964CA}
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\..\DesktopEditor\graphics\graphics_vs2005.vcproj", "{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}"
ProjectSection(ProjectDependencies) = postProject
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
{818753F2-DBB9-4D3B-898A-A604309BE470} = {818753F2-DBB9-4D3B-898A-A604309BE470}
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1} = {EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239} = {764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raster", "..\..\DesktopEditor\raster\raster_vs2005.vcproj", "{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}"
ProjectSection(ProjectDependencies) = postProject
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1} = {EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cximage", "..\..\DesktopEditor\cximage\CxImage\cximage_vs2005.vcproj", "{BC52A07C-A797-423D-8C4F-8678805BBB36}"
ProjectSection(ProjectDependencies) = postProject
{818753F2-DBB9-4D3B-898A-A604309BE470} = {818753F2-DBB9-4D3B-898A-A604309BE470}
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239} = {764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\DesktopEditor\cximage\tiff\Tiff_vs2005.vcproj", "{0588563C-F05C-428C-B21A-DD74756628B3}"
ProjectSection(ProjectDependencies) = postProject
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdcr", "..\..\DesktopEditor\cximage\raw\libdcr_vs2005.vcproj", "{DF861D33-9BC1-418C-82B1-581F590FE169}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "png", "..\..\DesktopEditor\cximage\png\png_vs2005.vcproj", "{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mng", "..\..\DesktopEditor\cximage\mng\mng_vs2005.vcproj", "{40A69F40-063E-43FD-8543-455495D8733E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpsd", "..\..\DesktopEditor\cximage\libpsd\libpsd_vs2005.vcproj", "{9A037A69-D1DF-4505-AB2A-6CB3641C476E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "..\..\DesktopEditor\cximage\jpeg\Jpeg_vs2005.vcproj", "{818753F2-DBB9-4D3B-898A-A604309BE470}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jasper", "..\..\DesktopEditor\cximage\jasper\jasper_vs2005.vcproj", "{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig", "..\..\DesktopEditor\cximage\jbig\jbig_vs2005.vcproj", "{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig2", "..\..\DesktopEditor\raster\JBig2\win32\jbig2.vcproj", "{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeUtilsLib", "..\..\OfficeUtils\win32\OfficeUtilsLib.vcproj", "{F8274B05-168E-4D6E-B843-AA7510725363}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "font_engine", "..\..\DesktopEditor\fontengine\font_engine_vs2005.vcproj", "{C739151F-5384-41DF-A1A6-F089E2C1AD56}"
ProjectSection(ProjectDependencies) = postProject
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "..\..\DesktopEditor\freetype-2.5.2\builds\windows\vc2005\freetype.vcproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "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
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}") = "agg2d", "..\..\..\core\DesktopEditor\agg-2.4\agg_vs2005.vcproj", "{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPTXFormat", "..\..\ASCOfficePPTXFile\PPTXLib\PPTXFormat.vcproj", "{36636678-AE25-4BE6-9A34-2561D1BCF302}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\..\Common\DocxFormat\Projects\DocxFormat2005.vcproj", "{A100103A-353E-45E8-A9B8-90B87CC5C0B0}"
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
ReleaseOpenSource|Win32 = ReleaseOpenSource|Win32
@ -118,6 +45,14 @@ Global
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.Debug|Win32.Build.0 = Debug|Win32
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.Debug|x64.ActiveCfg = Debug|x64
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.Debug|x64.Build.0 = Debug|x64
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.DLL-Import Debug|x64.Build.0 = Debug|x64
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.DLL-Import Release|Win32.Build.0 = Release|Win32
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.DLL-Import Release|x64.ActiveCfg = Release|x64
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.DLL-Import Release|x64.Build.0 = Release|x64
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.Release|Win32.ActiveCfg = Release|Win32
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.Release|Win32.Build.0 = Release|Win32
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}.Release|x64.ActiveCfg = Release|x64
@ -129,6 +64,14 @@ Global
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}.Debug|Win32.Build.0 = Debug|Win32
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}.Debug|x64.ActiveCfg = Debug|x64
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}.Debug|x64.Build.0 = Debug|x64
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}.DLL-Import Debug|x64.Build.0 = Debug|x64
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}.DLL-Import Release|Win32.Build.0 = Release|Win32
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}.DLL-Import Release|x64.ActiveCfg = Release|x64
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}.DLL-Import Release|x64.Build.0 = Release|x64
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}.Release|Win32.ActiveCfg = Release|Win32
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}.Release|Win32.Build.0 = Release|Win32
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA}.Release|x64.ActiveCfg = Release|x64
@ -140,6 +83,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
@ -147,216 +98,35 @@ Global
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.ReleaseOpenSource|x64.Build.0 = Release|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|Win32.ActiveCfg = Debug|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|Win32.Build.0 = Debug|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|x64.ActiveCfg = Debug|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Debug|x64.Build.0 = Debug|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|Win32.ActiveCfg = Release|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|Win32.Build.0 = Release|Win32
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|x64.ActiveCfg = Release|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.Release|x64.Build.0 = Release|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}.ReleaseOpenSource|x64.Build.0 = Release|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|Win32.ActiveCfg = Debug|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|Win32.Build.0 = Debug|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|x64.ActiveCfg = Debug|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Debug|x64.Build.0 = Debug|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|Win32.ActiveCfg = Release|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|Win32.Build.0 = Release|Win32
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|x64.ActiveCfg = Release|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.Release|x64.Build.0 = Release|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}.ReleaseOpenSource|x64.Build.0 = Release|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|Win32.ActiveCfg = Debug|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|Win32.Build.0 = Debug|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|x64.ActiveCfg = Debug|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Debug|x64.Build.0 = Debug|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|Win32.ActiveCfg = Release|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|Win32.Build.0 = Release|Win32
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|x64.ActiveCfg = Release|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.Release|x64.Build.0 = Release|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{BC52A07C-A797-423D-8C4F-8678805BBB36}.ReleaseOpenSource|x64.Build.0 = Release|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|Win32.ActiveCfg = Debug|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|Win32.Build.0 = Debug|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|x64.ActiveCfg = Debug|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Debug|x64.Build.0 = Debug|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|Win32.ActiveCfg = Release|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|Win32.Build.0 = Release|Win32
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|x64.ActiveCfg = Release|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.Release|x64.Build.0 = Release|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{0588563C-F05C-428C-B21A-DD74756628B3}.ReleaseOpenSource|x64.Build.0 = Release|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|Win32.ActiveCfg = Debug|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|Win32.Build.0 = Debug|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|x64.ActiveCfg = Debug|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Debug|x64.Build.0 = Debug|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|Win32.ActiveCfg = Release|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|Win32.Build.0 = Release|Win32
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|x64.ActiveCfg = Release|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.Release|x64.Build.0 = Release|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{DF861D33-9BC1-418C-82B1-581F590FE169}.ReleaseOpenSource|x64.Build.0 = Release|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|Win32.ActiveCfg = Debug|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|Win32.Build.0 = Debug|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|x64.ActiveCfg = Debug|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Debug|x64.Build.0 = Debug|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|Win32.ActiveCfg = Release|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|Win32.Build.0 = Release|Win32
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|x64.ActiveCfg = Release|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.Release|x64.Build.0 = Release|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7}.ReleaseOpenSource|x64.Build.0 = Release|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|Win32.ActiveCfg = Debug|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|Win32.Build.0 = Debug|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|x64.ActiveCfg = Debug|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Debug|x64.Build.0 = Debug|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Release|Win32.ActiveCfg = Release|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Release|Win32.Build.0 = Release|Win32
{40A69F40-063E-43FD-8543-455495D8733E}.Release|x64.ActiveCfg = Release|x64
{40A69F40-063E-43FD-8543-455495D8733E}.Release|x64.Build.0 = Release|x64
{40A69F40-063E-43FD-8543-455495D8733E}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{40A69F40-063E-43FD-8543-455495D8733E}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{40A69F40-063E-43FD-8543-455495D8733E}.ReleaseOpenSource|x64.Build.0 = Release|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|Win32.ActiveCfg = Debug|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|Win32.Build.0 = Debug|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|x64.ActiveCfg = Debug|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Debug|x64.Build.0 = Debug|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|Win32.ActiveCfg = Release|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|Win32.Build.0 = Release|Win32
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|x64.ActiveCfg = Release|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.Release|x64.Build.0 = Release|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{9A037A69-D1DF-4505-AB2A-6CB3641C476E}.ReleaseOpenSource|x64.Build.0 = Release|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|Win32.ActiveCfg = Debug|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|Win32.Build.0 = Debug|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|x64.ActiveCfg = Debug|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Debug|x64.Build.0 = Debug|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|Win32.ActiveCfg = Release|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|Win32.Build.0 = Release|Win32
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|x64.ActiveCfg = Release|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.Release|x64.Build.0 = Release|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{818753F2-DBB9-4D3B-898A-A604309BE470}.ReleaseOpenSource|x64.Build.0 = Release|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|Win32.ActiveCfg = Debug|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|Win32.Build.0 = Debug|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|x64.ActiveCfg = Debug|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Debug|x64.Build.0 = Debug|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|Win32.ActiveCfg = Release|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|Win32.Build.0 = Release|Win32
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|x64.ActiveCfg = Release|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.Release|x64.Build.0 = Release|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}.ReleaseOpenSource|x64.Build.0 = Release|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|Win32.ActiveCfg = Debug|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|Win32.Build.0 = Debug|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|x64.ActiveCfg = Debug|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Debug|x64.Build.0 = Debug|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|Win32.ActiveCfg = Release|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|Win32.Build.0 = Release|Win32
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|x64.ActiveCfg = Release|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.Release|x64.Build.0 = Release|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}.ReleaseOpenSource|x64.Build.0 = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|Win32.ActiveCfg = Debug|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|Win32.Build.0 = Debug|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|x64.ActiveCfg = Debug|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Debug|x64.Build.0 = Debug|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|Win32.ActiveCfg = Release|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|Win32.Build.0 = Release|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|x64.ActiveCfg = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Release|x64.Build.0 = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.ReleaseOpenSource|x64.Build.0 = Release|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|Win32.ActiveCfg = Debug|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|Win32.Build.0 = Debug|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|x64.ActiveCfg = Debug|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|x64.Build.0 = Debug|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|Win32.ActiveCfg = Release|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|Win32.Build.0 = Release|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|x64.ActiveCfg = Release|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.ReleaseOpenSource|x64.Build.0 = Release|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|Win32.ActiveCfg = Debug|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|Win32.Build.0 = Debug|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|x64.ActiveCfg = Debug|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Debug|x64.Build.0 = Debug|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|Win32.ActiveCfg = Release|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|Win32.Build.0 = Release|Win32
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|x64.ActiveCfg = Release|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.Release|x64.Build.0 = Release|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{C739151F-5384-41DF-A1A6-F089E2C1AD56}.ReleaseOpenSource|x64.Build.0 = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.ActiveCfg = Debug|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.Build.0 = Debug|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.ActiveCfg = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.Build.0 = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.ReleaseOpenSource|Win32.ActiveCfg = Release Singlethreaded|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.ReleaseOpenSource|x64.ActiveCfg = Release Singlethreaded|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.ReleaseOpenSource|x64.Build.0 = Release Singlethreaded|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|Win32
{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|Win32
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C}.ReleaseOpenSource|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}.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
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.ReleaseOpenSource|x64.Build.0 = Release|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.ActiveCfg = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|Win32.Build.0 = Debug|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|x64.ActiveCfg = Debug|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Debug|x64.Build.0 = Debug|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.ActiveCfg = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.Build.0 = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|x64.ActiveCfg = Release|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|x64.Build.0 = Release|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.ReleaseOpenSource|x64.Build.0 = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|Win32.ActiveCfg = Debug|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|Win32.Build.0 = Debug|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|x64.ActiveCfg = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|x64.Build.0 = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|Win32.ActiveCfg = Release|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|Win32.Build.0 = Release|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|x64.ActiveCfg = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|x64.Build.0 = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.ReleaseOpenSource|x64.Build.0 = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|Win32.ActiveCfg = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|Win32.Build.0 = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|x64.ActiveCfg = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|x64.Build.0 = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Debug|x64.Build.0 = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Release|Win32.Build.0 = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Release|x64.ActiveCfg = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.DLL-Import Release|x64.Build.0 = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|Win32.ActiveCfg = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|Win32.Build.0 = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|x64.ActiveCfg = Release|x64
@ -368,6 +138,14 @@ Global
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|Win32.Build.0 = Debug|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|x64.ActiveCfg = Debug|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|x64.Build.0 = Debug|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Debug|Win32.ActiveCfg = Debug|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Debug|Win32.Build.0 = Debug|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Debug|x64.ActiveCfg = Debug|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Debug|x64.Build.0 = Debug|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Release|Win32.ActiveCfg = Release|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Release|Win32.Build.0 = Release|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Release|x64.ActiveCfg = Release|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.DLL-Import Release|x64.Build.0 = Release|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|Win32.ActiveCfg = Release|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|Win32.Build.0 = Release|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|x64.ActiveCfg = Release|x64
@ -376,6 +154,25 @@ Global
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.ReleaseOpenSource|Win32.Build.0 = ReleaseOpenSource|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.ReleaseOpenSource|x64.ActiveCfg = ReleaseOpenSource|x64
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.ReleaseOpenSource|x64.Build.0 = ReleaseOpenSource|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
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.ReleaseOpenSource|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_USE_LIBXML2_READER_;USE_LITE_READER;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)\XlsFileTestD.pdb"
WarningLevel="3"
@ -367,14 +367,6 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\DesktopEditor\xml\src\xmldom.cpp"
>
</File>
<File
RelativePath="..\..\DesktopEditor\xml\src\xmllight.cpp"
>
</File>
</Filter>
<Filter
Name="Common"
@ -432,6 +424,14 @@
>
</File>
</Filter>
<File
RelativePath="..\..\build\lib\win_32\DEBUG\graphics.lib"
>
</File>
<File
RelativePath="..\..\build\lib\win_32\DEBUG\kernel.lib"
>
</File>
</Files>
<Globals>
</Globals>

View File

@ -331,9 +331,9 @@ namespace oox
//case msosptWedgeEllipseCallout : return L"wedgeEllipseCallout";
//case msosptWave : return L"wave";
//case msosptFoldedCorner : return L"foldedCorner";
//case msosptLeftArrow : return L"leftArrow";
case msosptLeftArrow : return L"leftArrow";
//case msosptDownArrow : return L"downArrow";
//case msosptUpArrow : return L"upArrow";
case msosptUpArrow : return L"upArrow";
//case msosptLeftRightArrow : return L"leftRightArrow";
//case msosptUpDownArrow : return L"upDownArrow";
//case msosptIrregularSeal1 : return L"irregularSeal1";

View File

@ -708,7 +708,7 @@ NAMESPACE_END
// ***************** Miscellaneous ********************
// Nearly all Intel's and AMD's have SSE. Enable it independent of SSE ASM and intrinscs
#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64) && !defined(CRYPTOPP_DISABLE_ASM)
#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64) && !defined(CRYPTOPP_DISABLE_ASM) && !defined(_IOS)
#define CRYPTOPP_BOOL_ALIGN16 1
#else
#define CRYPTOPP_BOOL_ALIGN16 0

View File

@ -1,5 +1,5 @@
core_linux {
INCLUDEPATH += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/usr/local/include
LIBS += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/build/libcurl.a
LIBS += -lcurl
}

View File

@ -1,7 +1,7 @@
SET SCRIPTPATH=%~dp0
CD /D %~dp0
SET ICU_MAJOR_VER=60
SET ICU_MAJOR_VER=58
SET ICU_MINOR_VER=2
SET build_platform=win_32

View File

@ -3,7 +3,7 @@
SCRIPT=$(readlink -f "$0" || grealpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
ICU_MAJOR_VER=60
ICU_MAJOR_VER=58
ICU_MINOR_VER=2
SHARED_LIB_VER=$ICU_MAJOR_VER.$ICU_MINOR_VER

View File

@ -1,3 +1,5 @@
ICU_MAJOR_VER = 58
core_windows {
message($$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/icu/include)
INCLUDEPATH += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/icu/include
@ -14,13 +16,13 @@ core_win_32 {
core_linux {
INCLUDEPATH += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/usr/local/include
LIBS += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/build/libicuuc.so.60
LIBS += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/build/libicudata.so.60
LIBS += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/build/libicuuc.so.$$ICU_MAJOR_VER
LIBS += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/build/libicudata.so.$$ICU_MAJOR_VER
}
core_mac {
INCLUDEPATH += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/usr/local/include
LIBS += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/build/libicuuc.60.dylib
LIBS += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/build/libicudata.60.dylib
LIBS += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/build/libicuuc.$${ICU_MAJOR_VER}.dylib
LIBS += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/build/libicudata.$${ICU_MAJOR_VER}.dylib
}

View File

@ -30,8 +30,8 @@ fi
echo "$platform$arch"
if [ ! -f Makefile ]; then
perl ./Configure $platform$arch
./config
#perl ./Configure $platform$arch
./config no-shared no-asm
fi
make

View File

@ -0,0 +1,8 @@
core_linux {
INCLUDEPATH += $$PWD/openssl/include
LIBS += -L$$PWD/openssl/libssl.a
LIBS += -L$$PWD/openssl/libcrypto.a
}

View File

@ -413,6 +413,18 @@ namespace OOX
{
return type().DefaultFileName();
}
void SetDefaults()
{
SetApplication(L"ONLYOFFICE");
#if defined(INTVER)
SetAppVersion(VALUE2STR(INTVER));
#endif
SetDocSecurity(0);
SetScaleCrop(false);
SetLinksUpToDate(false);
SetSharedDoc(false);
SetHyperlinksChanged(false);
}
void SetApplication(const std::wstring& sVal)
{
m_sApplication = sVal;

View File

@ -336,7 +336,15 @@ namespace OOX
{
sName = oReader.GetName();
if ( L"w:comment" == sName )
m_arrComments.push_back( new CComment(oReader) );
{
CComment* pComment = new CComment(oReader);
if ((pComment) && (pComment->m_oId.IsInit()))
{
m_mapComments.insert( std::make_pair( pComment->m_oId->GetValue(), m_arrComments.size()));
}
m_arrComments.push_back( pComment );
}
}
}
}
@ -357,7 +365,8 @@ namespace OOX
return type().DefaultFileName();
}
std::vector<CComment*> m_arrComments;
std::vector<CComment*> m_arrComments;
std::map<int, int> m_mapComments; //id, index
};
class CCommentExt : public WritingElement
@ -401,10 +410,9 @@ namespace OOX
}
public:
// Attributes
nullable<SimpleTypes::CLongHexNumber<> > m_oParaId;
nullable<SimpleTypes::CLongHexNumber<> > m_oParaIdParent;
nullable<SimpleTypes::COnOff<> > m_oDone;
nullable<SimpleTypes::CLongHexNumber<> > m_oParaId;
nullable<SimpleTypes::CLongHexNumber<> > m_oParaIdParent;
nullable<SimpleTypes::COnOff<> > m_oDone;
};
class CCommentsExt : public OOX::File
@ -449,7 +457,14 @@ namespace OOX
{
sName = oReader.GetName();
if ( L"w15:commentEx" == sName )
m_arrComments.push_back( new CCommentExt(oReader) );
{
CCommentExt* pCommentExt = new CCommentExt(oReader);
if ((pCommentExt) && (pCommentExt->m_oParaId.IsInit()))
{
m_mapComments.insert( std::make_pair( pCommentExt->m_oParaId->GetValue(), m_arrComments.size()));
m_arrComments.push_back( pCommentExt );
}
}
}
}
}
@ -470,7 +485,8 @@ namespace OOX
return type().DefaultFileName();
}
std::vector<CCommentExt*> m_arrComments;
std::vector<CCommentExt*> m_arrComments;
std::map<int, int> m_mapComments; //paraId, index
};
class CPresenceInfo : public WritingElement

View File

@ -57,8 +57,6 @@ namespace OOX
virtual ~CCore()
{
}
public:
virtual void read(const CPath& oPath)
{
XmlUtils::CXmlNode oProperties;
@ -230,7 +228,6 @@ namespace OOX
oContent.Registration( type().OverrideType(), oDirectory, oPath.GetFilename() );
}
public:
virtual const FileType type() const
{
return FileTypes::Core;
@ -244,7 +241,11 @@ namespace OOX
{
return type().DefaultFileName();
}
void SetDefaults()
{
m_sCreator = L"";
m_sLastModifiedBy = L"";
}
void SetCreator(std::wstring sVal)
{
m_sCreator = sVal;

View File

@ -60,7 +60,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(XmlUtils::CStringWriter& writer) const
virtual void toXML(NSStringUtils::CStringBuilder& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlNode& node)

View File

@ -73,7 +73,7 @@ namespace OOX
// {
// return _T("");
// }
// virtual void toXML(XmlUtils::CStringWriter& writer) const
// virtual void toXML(NSStringUtils::CStringBuilder& writer) const
// {
// }
// virtual void fromXML(XmlUtils::CXmlNode& node)

View File

@ -116,7 +116,7 @@ namespace OOX
{
return L"";
}
virtual void toXML(XmlUtils::CStringWriter& writer) const
virtual void toXML(NSStringUtils::CStringBuilder& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlNode& node)

View File

@ -297,7 +297,7 @@ namespace XmlUtils
return result;
}
AVSINLINE static std::string EncodeXmlString(const std::string& data, bool bDeleteNoUnicode = false)
AVSINLINE static std::string EncodeXmlString(const std::string& data, bool bDeleteNoUnicode = true)
{
std::string buffer;
buffer.reserve(data.size());
@ -326,6 +326,14 @@ namespace XmlUtils
{
buffer.append(&data[pos-1], 2);
}
else
{
buffer.append(" ");
}
}
else
{
buffer.append(" ");
}
}
else
@ -354,7 +362,7 @@ namespace XmlUtils
return buffer;
}
AVSINLINE static std::wstring EncodeXmlString(const std::wstring& data, bool bDeleteNoUnicode = false)
AVSINLINE static std::wstring EncodeXmlString(const std::wstring& data, bool bDeleteNoUnicode = true)
{
std::wstring buffer;
buffer.reserve(data.size());
@ -383,6 +391,14 @@ namespace XmlUtils
{
buffer.append(&data[pos-1], 2);
}
else
{
buffer.append(L" ");
}
}
else
{
buffer.append(L" ");
}
}
else
@ -411,7 +427,7 @@ namespace XmlUtils
return buffer;
}
AVSINLINE static std::wstring EncodeXmlStringExtend(const std::wstring& data, bool bDeleteNoUnicode = false)
AVSINLINE static std::wstring EncodeXmlStringExtend(const std::wstring& data, bool bDeleteNoUnicode = true)
{
std::wstring buffer;
buffer.reserve(data.size());
@ -430,7 +446,6 @@ namespace XmlUtils
case '\n': buffer.append(L"&#xA;"); break;
case '\r': buffer.append(L"&#xD;"); break;
case '\t': buffer.append(L"&#x9;"); break;
case 160: buffer.append(L"&#160;"); break;
default:
{
if ( false == IsUnicodeSymbol( data[pos] ) )
@ -444,6 +459,14 @@ namespace XmlUtils
{
buffer.append(&data[pos-1], 2);
}
else
{
buffer.append(L" ");
}
}
else
{
buffer.append(L" ");
}
}
else
@ -466,7 +489,6 @@ namespace XmlUtils
case '\n': buffer.append(L"&#xA;"); break;
case '\r': buffer.append(L"&#xD;"); break;
case '\t': buffer.append(L"&#x9;"); break;
case 160: buffer.append(L"&#160;"); break;
case '\0':
return buffer;
default: buffer.append(&data[pos], 1); break;

View File

@ -1,6 +1,10 @@
VERSION = 2.4.535.0
VERSION = $$cat(version.txt)
DEFINES += INTVER=$$VERSION
QMAKE_TARGET_COMPANY = Ascensio System SIA
QMAKE_TARGET_COPYRIGHT = Ascensio System SIA Copyright (c) 2018
# CONFIGURATION
CONFIG(debug, debug|release) {
CONFIG += core_debug

1
Common/version.txt Normal file
View File

@ -0,0 +1 @@
2.4.537.0

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