mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-17 13:25:58 +08:00
Compare commits
4 Commits
core/devel
...
core/devel
| Author | SHA1 | Date | |
|---|---|---|---|
| 47ff766e4e | |||
| 50cbc671b3 | |||
| f2d3390bd4 | |||
| fb5af12d7a |
@ -876,7 +876,7 @@ public:
|
||||
pCStringWriter->WriteString(CellPr);
|
||||
pCStringWriter->WriteString(L"</w:tcPr>");
|
||||
}
|
||||
for(int i = 0, length = TblStylePr.size(); i < length; ++i)
|
||||
for(int i = 0, length = (int)TblStylePr.size(); i < length; ++i)
|
||||
{
|
||||
pCStringWriter->WriteString(TblStylePr[i]);
|
||||
}
|
||||
@ -1241,7 +1241,7 @@ public:
|
||||
}
|
||||
~docLvl()
|
||||
{
|
||||
for(int i = 0,length = Text.size(); i < length; i++)
|
||||
for(int i = 0,length = (int)Text.size(); i < length; i++)
|
||||
{
|
||||
delete Text[i];
|
||||
}
|
||||
@ -1297,7 +1297,7 @@ public:
|
||||
if(bText)
|
||||
{
|
||||
std::wstring sText;
|
||||
for(int i = 0, length = Text.size(); i < length; ++i)
|
||||
for(int i = 0, length = (int)Text.size(); i < length; ++i)
|
||||
{
|
||||
docLvlText* item = Text[i];
|
||||
if(item->bText)
|
||||
@ -1360,7 +1360,7 @@ public:
|
||||
}
|
||||
~docANum()
|
||||
{
|
||||
for(int i = 0, length = Lvls.size(); i < length; i++)
|
||||
for(int i = 0, length = (int)Lvls.size(); i < length; i++)
|
||||
{
|
||||
delete Lvls[i];
|
||||
}
|
||||
@ -1380,7 +1380,7 @@ public:
|
||||
std::wstring sCorrectNumStyleLink = XmlUtils::EncodeXmlString(NumStyleLink);
|
||||
oWriterANum.WriteString(L"<w:numStyleLink w:val=\"" + sCorrectNumStyleLink + L"\"/>");
|
||||
}
|
||||
for(int i = 0, length = Lvls.size(); i < length; ++i)
|
||||
for(int i = 0, length = (int)Lvls.size(); i < length; ++i)
|
||||
{
|
||||
Lvls[i]->Write(oWriterANum, i);
|
||||
}
|
||||
@ -1453,7 +1453,8 @@ public:
|
||||
std::vector<std::wstring> aItems;
|
||||
std::wstring sCurItem;
|
||||
bool bDQuot = false;
|
||||
for(int i = 0, length = fld.length(); i < length; ++i)
|
||||
|
||||
for(int i = 0, length = (int)fld.length(); i < length; ++i)
|
||||
{
|
||||
wchar_t sCurLetter = fld[i];
|
||||
if('\"' == sCurLetter)
|
||||
@ -1476,7 +1477,8 @@ public:
|
||||
}
|
||||
if(sCurItem.length() > 0)
|
||||
aItems.push_back(sCurItem);
|
||||
for(int i = 0, length = aItems.size(); i < length; ++i)
|
||||
|
||||
for(int i = 0, length = (int)aItems.size(); i < length; ++i)
|
||||
{
|
||||
std::wstring item = aItems[i];
|
||||
if(bNextLink)
|
||||
@ -1500,7 +1502,7 @@ public:
|
||||
res = new WriteHyperlink();
|
||||
boost::algorithm::trim(sLink);
|
||||
|
||||
int nAnchorIndex = sLink.find(L"#");
|
||||
int nAnchorIndex = (int)sLink.find(L"#");
|
||||
if(-1 != nAnchorIndex)
|
||||
{
|
||||
res->href = sLink.substr(0, nAnchorIndex);
|
||||
@ -1589,7 +1591,7 @@ public:
|
||||
}
|
||||
~CComment()
|
||||
{
|
||||
for(int i = 0, length = replies.size(); i < length; ++i)
|
||||
for(size_t i = 0; i <replies.size(); ++i)
|
||||
{
|
||||
delete replies[i];
|
||||
}
|
||||
@ -1597,32 +1599,37 @@ public:
|
||||
}
|
||||
int getCount()
|
||||
{
|
||||
return replies.size() + 1;
|
||||
return (int)replies.size() + 1;
|
||||
}
|
||||
void setFormatStart(int IdFormatStart)
|
||||
{
|
||||
bIdFormat = true;
|
||||
IdFormat = IdFormatStart;
|
||||
for(int i = 0, length = replies.size(); i < length; ++i)
|
||||
|
||||
for(size_t i = 0; i < replies.size(); ++i)
|
||||
{
|
||||
CComment* pComment = replies[i];
|
||||
CComment* pComment = replies[i];
|
||||
pComment->bIdFormat = true;
|
||||
pComment->IdFormat = IdFormatStart + i + 1;
|
||||
pComment->IdFormat = (int)(IdFormatStart + i + 1);
|
||||
}
|
||||
}
|
||||
std::wstring writeRef(const std::wstring& sBefore, const std::wstring& sRef, const std::wstring& sAfter)
|
||||
{
|
||||
std::wstring sRes;
|
||||
sRes += (writeRef(this, sBefore, sRef, sAfter));
|
||||
for(int i = 0, length = replies.size(); i < length; ++i)
|
||||
|
||||
for(size_t i = 0; i< replies.size(); ++i)
|
||||
{
|
||||
sRes += (writeRef(replies[i], sBefore, sRef, sAfter));
|
||||
}
|
||||
return sRes;
|
||||
}
|
||||
std::wstring writeTemplates(funcArg fReadFunction)
|
||||
{
|
||||
std::wstring sRes;
|
||||
sRes += (fReadFunction(this));
|
||||
for(int i = 0, length = replies.size(); i < length; ++i)
|
||||
|
||||
for(size_t i = 0; i < replies.size(); ++i)
|
||||
sRes += (fReadFunction(replies[i]));
|
||||
return sRes;
|
||||
}
|
||||
@ -1708,7 +1715,7 @@ public:
|
||||
|
||||
bool bFirst = true;
|
||||
int nPrevIndex = 0;
|
||||
for(int i = 0, length = sText.length(); i < length; i++)
|
||||
for(size_t i = 0; i < sText.length(); i++)
|
||||
{
|
||||
wchar_t cToken = sText[i];
|
||||
if('\n' == cToken)
|
||||
@ -1717,7 +1724,7 @@ public:
|
||||
nPrevIndex = i + 1;
|
||||
}
|
||||
}
|
||||
writeContentWritePart(pComment, sText, nPrevIndex, sText.length(), bFirst, sRes);
|
||||
writeContentWritePart(pComment, sText, nPrevIndex, (int)sText.length(), bFirst, sRes);
|
||||
}
|
||||
sRes += L"</w:comment>";
|
||||
return sRes;
|
||||
@ -1736,7 +1743,7 @@ w15:paraIdParent=\"" + pComment->m_sParaIdParent + L"\" w15:done=\"" + sDone + L
|
||||
else
|
||||
sRes += L"<w15:commentEx w15:paraId=\"" + pComment->m_sParaId + L"\" w15:done=\"" + sDone + L"\"/>";
|
||||
//расставляем paraIdParent
|
||||
for(int i = 0, length = pComment->replies.size(); i < length; i++)
|
||||
for(size_t i = 0; i < pComment->replies.size(); i++)
|
||||
pComment->replies[i]->m_sParaIdParent = pComment->m_sParaId;
|
||||
}
|
||||
return sRes;
|
||||
@ -1782,7 +1789,7 @@ public:
|
||||
{
|
||||
m_mapComments[pComment->IdOpen] = pComment;
|
||||
addAuthor(pComment);
|
||||
for(int i = 0, length = pComment->replies.size(); i < length; i++)
|
||||
for(size_t i = 0; i < pComment->replies.size(); i++)
|
||||
addAuthor(pComment->replies[i]);
|
||||
}
|
||||
}
|
||||
@ -1866,7 +1873,7 @@ public:
|
||||
}
|
||||
~CDrawingPropertyWrap()
|
||||
{
|
||||
for(int i = 0, length = Points.size(); i < length; ++i)
|
||||
for(size_t i = 0; i < Points.size(); ++i)
|
||||
delete Points[i];
|
||||
Points.clear();
|
||||
}
|
||||
@ -2211,7 +2218,7 @@ distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"" + std::to_wstr
|
||||
sXml += L"<wp:start x=\"" + std::to_wstring(emuX) + L"\" y=\"" + std::to_wstring(emuY) + L"\"/>";
|
||||
}
|
||||
|
||||
for(int i = 0, length = DrawingPropertyWrap.Points.size(); i < length; ++i)
|
||||
for(size_t i = 0; i < DrawingPropertyWrap.Points.size(); ++i)
|
||||
{
|
||||
CDrawingPropertyWrapPoint* pWrapPoint = DrawingPropertyWrap.Points[i];
|
||||
if(pWrapPoint->bX && pWrapPoint->bY)
|
||||
|
||||
@ -760,11 +760,11 @@ public:
|
||||
{
|
||||
Tabs oTabs;
|
||||
res = Read2(length, &Binary_pPrReader::ReadTabs, this, &oTabs);
|
||||
int nLen = oTabs.m_aTabs.size();
|
||||
size_t nLen = oTabs.m_aTabs.size();
|
||||
if(nLen > 0)
|
||||
{
|
||||
pCStringWriter->WriteString(std::wstring(_T("<w:tabs>")));
|
||||
for(int i = 0; i < nLen; ++i)
|
||||
for(size_t i = 0; i < nLen; ++i)
|
||||
{
|
||||
Tab& oTab = oTabs.m_aTabs[i];
|
||||
long nTab = SerializeCommon::Round( g_dKoef_mm_to_twips * oTab.Pos);
|
||||
@ -1386,7 +1386,7 @@ public:
|
||||
if( c_oSerProp_secPrType::hdrftrelem == type )
|
||||
{
|
||||
int nHdrFtrIndex = m_oBufferedStream.GetLong();
|
||||
if(nHdrFtrIndex >= 0 && nHdrFtrIndex <= m_oFileWriter.m_oHeaderFooterWriter.m_aHeaders.size())
|
||||
if(nHdrFtrIndex >= 0 && nHdrFtrIndex <= (int)m_oFileWriter.m_oHeaderFooterWriter.m_aHeaders.size())
|
||||
{
|
||||
Writers::HdrFtrItem* pHdrFtrItem = m_oFileWriter.m_oHeaderFooterWriter.m_aHeaders[nHdrFtrIndex];
|
||||
pHdrFtrItem->m_sFilename;
|
||||
@ -1411,7 +1411,7 @@ public:
|
||||
if( c_oSerProp_secPrType::hdrftrelem == type )
|
||||
{
|
||||
int nHdrFtrIndex = m_oBufferedStream.GetLong();
|
||||
if(nHdrFtrIndex >= 0 && nHdrFtrIndex <= oBinary_HdrFtrTableReader.m_oHeaderFooterWriter.m_aFooters.size())
|
||||
if(nHdrFtrIndex >= 0 && nHdrFtrIndex <= (int)oBinary_HdrFtrTableReader.m_oHeaderFooterWriter.m_aFooters.size())
|
||||
{
|
||||
Writers::HdrFtrItem* pHdrFtrItem = oBinary_HdrFtrTableReader.m_oHeaderFooterWriter.m_aFooters[nHdrFtrIndex];
|
||||
pHdrFtrItem->m_sFilename;
|
||||
@ -1979,7 +1979,7 @@ public:
|
||||
if(true == orowPrAfterBefore.bGridAfter && orowPrAfterBefore.nGridAfter > 0 && false == orowPrAfterBefore.oAfterWidth.bW)
|
||||
{
|
||||
//ищем по tblGrid
|
||||
long nGridLength = m_aCurTblGrid.size();
|
||||
long nGridLength = (long)m_aCurTblGrid.size();
|
||||
if(orowPrAfterBefore.nGridAfter < nGridLength)
|
||||
{
|
||||
double nSumW = 0;
|
||||
@ -2396,14 +2396,14 @@ public:
|
||||
int Read()
|
||||
{
|
||||
int res = ReadTable(&Binary_NumberingTableReader::ReadNumberingContent, this);
|
||||
for(int i = 0, length = m_aDocANums.size(); i < length; ++i)
|
||||
for(size_t i = 0; i < m_aDocANums.size(); ++i)
|
||||
{
|
||||
docANum* pdocANum = m_aDocANums[i];
|
||||
pdocANum->Write(oNumberingWriters.m_oANum);
|
||||
delete m_aDocANums[i];
|
||||
}
|
||||
m_aDocANums.clear();
|
||||
for(int i = 0, length = m_aDocNums.size(); i < length; ++i)
|
||||
for(size_t i = 0; i < m_aDocNums.size(); ++i)
|
||||
{
|
||||
m_aDocNums[i]->Write(oNumberingWriters.m_oNumList);
|
||||
delete m_aDocNums[i];
|
||||
@ -3366,7 +3366,7 @@ public:
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
if ( c_oSer_OMathBottomNodesValType::Val == type )
|
||||
{
|
||||
LONG lVal = Mm_To_Dx(m_oBufferedStream.GetDouble());
|
||||
LONG lVal = (LONG)Mm_To_Dx(m_oBufferedStream.GetDouble());
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:interSp m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
@ -3398,7 +3398,7 @@ public:
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
if ( c_oSer_OMathBottomNodesValType::Val == type )
|
||||
{
|
||||
LONG lVal = Mm_To_Dx(m_oBufferedStream.GetDouble());
|
||||
LONG lVal = (LONG)Mm_To_Dx(m_oBufferedStream.GetDouble());
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:intraSp m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
@ -3411,7 +3411,7 @@ public:
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
if ( c_oSer_OMathBottomNodesValType::Val == type )
|
||||
{
|
||||
LONG lVal = Mm_To_Dx(m_oBufferedStream.GetDouble());
|
||||
LONG lVal = (LONG)Mm_To_Dx(m_oBufferedStream.GetDouble());
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:lMargin m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
@ -3462,7 +3462,7 @@ public:
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
if ( c_oSer_OMathBottomNodesValType::Val == type )
|
||||
{
|
||||
LONG lVal = Mm_To_Dx(m_oBufferedStream.GetDouble());
|
||||
LONG lVal = (LONG)Mm_To_Dx(m_oBufferedStream.GetDouble());
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:postSp m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
@ -3475,7 +3475,7 @@ public:
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
if ( c_oSer_OMathBottomNodesValType::Val == type )
|
||||
{
|
||||
LONG lVal = Mm_To_Dx(m_oBufferedStream.GetDouble());
|
||||
LONG lVal = (LONG)Mm_To_Dx(m_oBufferedStream.GetDouble());
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:preSp m:val=\"" + std::to_wstring(lVal)+ L"\"/>");
|
||||
}
|
||||
@ -3488,7 +3488,7 @@ public:
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
if ( c_oSer_OMathBottomNodesValType::Val == type )
|
||||
{
|
||||
LONG lVal = Mm_To_Dx(m_oBufferedStream.GetDouble());
|
||||
LONG lVal = (LONG)Mm_To_Dx(m_oBufferedStream.GetDouble());
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:rMargin m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
@ -3518,7 +3518,7 @@ public:
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
if ( c_oSer_OMathBottomNodesValType::Val == type )
|
||||
{
|
||||
LONG lVal = Mm_To_Dx(m_oBufferedStream.GetDouble());
|
||||
LONG lVal = (LONG)Mm_To_Dx(m_oBufferedStream.GetDouble());
|
||||
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<m:wrapIndent m:val=\"" + std::to_wstring(lVal) + L"\"/>");
|
||||
}
|
||||
@ -6590,7 +6590,7 @@ public:
|
||||
m_oFileWriter.m_pDrawingConverter->SetDstContentRels();
|
||||
|
||||
std::wstring sThemeDir;
|
||||
int nIndex = m_oFileWriter.m_sThemePath.rfind(FILE_SEPARATOR_CHAR);
|
||||
int nIndex = (int)m_oFileWriter.m_sThemePath.rfind(FILE_SEPARATOR_CHAR);
|
||||
if(-1 != nIndex)
|
||||
sThemeDir = m_oFileWriter.m_sThemePath.substr(0, nIndex);
|
||||
|
||||
@ -7129,12 +7129,12 @@ int Binary_HdrFtrTableReader::ReadHdrFtrItem(BYTE type, long length, void* poRes
|
||||
if(nCurType == c_oSerHdrFtrTypes::Header)
|
||||
{
|
||||
m_oHeaderFooterWriter.m_aHeaders.push_back(poHdrFtrItem);
|
||||
poHdrFtrItem->m_sFilename = L"header" + std::to_wstring(m_oHeaderFooterWriter.m_aHeaders.size()) + L".xml";
|
||||
poHdrFtrItem->m_sFilename = L"header" + std::to_wstring((int)m_oHeaderFooterWriter.m_aHeaders.size()) + L".xml";
|
||||
}
|
||||
else
|
||||
{
|
||||
m_oHeaderFooterWriter.m_aFooters.push_back(poHdrFtrItem);
|
||||
poHdrFtrItem->m_sFilename = L"footer" + std::to_wstring(m_oHeaderFooterWriter.m_aFooters.size()) + L".xml";
|
||||
poHdrFtrItem->m_sFilename = L"footer" + std::to_wstring((int)m_oHeaderFooterWriter.m_aFooters.size()) + L".xml";
|
||||
}
|
||||
m_oFileWriter.m_pDrawingConverter->SetDstContentRels();
|
||||
Binary_DocumentTableReader oBinary_DocumentTableReader(m_oBufferedStream, m_oFileWriter, poHdrFtrItem->Header, m_pComments);
|
||||
@ -7371,7 +7371,7 @@ public: BinaryFileReader(std::wstring& sFileInDir, NSBinPptxRW::CBinaryFileReade
|
||||
return res;
|
||||
}
|
||||
|
||||
for(int i = 0, length = aTypes.size(); i < length; ++i)
|
||||
for(size_t i = 0; i < aTypes.size(); ++i)
|
||||
{
|
||||
BYTE mtiType = aTypes[i];
|
||||
long mtiOffBits = aOffBits[i];
|
||||
@ -7437,7 +7437,7 @@ public: BinaryFileReader(std::wstring& sFileInDir, NSBinPptxRW::CBinaryFileReade
|
||||
long rId;
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(std::wstring(_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes")), std::wstring(_T("endnotes.xml")), std::wstring(), &rId);
|
||||
}
|
||||
for(int i = 0, length = m_oFileWriter.m_oHeaderFooterWriter.m_aHeaders.size(); i < length; ++i)
|
||||
for(size_t i = 0; i < m_oFileWriter.m_oHeaderFooterWriter.m_aHeaders.size(); ++i)
|
||||
{
|
||||
Writers::HdrFtrItem* pHeader = m_oFileWriter.m_oHeaderFooterWriter.m_aHeaders[i];
|
||||
if(false == pHeader->IsEmpty())
|
||||
@ -7447,7 +7447,7 @@ public: BinaryFileReader(std::wstring& sFileInDir, NSBinPptxRW::CBinaryFileReade
|
||||
pHeader->rId = L"rId" + std::to_wstring( rId );
|
||||
}
|
||||
}
|
||||
for(int i = 0, length = m_oFileWriter.m_oHeaderFooterWriter.m_aFooters.size(); i < length; ++i)
|
||||
for(size_t i = 0; i < m_oFileWriter.m_oHeaderFooterWriter.m_aFooters.size(); ++i)
|
||||
{
|
||||
Writers::HdrFtrItem* pFooter = m_oFileWriter.m_oHeaderFooterWriter.m_aFooters[i];
|
||||
if(false == pFooter->IsEmpty())
|
||||
|
||||
@ -61,7 +61,7 @@ namespace BinDocxRW
|
||||
void BinaryHeaderFooterTableWriter::WriteHdrFtrContent(std::vector<OOX::CHdrFtr*>& aHdrFtrs, std::vector<SimpleTypes::EHdrFtr>& aHdrFtrTypes, std::vector<OOX::Logic::CSectionProperty*>& aHdrSectPrs, bool bHdr)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
for(int i = 0, length = aHdrFtrs.size(); i < length; ++i)
|
||||
for(size_t i = 0; i < aHdrFtrs.size(); ++i)
|
||||
{
|
||||
OOX::CHdrFtr* pHdrFtr = aHdrFtrs[i];
|
||||
SimpleTypes::EHdrFtr eType = aHdrFtrTypes[i];
|
||||
|
||||
@ -5182,7 +5182,7 @@ namespace BinDocxRW
|
||||
m_eFldState = SimpleTypes::fldchartypeEnd;
|
||||
if(m_aFldChars.size() > 0)
|
||||
{
|
||||
int nIndex = m_aFldChars.size() - 1;
|
||||
int nIndex = (int)m_aFldChars.size() - 1;
|
||||
FldStruct* pFldStruct = m_aFldChars[nIndex];
|
||||
RELEASEOBJECT(pFldStruct);
|
||||
m_aFldChars.erase(m_aFldChars.begin() + nIndex);
|
||||
|
||||
@ -219,7 +219,7 @@ bool BinDocxRW::CDocxSerializer::loadFromFile(const std::wstring& sSrcFileName,
|
||||
//проверяем формат
|
||||
bool bValidFormat = false;
|
||||
std::wstring sSignature(g_sFormatSignature);
|
||||
int nSigLength = sSignature.length();
|
||||
int nSigLength = (int)sSignature.length();
|
||||
if(nBase64DataSize > nSigLength)
|
||||
{
|
||||
std::string sCurSig((char*)pBase64Data, nSigLength);
|
||||
|
||||
@ -34,18 +34,15 @@
|
||||
#include <boost/optional/optional_io.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
namespace cpdoccore
|
||||
/// внешнее объявление для Optional, используем boost::optional
|
||||
|
||||
template <class T>
|
||||
struct optional
|
||||
{
|
||||
/// внешнее объявление для Optional, используем boost::optional
|
||||
|
||||
template <class T>
|
||||
struct optional
|
||||
{
|
||||
typedef T Base;
|
||||
typedef boost::optional<T> Type;
|
||||
};
|
||||
typedef T Base;
|
||||
typedef boost::optional<T> Type;
|
||||
};
|
||||
|
||||
|
||||
#define _CP_OPT(V) optional<V>::Type
|
||||
#define _CP_OPT(V) optional<V>::Type
|
||||
|
||||
}
|
||||
|
||||
@ -569,7 +569,8 @@ mc:Ignorable=\"w14 wp14\">";
|
||||
|
||||
strm << L"<w:abstractNum w:abstractNumId=\"" << abstractNumId << "\">";
|
||||
numIds.push_back(abstractNumId);
|
||||
for (int i = 0; i < (std::min)( content.size(), (size_t)9); i++)
|
||||
|
||||
for (size_t i = 0; i < (std::min)( content.size(), (size_t)9); i++)
|
||||
{
|
||||
start_text_list_style(inst->get_text_list_style()->get_style_name());
|
||||
content[i]->docx_convert(*this);
|
||||
@ -1296,7 +1297,7 @@ void docx_conversion_context::start_text_changes (std::wstring id)
|
||||
|
||||
if (state.type == 2)
|
||||
{
|
||||
for (int i = 0 ; i < state.content.size(); i++)
|
||||
for (size_t i = 0 ; i < state.content.size(); i++)
|
||||
{
|
||||
output_stream() << L"<w:del" << format_change << L" w:id=\"" << boost::lexical_cast<std::wstring>(current_id_changes++) << L"\">";
|
||||
|
||||
|
||||
@ -139,7 +139,7 @@ void oox_chart_series::setValues(int ind, std::vector<std::wstring> & values)
|
||||
if (ind == 0) values_[ind].strRef_.present = true;
|
||||
else values_[ind].numRef_.present = true;
|
||||
|
||||
for (int i = 0; i < values.size(); i++)
|
||||
for (size_t i = 0; i < values.size(); i++)
|
||||
{
|
||||
boost::algorithm::trim(values[i]);
|
||||
if (ind == 0)
|
||||
@ -240,7 +240,7 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
|
||||
{
|
||||
CP_XML_ATTR(L"val", values_[i].numRef_.num_cache_count);
|
||||
}
|
||||
for (int j = 0; j < values_[i].numRef_.num_cache.size(); j++)
|
||||
for (size_t j = 0; j < values_[i].numRef_.num_cache.size(); j++)
|
||||
{
|
||||
std::wstring & v = values_[i].numRef_.num_cache[j];
|
||||
|
||||
@ -275,7 +275,7 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
|
||||
CP_XML_ATTR(L"val", values_[i].numRef_.num_cache_count);
|
||||
}
|
||||
|
||||
for (int j = 0; j < values_[i].numRef_.num_cache.size(); j++)
|
||||
for (size_t j = 0; j < values_[i].numRef_.num_cache.size(); j++)
|
||||
{
|
||||
std::wstring & v = values_[i].numRef_.num_cache[j];
|
||||
|
||||
@ -312,7 +312,7 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
|
||||
{
|
||||
CP_XML_ATTR(L"val", values_[i].strRef_.str_cache_count);
|
||||
}
|
||||
for (int j = 0; j < values_[i].strRef_.str_cache.size(); j++)
|
||||
for (size_t j = 0; j < values_[i].strRef_.str_cache.size(); j++)
|
||||
{
|
||||
std::wstring & v = values_[i].strRef_.str_cache[j];
|
||||
|
||||
@ -336,7 +336,7 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
|
||||
{
|
||||
CP_XML_ATTR(L"val", values_[i].strRef_.str_cache_count);
|
||||
}
|
||||
for (int j = 0; j < values_[i].strRef_.str_cache.size(); j++)
|
||||
for (size_t j = 0; j < values_[i].strRef_.str_cache.size(); j++)
|
||||
{
|
||||
std::wstring & v = values_[i].strRef_.str_cache[j];
|
||||
CP_XML_NODE(L"c:pt")
|
||||
@ -405,7 +405,7 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
|
||||
}
|
||||
|
||||
bool bEmpty_dPt = true;
|
||||
for (int i = 0 ; i < content_.points_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.points_.size(); i++)
|
||||
{
|
||||
if (content_.points_[i].bEnabled)
|
||||
{
|
||||
@ -415,9 +415,9 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
|
||||
}
|
||||
|
||||
int indPoint = 0;
|
||||
for (int i = 0 ; !bEmpty_dPt && i < content_.points_.size(); i++)
|
||||
for (size_t i = 0 ; !bEmpty_dPt && i < content_.points_.size(); i++)
|
||||
{
|
||||
for (int j = 0 ; j < content_.points_[i].repeated_; j++)
|
||||
for (size_t j = 0 ; j < content_.points_[i].repeated_; j++)
|
||||
{
|
||||
CP_XML_NODE(L"c:dPt")
|
||||
{
|
||||
|
||||
@ -35,9 +35,49 @@
|
||||
#include "oox_drawing.h"
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
|
||||
#include "../odf/svg_parser.h"
|
||||
#include "../odf/datatypes/custom_shape_types_convert.h"
|
||||
|
||||
using namespace cpdoccore;
|
||||
|
||||
namespace svg_path
|
||||
{
|
||||
void oox_serialize(std::wostream & strm, std::vector<_polyline> & path)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
for (size_t i = 0; i < path.size(); i++)
|
||||
{
|
||||
oox_serialize(strm, path[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
void oox_serialize(std::wostream & strm, _polyline & val)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(val.command)
|
||||
{
|
||||
for (size_t i = 0; i < val.points.size(); i++)
|
||||
{
|
||||
oox_serialize(CP_XML_STREAM(), val.points[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
void oox_serialize(std::wostream & strm, _point & val)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(L"a:pt")
|
||||
{
|
||||
if (val.x)CP_XML_ATTR(L"x", (int)(val.x.get()));
|
||||
if (val.y)CP_XML_ATTR(L"y", (int)(val.y.get()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
static const std::wstring _ooxShapeType[]=
|
||||
@ -53,41 +93,6 @@ static const std::wstring _ooxShapeType[]=
|
||||
L"polygon",
|
||||
};
|
||||
|
||||
void svg_path::oox_serialize(std::wostream & strm, std::vector<svg_path::_polyline> & path)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
BOOST_FOREACH(svg_path::_polyline & p, path)
|
||||
{
|
||||
oox_serialize(strm, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
void svg_path::oox_serialize(std::wostream & strm, svg_path::_polyline const & val)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(val.command)
|
||||
{
|
||||
BOOST_FOREACH(svg_path::_point const & p, val.points)
|
||||
{
|
||||
oox_serialize(CP_XML_STREAM(), p);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void svg_path::oox_serialize(std::wostream & strm, svg_path::_point const & val)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(L"a:pt")
|
||||
{
|
||||
if (val.x)CP_XML_ATTR(L"x", (int)(val.x.get()));
|
||||
if (val.y)CP_XML_ATTR(L"y", (int)(val.y.get()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace oox {
|
||||
|
||||
|
||||
@ -40,6 +40,8 @@
|
||||
#include "mediaitems.h"
|
||||
#include "oox_drawing_fills.h"
|
||||
|
||||
#include "../odf/svg_parser.h"
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
@ -83,13 +85,19 @@ namespace oox {
|
||||
void serialize_shape (std::wostream & strm);
|
||||
void serialize_xfrm (std::wostream & strm, const std::wstring & namespace_ = L"a", bool always_position = false);
|
||||
void serialize_bodyPr (std::wostream & strm, const std::wstring & namespace_ = L"a");
|
||||
};
|
||||
|
||||
};
|
||||
typedef _CP_PTR(_oox_drawing) oox_drawing_ptr;
|
||||
|
||||
void oox_serialize_ln (std::wostream & strm, const std::vector<odf_reader::_property> & val, bool always_draw = false);
|
||||
void oox_serialize_aLst (std::wostream & strm, const std::vector<odf_reader::_property> & val);
|
||||
void oox_serialize_hlink (std::wostream & strm, const std::vector<_hlink_desc> & val);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
namespace svg_path
|
||||
{
|
||||
void oox_serialize (std::wostream & strm, _point & val);
|
||||
void oox_serialize (std::wostream & strm, _polyline & val);
|
||||
void oox_serialize (std::wostream & strm, std::vector<_polyline> & path);
|
||||
}
|
||||
@ -99,7 +99,7 @@ void pptx_conversion_context::process_layouts()
|
||||
get_text_context().set_process_layouts(true);
|
||||
|
||||
//актуальные
|
||||
for (int layout_index =0; layout_index < layouts.content.size(); layout_index++)
|
||||
for (size_t layout_index =0; layout_index < layouts.content.size(); layout_index++)
|
||||
{
|
||||
start_layout(layout_index);
|
||||
|
||||
@ -116,7 +116,7 @@ void pptx_conversion_context::process_layouts()
|
||||
|
||||
if (master)
|
||||
{
|
||||
for (int i = 0; i < master->content_.size(); i++)
|
||||
for (size_t i = 0; i < master->content_.size(); i++)
|
||||
{
|
||||
odf_reader::office_element_ptr elm = master->content_[i];
|
||||
if (elm->get_type() == odf_reader::typeDrawFrame)
|
||||
@ -152,7 +152,7 @@ void pptx_conversion_context::process_master_pages()
|
||||
get_text_context().set_process_layouts(true);
|
||||
|
||||
//берем только актуальные
|
||||
for (int master_index =0; master_index < masters.content.size();master_index++)
|
||||
for (size_t master_index =0; master_index < masters.content.size();master_index++)
|
||||
{
|
||||
start_master(master_index);
|
||||
|
||||
@ -210,7 +210,7 @@ void pptx_conversion_context::end_document()
|
||||
{
|
||||
unsigned int count = 1;
|
||||
|
||||
for (int i = 0; i < slideMasters_.size(); i++)
|
||||
for (size_t i = 0; i < slideMasters_.size(); i++)
|
||||
{
|
||||
pptx_xml_slideMaster_ptr& slideM = slideMasters_[i];
|
||||
|
||||
@ -233,7 +233,7 @@ void pptx_conversion_context::end_document()
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
count=0;
|
||||
for (int i = 0; i < slides_.size(); i++)
|
||||
for (size_t i = 0; i < slides_.size(); i++)
|
||||
{
|
||||
pptx_xml_slide_ptr& slide = slides_[i];
|
||||
|
||||
@ -255,7 +255,7 @@ void pptx_conversion_context::end_document()
|
||||
count++;
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
for (int i = 0; i < slideLayouts_.size(); i++)
|
||||
for (size_t i = 0; i < slideLayouts_.size(); i++)
|
||||
{
|
||||
pptx_xml_slideLayout_ptr& slideL = slideLayouts_[i];
|
||||
|
||||
@ -287,7 +287,7 @@ void pptx_conversion_context::end_document()
|
||||
//добавляем диаграммы
|
||||
|
||||
count = 0;
|
||||
for (int i = 0; i < charts_.size(); i++)
|
||||
for (size_t i = 0; i < charts_.size(); i++)
|
||||
{
|
||||
count++;
|
||||
package::chart_content_ptr content = package::chart_content::create();
|
||||
@ -300,7 +300,7 @@ void pptx_conversion_context::end_document()
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//добавляем темы
|
||||
for (int i=0; i < themes_.size();i++)
|
||||
for (size_t i=0; i < themes_.size(); i++)
|
||||
{
|
||||
output_document_->get_ppt_files().add_theme(themes_[i]);
|
||||
|
||||
@ -500,7 +500,7 @@ bool pptx_conversion_context::start_master(int master_index)
|
||||
process_theme(masters.content[master_index].master_name);//add default theme - одинаковые но под разными именами
|
||||
current_master().add_theme(current_theme().id(), L"tId1");
|
||||
|
||||
for (long i=0;i<masters.content[master_index].layouts.size();i++)
|
||||
for (size_t i = 0; i < masters.content[master_index].layouts.size(); i++)
|
||||
{
|
||||
current_master().add_layout(masters.content[master_index].layouts[i].Id, masters.content[master_index].layouts[i].rId, 0x80000000 + last_uniq_big_id++);
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ void xlsx_drawing_context::end_group()
|
||||
group_rect.cy -= group_rect.y;
|
||||
group_rect.cx -= group_rect.x;
|
||||
|
||||
for (int i = 0; i < impl_->groups_.back()->child_objects_.size(); i++)
|
||||
for (size_t i = 0; i < impl_->groups_.back()->child_objects_.size(); i++)
|
||||
{
|
||||
_rect & r = impl_->groups_.back()->child_objects_[i].svg_rect_.get();
|
||||
|
||||
@ -615,7 +615,7 @@ void xlsx_drawing_context::process_objects(xlsx_table_metrics & table_metrics)
|
||||
}
|
||||
void xlsx_drawing_context::process_objects(std::vector<drawing_object_description> objects, xlsx_table_metrics & table_metrics, xlsx_drawings_ptr xlsx_drawings_)
|
||||
{
|
||||
for (int i = 0 ; i < objects.size(); i++)
|
||||
for (size_t i = 0 ; i < objects.size(); i++)
|
||||
{
|
||||
drawing_object_description & obj = objects[i];
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ void xlsx_data_range::serialize_sort (std::wostream & _Wostream)
|
||||
if (!byRow)
|
||||
CP_XML_ATTR(L"columnSort", true);
|
||||
|
||||
for (int i = 0 ; i < bySort.size(); i++)
|
||||
for (size_t i = 0 ; i < bySort.size(); i++)
|
||||
{
|
||||
bool in_range = true;
|
||||
std::wstring ref1, ref2;
|
||||
|
||||
@ -134,7 +134,7 @@ void xlsx_conversion_context::end_document()
|
||||
{
|
||||
std::wstringstream workbook_content;
|
||||
|
||||
for (int i = 0; i < sheets_.size(); i++)
|
||||
for (size_t i = 0; i < sheets_.size(); i++)
|
||||
{
|
||||
xlsx_xml_worksheet_ptr& sheet = sheets_[i];
|
||||
|
||||
@ -191,7 +191,7 @@ void xlsx_conversion_context::end_document()
|
||||
}
|
||||
//добавляем диаграммы
|
||||
|
||||
for (int i = 0; i < charts_.size(); i++)
|
||||
for (size_t i = 0; i < charts_.size(); i++)
|
||||
{
|
||||
package::chart_content_ptr content = package::chart_content::create();
|
||||
|
||||
@ -271,7 +271,7 @@ void xlsx_conversion_context::serialize_bookViews(std::wostream & strm)
|
||||
{
|
||||
if (sActiveTable)
|
||||
{
|
||||
for (int i = 0; i < sheets_.size(); i++)
|
||||
for (size_t i = 0; i < sheets_.size(); i++)
|
||||
{
|
||||
if (sheets_[i]->name() == *sActiveTable)
|
||||
{
|
||||
|
||||
@ -44,7 +44,7 @@ const wchar_t * abstract_xml::name = L"abstract-xml";
|
||||
|
||||
std::wostream & abstract_xml::text_to_stream(std::wostream & _Wostream) const
|
||||
{
|
||||
for (int i = 0; i < xml_content_.size(); i++)
|
||||
for (size_t i = 0; i < xml_content_.size(); i++)
|
||||
{
|
||||
xml_content_[i]->text_to_stream(_Wostream);
|
||||
}
|
||||
@ -53,7 +53,7 @@ std::wostream & abstract_xml::text_to_stream(std::wostream & _Wostream) const
|
||||
|
||||
std::wostream & abstract_xml::xml_to_stream(std::wostream & _Wostream) const
|
||||
{
|
||||
for (int i = 0; i < xml_content_.size(); i++)
|
||||
for (size_t i = 0; i < xml_content_.size(); i++)
|
||||
{
|
||||
xml_content_[i]->xml_to_stream(_Wostream);
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ void calcext_conditional_formats::add_child_element( xml::sax * Reader, const st
|
||||
}
|
||||
void calcext_conditional_formats::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->xlsx_convert(Context);
|
||||
}
|
||||
@ -116,7 +116,7 @@ void calcext_conditional_format::xlsx_convert(oox::xlsx_conversion_context & Con
|
||||
|
||||
Context.start_conditional_format(*calcext_target_range_address_);
|
||||
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->xlsx_convert(Context);
|
||||
}
|
||||
@ -149,7 +149,7 @@ void calcext_data_bar::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
|
||||
Context.set_conditional_format_dataBar(calcext_data_bar_attr_.calcext_min_length_, calcext_data_bar_attr_.calcext_max_length_);
|
||||
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->xlsx_convert(Context);
|
||||
}
|
||||
@ -170,7 +170,7 @@ void calcext_color_scale::add_child_element( xml::sax * Reader, const std::wstri
|
||||
void calcext_color_scale::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
Context.start_conditional_format_rule(3);
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->xlsx_convert(Context);
|
||||
}
|
||||
@ -196,7 +196,7 @@ void calcext_icon_set::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
if (calcext_show_value_)
|
||||
Context.set_conditional_format_showval(*calcext_show_value_);
|
||||
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->xlsx_convert(Context);
|
||||
}
|
||||
|
||||
@ -666,7 +666,7 @@ void xlsx_convert_transforms(std::wstring transformStr, oox::xlsx_conversion_con
|
||||
|
||||
boost::algorithm::split(transforms,transformStr, boost::algorithm::is_any_of(L")"), boost::algorithm::token_compress_on);
|
||||
|
||||
for (int i = 0; i < transforms.size(); i++)
|
||||
for (size_t i = 0; i < transforms.size(); i++)
|
||||
{
|
||||
std::vector<std::wstring> transform;
|
||||
boost::algorithm::split(transform, transforms[i], boost::algorithm::is_any_of(L"("), boost::algorithm::token_compress_on);
|
||||
|
||||
@ -592,7 +592,7 @@ int ComputeMarginY(const style_page_layout_properties_attlist & pageProperties,
|
||||
_CP_OPT(vertical_pos) styleVerticallPos = graphicProperties.common_vertical_pos_attlist_.style_vertical_pos_;
|
||||
|
||||
_CP_OPT(double) dVal;
|
||||
if (GetProperty(additional, L"svg:translate_y", dVal));
|
||||
GetProperty(additional, L"svg:translate_y", dVal);
|
||||
|
||||
const _CP_OPT(length) translation = length(dVal ? *dVal : 0, length::pt);
|
||||
const _CP_OPT(length) pageHeight = pageProperties.fo_page_height_;
|
||||
@ -1111,7 +1111,7 @@ void draw_image::docx_convert(oox::docx_conversion_context & Context)
|
||||
Context.set_run_state (false);
|
||||
Context.set_paragraph_state (false);
|
||||
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->docx_convert(Context);
|
||||
}
|
||||
@ -1393,7 +1393,7 @@ void draw_frame::docx_convert(oox::docx_conversion_context & Context)
|
||||
|
||||
common_draw_docx_convert(Context, common_draw_attlists_, drawing);
|
||||
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->docx_convert(Context);
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ void draw_frame::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
////////////////////////////////////////////////
|
||||
oox_drawing_ = oox_drawing_ptr(new oox::_pptx_drawing());
|
||||
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->pptx_convert(Context);
|
||||
}
|
||||
@ -217,7 +217,7 @@ void draw_image::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
////////////////////////////////////в принципе достаточно общая часть ...
|
||||
Context.get_text_context().start_object();
|
||||
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->pptx_convert(Context);
|
||||
}
|
||||
@ -233,7 +233,7 @@ void draw_chart::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
const std::wstring href = common_xlink_attlist_.href_.get_value_or(L"");
|
||||
Context.get_slide_context().set_chart(href);
|
||||
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->pptx_convert(Context);
|
||||
}
|
||||
@ -244,7 +244,7 @@ void draw_text_box::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
Context.get_slide_context().set_text_box(); //rect с наваротами
|
||||
Context.get_text_context().start_object();
|
||||
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->pptx_convert(Context);
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ void draw_g::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
}
|
||||
////////////////////////////////////////////////
|
||||
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
office_element_ptr const & elm = content_[i];
|
||||
elm->xlsx_convert(Context);
|
||||
@ -196,7 +196,7 @@ void draw_frame::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
oox_drawing_ = oox_drawing_ptr(new oox::_xlsx_drawing());
|
||||
|
||||
////////////////////////////////////////////////
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
office_element_ptr const & elm = content_[i];
|
||||
elm->xlsx_convert(Context);
|
||||
@ -215,7 +215,7 @@ void draw_image::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
////////////////////////////////////в принципе достаточно общая часть ...
|
||||
Context.get_text_context().start_drawing_content();//... если в объекте есть текст он привяжется к объекту - иначе к ячейке
|
||||
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->xlsx_convert(Context);
|
||||
}
|
||||
@ -232,7 +232,7 @@ void draw_chart::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
const std::wstring href = common_xlink_attlist_.href_.get_value_or(L"");
|
||||
Context.get_drawing_context().set_chart(href);
|
||||
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->xlsx_convert(Context);
|
||||
}
|
||||
@ -243,7 +243,7 @@ void draw_text_box::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
|
||||
Context.get_text_context().start_drawing_content();
|
||||
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->xlsx_convert(Context);
|
||||
}
|
||||
|
||||
@ -47,11 +47,12 @@
|
||||
#include "serialize_elements.h"
|
||||
#include "style_graphic_properties.h"
|
||||
|
||||
#include "odfcontext.h"
|
||||
|
||||
#include "datatypes/length.h"
|
||||
#include "datatypes/borderstyle.h"
|
||||
|
||||
#include "odfcontext.h"
|
||||
#include "../odf/svg_parser.h"
|
||||
#include "../docx/oox_drawing.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -235,14 +236,16 @@ void draw_path::reset_svg_path()
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<svg_path::_polyline> o_Polyline_pt;
|
||||
std::vector<svg_path::_polyline> o_Polyline_cm;
|
||||
std::vector<::svg_path::_polyline> o_Polyline_pt;
|
||||
std::vector<::svg_path::_polyline> o_Polyline_cm;
|
||||
|
||||
bool res = svg_path::parseSvgD(o_Polyline_cm,draw_path_attlist_.svg_d_.get(),false);
|
||||
bool res = ::svg_path::parseSvgD(o_Polyline_cm, draw_path_attlist_.svg_d_.get(), false);
|
||||
|
||||
BOOST_FOREACH(svg_path::_polyline & poly, o_Polyline_cm)
|
||||
for (size_t i = 0; i < o_Polyline_cm.size(); i++)
|
||||
{
|
||||
for (long i=0;i<poly.points.size();i++)
|
||||
::svg_path::_polyline & poly = o_Polyline_cm[i];
|
||||
|
||||
for (size_t i = 0; i < poly.points.size(); i++)
|
||||
{
|
||||
if (poly.points[i].x)
|
||||
{
|
||||
@ -259,7 +262,7 @@ void draw_path::reset_svg_path()
|
||||
{
|
||||
//сформируем xml-oox сдесь ... а то придется плодить массивы в drawing .. хоть и не красиво..
|
||||
std::wstringstream output_;
|
||||
svg_path::oox_serialize(output_, o_Polyline_pt);
|
||||
::svg_path::oox_serialize(output_, o_Polyline_pt);
|
||||
additional_.push_back(odf_reader::_property(L"custom_path",output_.str()));
|
||||
}
|
||||
}
|
||||
@ -295,14 +298,16 @@ void draw_polygon::reset_polygon_path()
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<svg_path::_polyline> o_Polyline_pt;
|
||||
std::vector<svg_path::_polyline> o_Polyline_cm;
|
||||
std::vector<::svg_path::_polyline> o_Polyline_pt;
|
||||
std::vector<::svg_path::_polyline> o_Polyline_cm;
|
||||
|
||||
bool res = svg_path::parsePolygon(o_Polyline_cm,draw_polygon_attlist_.draw_points_.get(),false, true);
|
||||
bool res = ::svg_path::parsePolygon(o_Polyline_cm, draw_polygon_attlist_.draw_points_.get(),false, true);
|
||||
|
||||
BOOST_FOREACH(svg_path::_polyline & poly, o_Polyline_cm)
|
||||
for (size_t ind = 0 ; ind < o_Polyline_cm.size(); ind++)
|
||||
{
|
||||
for (long i=0;i<poly.points.size();i++)
|
||||
::svg_path::_polyline & poly = o_Polyline_cm[ind];
|
||||
|
||||
for (size_t i = 0; i < poly.points.size(); i++)
|
||||
{
|
||||
if (poly.points[i].x)
|
||||
{
|
||||
@ -319,7 +324,7 @@ void draw_polygon::reset_polygon_path()
|
||||
{
|
||||
//сформируем xml-oox сдесь ... а то придется плодить массивы в drawing .. хоть и не красиво..
|
||||
std::wstringstream output_;
|
||||
svg_path::oox_serialize(output_, o_Polyline_pt);
|
||||
::svg_path::oox_serialize(output_, o_Polyline_pt);
|
||||
additional_.push_back(odf_reader::_property(L"custom_path",output_.str()));
|
||||
}
|
||||
}
|
||||
@ -351,28 +356,30 @@ void draw_polyline::reset_polyline_path()
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<svg_path::_polyline> o_Polyline_pt;
|
||||
std::vector<svg_path::_polyline> o_Polyline_cm;
|
||||
std::vector<::svg_path::_polyline> o_Polyline_pt;
|
||||
std::vector<::svg_path::_polyline> o_Polyline_cm;
|
||||
|
||||
bool res = svg_path::parsePolygon(o_Polyline_cm, draw_polyline_attlist_.draw_points_.get(), false, true);
|
||||
bool res = ::svg_path::parsePolygon(o_Polyline_cm, draw_polyline_attlist_.draw_points_.get(), false, true);
|
||||
|
||||
_CP_OPT(double) start_x, start_y;
|
||||
|
||||
BOOST_FOREACH(svg_path::_polyline & poly, o_Polyline_cm)
|
||||
for (size_t ind = 0 ; ind < o_Polyline_cm.size(); ind++)
|
||||
{
|
||||
for (long i=0;i<poly.points.size();i++)
|
||||
::svg_path::_polyline & poly = o_Polyline_cm[ind];
|
||||
|
||||
for (size_t i = 0; i < poly.points.size(); i++)
|
||||
{
|
||||
if (poly.points[i].x)
|
||||
{
|
||||
if (!start_x)//вообщето это не верно .. но из за разных точек осей поворота фигура может "улететь"
|
||||
start_x = length(poly.points[i].x.get()/1000.,length::cm).get_value_unit(length::emu);
|
||||
poly.points[i].x = length(poly.points[i].x.get()/1000.,length::cm).get_value_unit(length::emu);// - *start_x;
|
||||
start_x = length(poly.points[i].x.get()/1000., length::cm).get_value_unit(length::emu);
|
||||
poly.points[i].x = length(poly.points[i].x.get()/1000., length::cm).get_value_unit(length::emu);// - *start_x;
|
||||
}
|
||||
if (poly.points[i].y)
|
||||
{
|
||||
if (!start_y)
|
||||
start_y = length(poly.points[i].y.get()/1000.,length::cm).get_value_unit(length::emu);
|
||||
poly.points[i].y = length(poly.points[i].y.get()/1000.,length::cm).get_value_unit(length::emu);// - *start_y;
|
||||
start_y = length(poly.points[i].y.get()/1000., length::cm).get_value_unit(length::emu);
|
||||
poly.points[i].y = length(poly.points[i].y.get()/1000., length::cm).get_value_unit(length::emu);// - *start_y;
|
||||
}
|
||||
}
|
||||
o_Polyline_pt.push_back(poly);
|
||||
@ -381,8 +388,9 @@ void draw_polyline::reset_polyline_path()
|
||||
{
|
||||
//сформируем xml-oox сдесь ... а то придется плодить массивы в drawing .. хоть и не красиво..
|
||||
std::wstringstream output_;
|
||||
svg_path::oox_serialize(output_, o_Polyline_pt);
|
||||
additional_.push_back(odf_reader::_property(L"custom_path",output_.str()));
|
||||
|
||||
::svg_path::oox_serialize(output_, o_Polyline_pt);
|
||||
additional_.push_back(odf_reader::_property(L"custom_path", output_.str()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -592,9 +600,9 @@ void draw_caption::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
/// draw-connector-attlist
|
||||
void draw_connector_attlist::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
{
|
||||
CP_APPLY_ATTR(L"svg:d", svg_d_);
|
||||
CP_APPLY_ATTR(L"svg:viewBox", svg_viewbox_);
|
||||
CP_APPLY_ATTR(L"draw:type",draw_type_);
|
||||
CP_APPLY_ATTR(L"svg:d", svg_d_);
|
||||
CP_APPLY_ATTR(L"svg:viewBox", svg_viewbox_);
|
||||
CP_APPLY_ATTR(L"draw:type", draw_type_);
|
||||
|
||||
}
|
||||
// draw:connector
|
||||
@ -618,35 +626,37 @@ void draw_connector::reset_svg_path()
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<svg_path::_polyline> o_Polyline_pt;
|
||||
std::vector<svg_path::_polyline> o_Polyline_cm;
|
||||
std::vector<::svg_path::_polyline> o_Polyline_pt;
|
||||
std::vector<::svg_path::_polyline> o_Polyline_cm;
|
||||
|
||||
bool res = svg_path::parseSvgD(o_Polyline_cm,draw_connector_attlist_.svg_d_.get(),false);
|
||||
bool res = ::svg_path::parseSvgD(o_Polyline_cm, draw_connector_attlist_.svg_d_.get(), false);
|
||||
|
||||
double x1=common_draw_attlists_.position_.svg_x_.get_value_or(length(0)).get_value_unit(length::emu);
|
||||
double y1=common_draw_attlists_.position_.svg_y_.get_value_or(length(0)).get_value_unit(length::emu);
|
||||
|
||||
BOOST_FOREACH(svg_path::_polyline & poly, o_Polyline_cm)
|
||||
for (size_t ind = 0 ; ind < o_Polyline_cm.size(); ind++)
|
||||
{
|
||||
for (long i=0;i<poly.points.size();i++)
|
||||
::svg_path::_polyline & poly = o_Polyline_cm[ind];
|
||||
|
||||
for (size_t i = 0; i < poly.points.size();i++)
|
||||
{
|
||||
if (poly.points[i].x)
|
||||
{
|
||||
poly.points[i].x = length(poly.points[i].x.get()/1000.,length::cm).get_value_unit(length::emu) - x1;
|
||||
poly.points[i].x = length(poly.points[i].x.get()/1000., length::cm).get_value_unit(length::emu) - x1;
|
||||
}
|
||||
if (poly.points[i].y)
|
||||
{
|
||||
poly.points[i].y = length(poly.points[i].y.get()/1000.,length::cm).get_value_unit(length::emu) - y1;
|
||||
poly.points[i].y = length(poly.points[i].y.get()/1000., length::cm).get_value_unit(length::emu) - y1;
|
||||
}
|
||||
}
|
||||
o_Polyline_pt.push_back(poly);
|
||||
}
|
||||
if (o_Polyline_pt.size()>0)
|
||||
if (o_Polyline_pt.size() > 0)
|
||||
{
|
||||
sub_type_ = 6;
|
||||
//сформируем xml-oox сдесь ... а то придется плодить массивы в drawing .. хоть и не красиво..
|
||||
std::wstringstream output_;
|
||||
svg_path::oox_serialize(output_, o_Polyline_pt);
|
||||
::svg_path::oox_serialize(output_, o_Polyline_pt);
|
||||
additional_.push_back(odf_reader::_property(L"custom_path",output_.str()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,8 +40,6 @@
|
||||
#include "datatypes/common_attlists.h"
|
||||
#include "../docx/xlsxconversioncontext.h"
|
||||
|
||||
#include "svg_parser.h"
|
||||
|
||||
namespace cpdoccore
|
||||
{
|
||||
|
||||
|
||||
@ -45,7 +45,6 @@
|
||||
#include <cpdoccore/odf/odf_document.h>
|
||||
|
||||
#include "serialize_elements.h"
|
||||
#include "../docx/xlsx_utils.h"
|
||||
#include "style_graphic_properties.h"
|
||||
|
||||
#include "odfcontext.h"
|
||||
@ -53,6 +52,9 @@
|
||||
#include "datatypes/length.h"
|
||||
#include "datatypes/borderstyle.h"
|
||||
|
||||
#include "../docx/xlsx_utils.h"
|
||||
#include "../docx/oox_drawing.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
using namespace odf_types;
|
||||
@ -260,13 +262,13 @@ void draw_enhanced_geometry::docx_convert(oox::docx_conversion_context & Context
|
||||
|
||||
if (draw_enhanced_geometry_attlist_.draw_enhanced_path_)
|
||||
{
|
||||
std::vector<svg_path::_polyline> o_Polyline;
|
||||
std::vector<::svg_path::_polyline> o_Polyline;
|
||||
|
||||
bool res = false;
|
||||
|
||||
try
|
||||
{
|
||||
res = svg_path::parseSvgD(o_Polyline, draw_enhanced_geometry_attlist_.draw_enhanced_path_.get(), true);
|
||||
res = ::svg_path::parseSvgD(o_Polyline, draw_enhanced_geometry_attlist_.draw_enhanced_path_.get(), true);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
@ -277,7 +279,8 @@ void draw_enhanced_geometry::docx_convert(oox::docx_conversion_context & Context
|
||||
{
|
||||
//сформируем xml-oox сдесь ... а то придется плодить массивы в drawing .. хоть и не красиво..
|
||||
std::wstringstream output_;
|
||||
svg_path::oox_serialize(output_, o_Polyline);
|
||||
|
||||
::svg_path::oox_serialize(output_, o_Polyline);
|
||||
shape->additional_.push_back(odf_reader::_property(L"custom_path", output_.str()));
|
||||
|
||||
set_shape = true;
|
||||
|
||||
@ -53,7 +53,8 @@
|
||||
|
||||
#include "odfcontext.h"
|
||||
#include "calcs_styles.h"
|
||||
#include "svg_parser.h"
|
||||
|
||||
#include "../docx/oox_drawing.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -320,13 +321,13 @@ void draw_enhanced_geometry::pptx_convert(oox::pptx_conversion_context & Context
|
||||
|
||||
if (draw_enhanced_geometry_attlist_.draw_enhanced_path_)
|
||||
{
|
||||
std::vector<svg_path::_polyline> o_Polyline;
|
||||
std::vector<::svg_path::_polyline> o_Polyline;
|
||||
|
||||
bool res = false;
|
||||
|
||||
try
|
||||
{
|
||||
res = svg_path::parseSvgD(o_Polyline, draw_enhanced_geometry_attlist_.draw_enhanced_path_.get(), true);
|
||||
res = ::svg_path::parseSvgD(o_Polyline, draw_enhanced_geometry_attlist_.draw_enhanced_path_.get(), true);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
@ -337,7 +338,7 @@ void draw_enhanced_geometry::pptx_convert(oox::pptx_conversion_context & Context
|
||||
{
|
||||
//сформируем xml-oox сдесь ... а то придется плодить массивы в drawing .. хоть и не красиво..
|
||||
std::wstringstream output_;
|
||||
svg_path::oox_serialize(output_, o_Polyline);
|
||||
::svg_path::oox_serialize(output_, o_Polyline);
|
||||
Context.get_slide_context().set_property(odf_reader::_property(L"custom_path", output_.str()));
|
||||
|
||||
set_shape = true;
|
||||
|
||||
@ -45,15 +45,16 @@
|
||||
#include <cpdoccore/odf/odf_document.h>
|
||||
|
||||
#include "serialize_elements.h"
|
||||
#include "../docx/xlsx_utils.h"
|
||||
#include "style_graphic_properties.h"
|
||||
#include "odfcontext.h"
|
||||
#include "calcs_styles.h"
|
||||
#include "svg_parser.h"
|
||||
|
||||
#include "datatypes/length.h"
|
||||
#include "datatypes/borderstyle.h"
|
||||
|
||||
#include "../docx/xlsx_utils.h"
|
||||
#include "../docx/oox_drawing.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
using namespace odf_types;
|
||||
@ -274,13 +275,13 @@ void draw_enhanced_geometry::xlsx_convert(oox::xlsx_conversion_context & Context
|
||||
|
||||
if (draw_enhanced_geometry_attlist_.draw_enhanced_path_)
|
||||
{
|
||||
std::vector<svg_path::_polyline> o_Polyline;
|
||||
std::vector<::svg_path::_polyline> o_Polyline;
|
||||
|
||||
bool res = false;
|
||||
|
||||
try
|
||||
{
|
||||
res = svg_path::parseSvgD(o_Polyline, draw_enhanced_geometry_attlist_.draw_enhanced_path_.get(), true);
|
||||
res = ::svg_path::parseSvgD(o_Polyline, draw_enhanced_geometry_attlist_.draw_enhanced_path_.get(), true);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
@ -291,7 +292,7 @@ void draw_enhanced_geometry::xlsx_convert(oox::xlsx_conversion_context & Context
|
||||
{
|
||||
//сформируем xml-oox сдесь ... а то придется плодить массивы в drawing .. хоть и не красиво..
|
||||
std::wstringstream output_;
|
||||
svg_path::oox_serialize(output_, o_Polyline);
|
||||
::svg_path::oox_serialize(output_, o_Polyline);
|
||||
Context.get_drawing_context().set_property(odf_reader::_property(L"custom_path", output_.str()));
|
||||
|
||||
if (draw_enhanced_geometry_attlist_.drawooo_sub_view_size_)
|
||||
|
||||
@ -99,7 +99,7 @@ void math_semantics::add_child_element( xml::sax * Reader, const std::wstring &
|
||||
|
||||
void math_semantics::oox_convert(oox::math_context & Context)
|
||||
{
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
office_math_element* math_element = dynamic_cast<office_math_element*>(content_[i].get());
|
||||
math_element->oox_convert(Context);
|
||||
|
||||
@ -193,7 +193,7 @@ void math_msqrt::oox_convert(oox::math_context & Context)
|
||||
strm << L"<m:deg/>";
|
||||
|
||||
strm << L"<m:e>";
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
office_math_element* math_element = dynamic_cast<office_math_element*>(content_[i].get());
|
||||
math_element->oox_convert(Context);
|
||||
@ -297,7 +297,7 @@ void math_mstyle::oox_convert(oox::math_context & Context)
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
office_math_element* math_element = dynamic_cast<office_math_element*>(content_[i].get());
|
||||
math_element->oox_convert(Context);
|
||||
|
||||
@ -64,7 +64,7 @@ void math_mtable::oox_convert(oox::math_context & Context)
|
||||
std::wostream & strm = Context.output_stream();
|
||||
|
||||
strm << L"<m:m>";
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
office_math_element* math_element = dynamic_cast<office_math_element*>(content_[i].get());
|
||||
math_element->oox_convert(Context);
|
||||
@ -92,7 +92,7 @@ void math_mtr::oox_convert(oox::math_context & Context)
|
||||
std::wostream & strm = Context.output_stream();
|
||||
|
||||
strm << L"<m:mr>";
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
//strm << L"<m:e>"; // EqArray записался в числитель вместо знаменателя.docx - дублирование
|
||||
office_math_element* math_element = dynamic_cast<office_math_element*>(content_[i].get());
|
||||
@ -142,7 +142,7 @@ void math_mtd::oox_convert(oox::math_context & Context)
|
||||
std::wostream & strm = Context.output_stream();
|
||||
|
||||
strm << L"<m:e>";
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
office_math_element* math_element = dynamic_cast<office_math_element*>(content_[i].get());
|
||||
math_element->oox_convert(Context);
|
||||
|
||||
@ -187,8 +187,10 @@ void odf_document::Impl::parse_fonts()
|
||||
break;
|
||||
}
|
||||
|
||||
BOOST_FOREACH(office_element_ptr & elm, fontFaceDecls->style_font_face_)
|
||||
{
|
||||
for (size_t i = 0; i < fontFaceDecls->style_font_face_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = fontFaceDecls->style_font_face_[i];
|
||||
|
||||
style_font_face* fontFace = dynamic_cast<style_font_face*>( elm.get() );
|
||||
if (!fontFace)
|
||||
{
|
||||
@ -243,8 +245,10 @@ void odf_document::Impl::parse_manifests()
|
||||
if (!document)return;
|
||||
|
||||
int res =-1;
|
||||
BOOST_FOREACH(office_element_ptr & elm, document->manifests_)
|
||||
{
|
||||
for (size_t i = 0; i < document->manifests_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = document->manifests_[i];
|
||||
|
||||
manifest_entry * entry = dynamic_cast<manifest_entry *>(elm.get());
|
||||
if (!entry)continue;
|
||||
|
||||
@ -281,15 +285,18 @@ void odf_document::Impl::parse_settings()
|
||||
office_settings * settings = dynamic_cast<office_settings*>(document->office_settings_.get());
|
||||
if (!settings) return;
|
||||
|
||||
BOOST_FOREACH(office_element_ptr & elm, settings->content_)
|
||||
{
|
||||
for (size_t i = 0; i < settings->content_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = settings->content_[i];
|
||||
|
||||
settings_config_item_set * item_set = dynamic_cast<settings_config_item_set *>(elm.get());
|
||||
if (!item_set)continue;
|
||||
|
||||
if (item_set->config_name_ == L"ooo:configuration-settings")
|
||||
{
|
||||
BOOST_FOREACH(office_element_ptr & elm_sett, item_set->content_)
|
||||
{
|
||||
for (size_t j = 0; j < item_set->content_.size(); j++)
|
||||
{
|
||||
office_element_ptr & elm_sett = item_set->content_[j];
|
||||
settings_config_item * sett = dynamic_cast<settings_config_item *>(elm_sett.get());
|
||||
if (!sett)continue;
|
||||
|
||||
@ -298,8 +305,10 @@ void odf_document::Impl::parse_settings()
|
||||
}
|
||||
else if (item_set->config_name_ == L"ooo:view-settings")
|
||||
{
|
||||
BOOST_FOREACH(office_element_ptr & elm_sett, item_set->content_)
|
||||
{
|
||||
for (size_t j = 0; j < item_set->content_.size(); j++)
|
||||
{
|
||||
office_element_ptr & elm_sett = item_set->content_[j];
|
||||
|
||||
settings_config_item * sett = dynamic_cast<settings_config_item *>(elm_sett.get());
|
||||
if (sett)
|
||||
context_->Settings().add_view(sett->config_name_, sett->content_);
|
||||
@ -308,13 +317,13 @@ void odf_document::Impl::parse_settings()
|
||||
settings_config_item_map_indexed *map_sett = dynamic_cast<settings_config_item_map_indexed *>(elm_sett.get());
|
||||
if ((map_sett) && (map_sett->config_name_ == L"Views"))
|
||||
{
|
||||
for (int i = 0; i < map_sett->content_.size(); i++)
|
||||
for (size_t i = 0; i < map_sett->content_.size(); i++)
|
||||
{
|
||||
settings_config_item_map_entry *entry = dynamic_cast<settings_config_item_map_entry *>(map_sett->content_[i].get());
|
||||
if (!entry) continue;
|
||||
|
||||
context_->Settings().start_view();
|
||||
for (int j = 0; j < entry->content_.size(); j++)
|
||||
for (size_t j = 0; j < entry->content_.size(); j++)
|
||||
{
|
||||
settings_config_item * sett = dynamic_cast<settings_config_item *>(entry->content_[j].get());
|
||||
if (sett)
|
||||
@ -323,14 +332,14 @@ void odf_document::Impl::parse_settings()
|
||||
settings_config_item_map_named *map_v = dynamic_cast<settings_config_item_map_named *>(entry->content_[j].get());
|
||||
if (map_v)
|
||||
{
|
||||
for (int n = 0; n < map_v->content_.size(); n++)
|
||||
for (size_t n = 0; n < map_v->content_.size(); n++)
|
||||
{
|
||||
settings_config_item_map_entry *entry_v = dynamic_cast<settings_config_item_map_entry *>(map_v->content_[n].get());
|
||||
if (!entry_v) continue;
|
||||
|
||||
context_->Settings().start_table_view(entry_v->config_name_);
|
||||
|
||||
for (int k = 0; k < entry_v->content_.size(); k++)
|
||||
for (size_t k = 0; k < entry_v->content_.size(); k++)
|
||||
{
|
||||
sett = dynamic_cast<settings_config_item *>(entry_v->content_[k].get());
|
||||
if (sett)
|
||||
@ -378,9 +387,11 @@ void odf_document::Impl::parse_styles()
|
||||
}
|
||||
|
||||
// parse page layout
|
||||
BOOST_FOREACH(office_element_ptr & elm, automaticStyles->style_page_layout_)
|
||||
{
|
||||
style_page_layout * pageLayout = dynamic_cast<style_page_layout *>(elm.get());
|
||||
for (size_t i = 0; i < automaticStyles->style_page_layout_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = automaticStyles->style_page_layout_[i];
|
||||
|
||||
style_page_layout * pageLayout = dynamic_cast<style_page_layout *>(elm.get());
|
||||
if (!pageLayout)
|
||||
{
|
||||
_CP_LOG << L"[warning] error reading page layout\n";
|
||||
@ -390,9 +401,11 @@ void odf_document::Impl::parse_styles()
|
||||
context_->pageLayoutContainer().add_page_layout(pageLayout);
|
||||
} // end parse page layout
|
||||
|
||||
BOOST_FOREACH(office_element_ptr & elm, automaticStyles->styles_.style_style_)
|
||||
{
|
||||
style * styleInst = dynamic_cast<style*>(elm.get());
|
||||
for (size_t i = 0; i < automaticStyles->styles_.style_style_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = automaticStyles->styles_.style_style_[i];
|
||||
|
||||
style * styleInst = dynamic_cast<style*>(elm.get());
|
||||
if (!styleInst)
|
||||
{
|
||||
_CP_LOG << L"[warning] error reading style\n";
|
||||
@ -412,9 +425,11 @@ void odf_document::Impl::parse_styles()
|
||||
);
|
||||
}
|
||||
// list styles
|
||||
BOOST_FOREACH(office_element_ptr & elm, automaticStyles->styles_.text_list_style_)
|
||||
{
|
||||
text_list_style * listStyle = dynamic_cast<text_list_style *>(elm.get());
|
||||
for (size_t i = 0; i < automaticStyles->styles_.text_list_style_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = automaticStyles->styles_.text_list_style_[i];
|
||||
|
||||
text_list_style * listStyle = dynamic_cast<text_list_style *>(elm.get());
|
||||
if (!listStyle)
|
||||
{
|
||||
_CP_LOG << L"[warning] error list style\n";
|
||||
@ -436,9 +451,11 @@ void odf_document::Impl::parse_styles()
|
||||
break;
|
||||
}
|
||||
|
||||
BOOST_FOREACH(office_element_ptr & elm, masterStyles->style_master_page_)
|
||||
{
|
||||
style_master_page * masterPage = dynamic_cast<style_master_page *>(elm.get());
|
||||
for (size_t i = 0; i < masterStyles->style_master_page_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = masterStyles->style_master_page_[i];
|
||||
|
||||
style_master_page * masterPage = dynamic_cast<style_master_page *>(elm.get());
|
||||
if (!masterPage)
|
||||
{
|
||||
_CP_LOG << L"[warning] error reading master page\n";
|
||||
@ -464,9 +481,11 @@ void odf_document::Impl::parse_styles()
|
||||
}
|
||||
|
||||
// default styles
|
||||
BOOST_FOREACH(office_element_ptr & elm, docStyles->style_default_style_)
|
||||
{
|
||||
default_style * styleInst = dynamic_cast<default_style *>(elm.get());
|
||||
for (size_t i = 0; i < docStyles->style_default_style_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = docStyles->style_default_style_[i];
|
||||
|
||||
default_style * styleInst = dynamic_cast<default_style *>(elm.get());
|
||||
if (!styleInst)
|
||||
{
|
||||
_CP_LOG << L"[warning] error reading default style\n";
|
||||
@ -483,9 +502,11 @@ void odf_document::Impl::parse_styles()
|
||||
L"",
|
||||
L"");
|
||||
}
|
||||
BOOST_FOREACH(office_element_ptr & elm, docStyles->style_presentation_page_layout_)
|
||||
{
|
||||
style_presentation_page_layout * pageLayout = dynamic_cast<style_presentation_page_layout *>(elm.get());
|
||||
for (size_t i = 0; i < docStyles->style_presentation_page_layout_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = docStyles->style_presentation_page_layout_[i];
|
||||
|
||||
style_presentation_page_layout * pageLayout = dynamic_cast<style_presentation_page_layout *>(elm.get());
|
||||
|
||||
if (!pageLayout)
|
||||
continue;
|
||||
@ -494,9 +515,11 @@ void odf_document::Impl::parse_styles()
|
||||
}
|
||||
|
||||
// common styles
|
||||
BOOST_FOREACH(office_element_ptr & elm, docStyles->styles_.style_style_)
|
||||
{
|
||||
style * styleInst = dynamic_cast<style*>(elm.get());
|
||||
for (size_t i = 0; i < docStyles->styles_.style_style_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = docStyles->styles_.style_style_[i];
|
||||
|
||||
style * styleInst = dynamic_cast<style*>(elm.get());
|
||||
if (!styleInst)
|
||||
{
|
||||
_CP_LOG << L"[warning] error reading style\n";
|
||||
@ -519,8 +542,10 @@ void odf_document::Impl::parse_styles()
|
||||
}
|
||||
|
||||
// list styles
|
||||
BOOST_FOREACH(office_element_ptr & elm, docStyles->styles_.text_list_style_)
|
||||
{
|
||||
for (size_t i = 0; i < docStyles->styles_.text_list_style_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = docStyles->styles_.text_list_style_[i];
|
||||
|
||||
text_list_style * listStyle = dynamic_cast<text_list_style *>(elm.get());
|
||||
if (!listStyle)
|
||||
{
|
||||
@ -531,9 +556,11 @@ void odf_document::Impl::parse_styles()
|
||||
context_->listStyleContainer().add_list_style(listStyle);
|
||||
}
|
||||
|
||||
BOOST_FOREACH(const office_element_ptr & elm, docStyles->text_notes_configuration_)
|
||||
{
|
||||
const text_notes_configuration * conf = dynamic_cast<const text_notes_configuration *>(elm.get());
|
||||
for (size_t i = 0; i < docStyles->text_notes_configuration_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = docStyles->text_notes_configuration_[i];
|
||||
|
||||
const text_notes_configuration * conf = dynamic_cast<const text_notes_configuration *>(elm.get());
|
||||
if (!conf)
|
||||
continue;
|
||||
|
||||
@ -542,53 +569,65 @@ void odf_document::Impl::parse_styles()
|
||||
|
||||
}
|
||||
|
||||
BOOST_FOREACH(const office_element_ptr & elm, docStyles->styles_.number_styles_)
|
||||
{
|
||||
const number_style_base * style = dynamic_cast<const number_style_base *>(elm.get());
|
||||
for (size_t i = 0; i < docStyles->styles_.number_styles_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = docStyles->styles_.number_styles_[i];
|
||||
|
||||
const number_style_base * style = dynamic_cast<const number_style_base *>(elm.get());
|
||||
|
||||
if (!style)
|
||||
continue;
|
||||
|
||||
context_->numberStyles().add(style->get_style_name(), elm);
|
||||
}
|
||||
BOOST_FOREACH(const office_element_ptr & elm, docStyles->draw_styles_.draw_gradient_)
|
||||
{
|
||||
draw_gradient * style = dynamic_cast<draw_gradient *>(elm.get());
|
||||
for (size_t i = 0; i < docStyles->draw_styles_.draw_gradient_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = docStyles->draw_styles_.draw_gradient_[i];
|
||||
|
||||
draw_gradient * style = dynamic_cast<draw_gradient *>(elm.get());
|
||||
|
||||
if (!style)
|
||||
continue;
|
||||
|
||||
context_->drawStyles().add(L"gradient:" + style->get_style_name(), elm);
|
||||
}
|
||||
BOOST_FOREACH(const office_element_ptr & elm, docStyles->draw_styles_.draw_fill_image_)
|
||||
{
|
||||
draw_fill_image * style = dynamic_cast<draw_fill_image *>(elm.get());
|
||||
for (size_t i = 0; i < docStyles->draw_styles_.draw_fill_image_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = docStyles->draw_styles_.draw_fill_image_[i];
|
||||
|
||||
draw_fill_image * style = dynamic_cast<draw_fill_image *>(elm.get());
|
||||
|
||||
if (!style)
|
||||
continue;
|
||||
|
||||
context_->drawStyles().add(L"bitmap:" + style->get_style_name(), elm);
|
||||
}
|
||||
BOOST_FOREACH(const office_element_ptr & elm, docStyles->draw_styles_.draw_opacity_)
|
||||
{
|
||||
draw_opacity * style = dynamic_cast<draw_opacity *>(elm.get());
|
||||
for (size_t i = 0; i < docStyles->draw_styles_.draw_opacity_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = docStyles->draw_styles_.draw_opacity_[i];
|
||||
|
||||
draw_opacity * style = dynamic_cast<draw_opacity *>(elm.get());
|
||||
|
||||
if (!style)
|
||||
continue;
|
||||
|
||||
context_->drawStyles().add(L"opacity:" + style->get_style_name(), elm);
|
||||
}
|
||||
BOOST_FOREACH(const office_element_ptr & elm, docStyles->draw_styles_.draw_hatch_)
|
||||
{
|
||||
draw_hatch * style = dynamic_cast<draw_hatch *>(elm.get());
|
||||
for (size_t i = 0; i < docStyles->draw_styles_.draw_hatch_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = docStyles->draw_styles_.draw_hatch_[i];
|
||||
|
||||
draw_hatch * style = dynamic_cast<draw_hatch *>(elm.get());
|
||||
|
||||
if (!style)
|
||||
continue;
|
||||
|
||||
context_->drawStyles().add(L"hatch:" + style->get_style_name(), elm);
|
||||
}
|
||||
BOOST_FOREACH(const office_element_ptr & elm, docStyles->templates_.table_templates_)
|
||||
{
|
||||
for (size_t i = 0; i < docStyles->templates_.table_templates_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = docStyles->templates_.table_templates_[i];
|
||||
|
||||
table_table_template * style = dynamic_cast<table_table_template *>(elm.get());
|
||||
|
||||
if (!style)
|
||||
@ -626,9 +665,11 @@ void odf_document::Impl::parse_styles()
|
||||
break;
|
||||
}
|
||||
|
||||
BOOST_FOREACH(office_element_ptr & elm, automaticStyles->styles_.style_style_)
|
||||
{
|
||||
style * styleInst = dynamic_cast<style*>(elm.get());
|
||||
for (size_t i = 0; i < automaticStyles->styles_.style_style_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = automaticStyles->styles_.style_style_[i];
|
||||
|
||||
style * styleInst = dynamic_cast<style*>(elm.get());
|
||||
if (!styleInst)
|
||||
{
|
||||
_CP_LOG << L"[warning] error reading style\n";
|
||||
@ -650,9 +691,11 @@ void odf_document::Impl::parse_styles()
|
||||
);
|
||||
}
|
||||
|
||||
BOOST_FOREACH(office_element_ptr & elm, automaticStyles->styles_.text_list_style_)
|
||||
{
|
||||
text_list_style * listStyle = dynamic_cast<text_list_style *>(elm.get());
|
||||
for (size_t i = 0; i < automaticStyles->styles_.text_list_style_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = automaticStyles->styles_.text_list_style_[i];
|
||||
|
||||
text_list_style * listStyle = dynamic_cast<text_list_style *>(elm.get());
|
||||
if (!listStyle)
|
||||
{
|
||||
_CP_LOG << L"[warning] error reading list style\n";
|
||||
@ -662,9 +705,11 @@ void odf_document::Impl::parse_styles()
|
||||
context_->listStyleContainer().add_list_style(listStyle);
|
||||
}
|
||||
|
||||
BOOST_FOREACH(const office_element_ptr & elm, automaticStyles->styles_.number_styles_)
|
||||
{
|
||||
const number_style_base * style = dynamic_cast<const number_style_base *>(elm.get());
|
||||
for (size_t i = 0; i < automaticStyles->styles_.number_styles_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = automaticStyles->styles_.number_styles_[i];
|
||||
|
||||
const number_style_base * style = dynamic_cast<const number_style_base *>(elm.get());
|
||||
|
||||
if (!style) continue;
|
||||
|
||||
|
||||
@ -223,8 +223,9 @@ void styles_container::add_master_page_name(const std::wstring & StyleName, cons
|
||||
std::pair<int,std::wstring> presentation_layouts_instance::add_or_find(const std::wstring & layout_name,const std::wstring & master_name)
|
||||
{
|
||||
bool find = false;
|
||||
int index =0;
|
||||
for (index=0;index<content.size();index++)
|
||||
size_t index =0;
|
||||
|
||||
for (index = 0; index < content.size(); index++)
|
||||
{
|
||||
if (content[index].layout_name == layout_name && content[index].master_name == master_name)
|
||||
{
|
||||
@ -250,8 +251,8 @@ std::pair<int,std::wstring> presentation_layouts_instance::add_or_find(const std
|
||||
std::pair<int,std::wstring> presentation_masters_instance::add_or_find(const std::wstring & master_name)
|
||||
{
|
||||
bool find = false;
|
||||
int index =0;
|
||||
for (index=0;index<content.size();index++)
|
||||
size_t index =0;
|
||||
for (index = 0; index < content.size(); index++)
|
||||
{
|
||||
if (content[index].master_name == master_name)
|
||||
{
|
||||
@ -276,8 +277,8 @@ std::pair<int,std::wstring> presentation_masters_instance::add_or_find(const std
|
||||
void presentation_masters_instance::add_layout_to(const std::wstring & master_name, presentation_layouts_instance::_layout & layout)
|
||||
{
|
||||
bool find = false;
|
||||
int index =0;
|
||||
for (index=0;index<content.size();index++)
|
||||
size_t index = 0;
|
||||
for (index = 0; index < content.size(); index++)
|
||||
{
|
||||
if (content[index].master_name == master_name)
|
||||
{
|
||||
|
||||
@ -57,7 +57,7 @@ class document_context;
|
||||
class office_element;
|
||||
typedef shared_ptr<office_element>::Type office_element_ptr;
|
||||
typedef weak_ptr<office_element>::Type office_element_weak_ptr;
|
||||
typedef std::vector<office_element_ptr> office_element_ptr_array;
|
||||
typedef std::vector<office_element_ptr> office_element_ptr_array;
|
||||
|
||||
class office_element : public xml::element<wchar_t>,
|
||||
public common::read_doc_element,
|
||||
|
||||
@ -1564,7 +1564,7 @@ void header_footer_impl::docx_convert(oox::docx_conversion_context & Context)
|
||||
if (content_.header_footer_content_.tracked_changes_)
|
||||
content_.header_footer_content_.tracked_changes_->docx_convert(Context);
|
||||
|
||||
for (int i=0; i < content_.header_footer_content_.content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.header_footer_content_.content_.size(); i++)
|
||||
{
|
||||
content_.header_footer_content_.content_[i]->docx_convert(Context);
|
||||
}
|
||||
|
||||
@ -35,8 +35,6 @@
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
namespace cpdoccore
|
||||
{
|
||||
namespace svg_path
|
||||
{
|
||||
void skipSpaces(int& io_rPos, const std::wstring& rStr, const int nLen)
|
||||
@ -69,7 +67,7 @@ namespace svg_path
|
||||
return isOnNumberChar(rStr[nPos],bSignAllowed);
|
||||
}
|
||||
|
||||
bool getDoubleChar(double& o_fRetval,int & io_rPos, const std::wstring& rStr)
|
||||
bool getDoubleChar(double& o_fRetval,int & io_rPos, const std::wstring& rStr)
|
||||
{
|
||||
wchar_t aChar( rStr[io_rPos] );
|
||||
std::wstring sNumberString;
|
||||
@ -121,7 +119,7 @@ namespace svg_path
|
||||
return false;
|
||||
}
|
||||
|
||||
bool importDoubleAndSpaces( double& o_fRetval, int& io_rPos, const std::wstring& rStr, const int nLen )
|
||||
bool importDoubleAndSpaces( double& o_fRetval, int& io_rPos, const std::wstring& rStr, const int nLen )
|
||||
{
|
||||
if( !getDoubleChar(o_fRetval, io_rPos, rStr) )
|
||||
return false;
|
||||
@ -131,7 +129,7 @@ namespace svg_path
|
||||
return true;
|
||||
}
|
||||
|
||||
bool importFlagAndSpaces(int& o_nRetval, int& io_rPos, const std::wstring& rStr, const int nLen)
|
||||
bool importFlagAndSpaces(int& o_nRetval, int& io_rPos, const std::wstring& rStr, const int nLen)
|
||||
{
|
||||
wchar_t aChar( rStr[io_rPos] );
|
||||
|
||||
@ -181,7 +179,6 @@ namespace svg_path
|
||||
return bUseRelativeCoordinates ? cLowerCaseCommand : cUpperCaseCommand;
|
||||
}
|
||||
|
||||
|
||||
bool parseSvgD(std::vector<_polyline> & Polyline, const std::wstring & rSvgDStatement, bool bWrongPositionAfterZ)
|
||||
{
|
||||
Polyline.clear();
|
||||
@ -808,6 +805,152 @@ namespace svg_path
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
bool parseVml(std::vector<_polyline> & Polyline, const std::wstring & rSvgDStatement)
|
||||
{
|
||||
Polyline.clear();
|
||||
const int nLen(rSvgDStatement.length());
|
||||
int nPos(0);
|
||||
bool bIsClosed(false);
|
||||
|
||||
double nLastX( 0.0 );
|
||||
double nLastY( 0.0 );
|
||||
|
||||
double nLastControlX( 0.0 );
|
||||
double nLastControlY( 0.0 );
|
||||
|
||||
_polyline aCurrPoly;
|
||||
|
||||
skipSpaces(nPos, rSvgDStatement, nLen);
|
||||
|
||||
while(nPos < nLen)
|
||||
{
|
||||
bool bRelative (false);
|
||||
bool bMoveTo (false);
|
||||
const wchar_t aCurrChar(rSvgDStatement[nPos]);
|
||||
|
||||
aCurrPoly.command.clear();
|
||||
|
||||
switch(aCurrChar)
|
||||
{
|
||||
case 'x' :
|
||||
{
|
||||
nPos++;
|
||||
bIsClosed = true;
|
||||
|
||||
} break;
|
||||
case 'm' :
|
||||
case 't' :
|
||||
{
|
||||
bMoveTo = true;
|
||||
}
|
||||
case 'l' :
|
||||
case 'r' :
|
||||
{
|
||||
if('t' == aCurrChar || 'r' == aCurrChar)
|
||||
{
|
||||
bRelative = true;
|
||||
}
|
||||
|
||||
if(aCurrPoly.points.size() > 0)
|
||||
{
|
||||
if(bIsClosed)
|
||||
{
|
||||
}
|
||||
Polyline.push_back(aCurrPoly);
|
||||
|
||||
bIsClosed = false;
|
||||
|
||||
if(bMoveTo) aCurrPoly.command = L"m";
|
||||
else aCurrPoly.command = L"l";
|
||||
|
||||
aCurrPoly.points.clear();
|
||||
}
|
||||
nPos++;
|
||||
skipSpaces(nPos, rSvgDStatement, nLen);
|
||||
aCurrPoly.command.clear();
|
||||
|
||||
while(nPos < nLen && isOnNumberChar(rSvgDStatement, nPos))
|
||||
{
|
||||
double nX, nY;
|
||||
|
||||
if(!importDoubleAndSpaces(nX, nPos, rSvgDStatement, nLen)) return false;
|
||||
if(!importDoubleAndSpaces(nY, nPos, rSvgDStatement, nLen)) return false;
|
||||
|
||||
if(bRelative)
|
||||
{
|
||||
nX += nLastX;
|
||||
nY += nLastY;
|
||||
}
|
||||
|
||||
nLastX = nX;
|
||||
nLastY = nY;
|
||||
|
||||
if(bMoveTo) aCurrPoly.command = L"m";
|
||||
else aCurrPoly.command = L"l";
|
||||
|
||||
aCurrPoly.points.push_back(_point(nX, nY));
|
||||
Polyline.push_back(aCurrPoly);
|
||||
aCurrPoly.points.clear();
|
||||
}
|
||||
}break;
|
||||
|
||||
case 'v' :
|
||||
bRelative = true;
|
||||
case 'c' :
|
||||
{
|
||||
nPos++;
|
||||
skipSpaces(nPos, rSvgDStatement, nLen);
|
||||
|
||||
while(nPos < nLen && isOnNumberChar(rSvgDStatement, nPos))
|
||||
{
|
||||
double nX, nY;
|
||||
double nX1, nY1;
|
||||
double nX2, nY2;
|
||||
|
||||
if(!importDoubleAndSpaces(nX1, nPos, rSvgDStatement, nLen)) return false;
|
||||
if(!importDoubleAndSpaces(nY1, nPos, rSvgDStatement, nLen)) return false;
|
||||
if(!importDoubleAndSpaces(nX2, nPos, rSvgDStatement, nLen)) return false;
|
||||
if(!importDoubleAndSpaces(nY2, nPos, rSvgDStatement, nLen)) return false;
|
||||
if(!importDoubleAndSpaces(nX, nPos, rSvgDStatement, nLen)) return false;
|
||||
if(!importDoubleAndSpaces(nY, nPos, rSvgDStatement, nLen)) return false;
|
||||
|
||||
if(bRelative)
|
||||
{
|
||||
nX1 += nLastX;
|
||||
nY1 += nLastY;
|
||||
nX2 += nLastX;
|
||||
nY2 += nLastY;
|
||||
nX += nLastX;
|
||||
nY += nLastY;
|
||||
}
|
||||
aCurrPoly.command = L"c";
|
||||
|
||||
aCurrPoly.points.push_back(_point(nX1, nY1));
|
||||
aCurrPoly.points.push_back(_point(nX2, nY2));
|
||||
aCurrPoly.points.push_back(_point(nX, nY));
|
||||
|
||||
Polyline.push_back(aCurrPoly);
|
||||
aCurrPoly.points.clear();
|
||||
|
||||
nLastX = nX;
|
||||
nLastY = nY;
|
||||
|
||||
nLastControlX = nX2;
|
||||
nLastControlY = nY2;
|
||||
}
|
||||
}break;
|
||||
|
||||
default:
|
||||
{
|
||||
++nPos;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -39,10 +39,7 @@
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
|
||||
namespace cpdoccore
|
||||
{
|
||||
#include "../../include/cpdoccore/CPOptional.h"
|
||||
|
||||
namespace svg_path
|
||||
{
|
||||
@ -60,23 +57,10 @@ namespace svg_path
|
||||
std::vector<_point> points; //будем бить строку пути по количеству точек в буковках
|
||||
|
||||
};
|
||||
//m - 1 point
|
||||
//c - 3 point
|
||||
//s - 2 point
|
||||
//l - 1 point
|
||||
//z - finish
|
||||
//h - 0.5 point :)
|
||||
//v - 0.5 point
|
||||
//q - 2 point
|
||||
//t - 1 point
|
||||
//a - [[[[
|
||||
void oox_serialize(std::wostream & _Wostream, _point const & val);
|
||||
void oox_serialize(std::wostream & _Wostream, _polyline const & val);
|
||||
void oox_serialize(std::wostream & _Wostream, std::vector<svg_path::_polyline> & path);
|
||||
|
||||
bool parseSvgD(std::vector<_polyline> & Polyline, const std::wstring & rSvgDStatement, bool bWrongPositionAfterZ);
|
||||
bool parsePolygon(std::vector<_polyline> & Polyline, const std::wstring & rPolygonStatement, bool bWrongPositionAfterZ, bool closed);
|
||||
|
||||
}
|
||||
bool parseVml(std::vector<_polyline> & Polyline, const std::wstring & path);
|
||||
bool parseSvgD(std::vector<_polyline> & Polyline, const std::wstring & path, bool bWrongPositionAfterZ);
|
||||
bool parsePolygon(std::vector<_polyline> & Polyline, const std::wstring & path, bool bWrongPositionAfterZ, bool closed);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -640,14 +640,14 @@ const wchar_t * table_shapes::name = L"shapes";
|
||||
|
||||
void table_shapes::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->docx_convert(Context);
|
||||
}
|
||||
}
|
||||
void table_shapes::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
{
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->pptx_convert(Context);
|
||||
}
|
||||
@ -655,7 +655,7 @@ void table_shapes::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
|
||||
void table_shapes::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->xlsx_convert(Context);
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ void table_database_ranges::add_child_element( xml::sax * Reader, const std::wst
|
||||
|
||||
void table_database_ranges::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->xlsx_convert(Context);
|
||||
}
|
||||
@ -101,7 +101,7 @@ void table_database_range::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
if (table_contains_header_)
|
||||
Context.get_table_context().set_database_header(table_contains_header_->get());
|
||||
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->xlsx_convert(Context);
|
||||
}
|
||||
@ -124,7 +124,7 @@ void table_sort::add_child_element( xml::sax * Reader, const std::wstring & Ns,
|
||||
|
||||
void table_sort::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
for (int i = 0; i < table_sort_by_.size(); i++)
|
||||
for (size_t i = 0; i < table_sort_by_.size(); i++)
|
||||
{
|
||||
table_sort_by * sort_by = dynamic_cast<table_sort_by*>(table_sort_by_[i].get());
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ int table_table_cell_content::xlsx_convert(oox::xlsx_conversion_context & Contex
|
||||
Context.get_table_context().start_cell_content();
|
||||
Context.get_text_context().set_cell_text_properties(text_properties);
|
||||
|
||||
for (int i = 0 ; i < elements_.size(); i++)
|
||||
for (size_t i = 0 ; i < elements_.size(); i++)
|
||||
{
|
||||
elements_[i]->xlsx_convert(Context);
|
||||
}
|
||||
@ -191,7 +191,7 @@ void table_table_row::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
|
||||
CP_XML_STREAM();
|
||||
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = content_[i];
|
||||
|
||||
@ -233,7 +233,7 @@ void table_table_row::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
|
||||
void table_table_rows::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
for (int i = 0; i < table_table_row_.size(); i++)
|
||||
for (size_t i = 0; i < table_table_row_.size(); i++)
|
||||
{
|
||||
table_table_row_[i]->xlsx_convert(Context);
|
||||
}
|
||||
@ -241,7 +241,7 @@ void table_table_rows::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
|
||||
void table_table_header_rows::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
for (int i = 0; i < table_table_row_.size(); i++)
|
||||
for (size_t i = 0; i < table_table_row_.size(); i++)
|
||||
{
|
||||
table_table_row_[i]->xlsx_convert(Context);
|
||||
}
|
||||
@ -274,7 +274,7 @@ void table_rows::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
}
|
||||
|
||||
}
|
||||
for (int i = 0; i < table_table_row_.size(); i++)
|
||||
for (size_t i = 0; i < table_table_row_.size(); i++)
|
||||
{
|
||||
table_table_row_[i]->xlsx_convert(Context);
|
||||
}
|
||||
@ -293,7 +293,7 @@ void table_rows_no_group::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
|
||||
void table_rows_and_groups::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->xlsx_convert(Context);
|
||||
}
|
||||
@ -336,7 +336,7 @@ void table_table::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
if (conditional_formats_)
|
||||
conditional_formats_->xlsx_convert(Context);
|
||||
|
||||
for (int i = 0 ; i < table_named_.size(); i++)
|
||||
for (size_t i = 0 ; i < table_named_.size(); i++)
|
||||
{
|
||||
table_named_[i]->xlsx_convert(Context);
|
||||
}
|
||||
@ -349,7 +349,7 @@ void table_columns::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
if (table_table_columns_)
|
||||
table_table_columns_->xlsx_convert(Context);
|
||||
|
||||
for (int i = 0; i < table_table_column_.size(); i++)
|
||||
for (size_t i = 0; i < table_table_column_.size(); i++)
|
||||
{
|
||||
table_table_column_[i]->xlsx_convert(Context);
|
||||
}
|
||||
@ -374,7 +374,7 @@ void table_columns_and_groups::xlsx_convert(oox::xlsx_conversion_context & Conte
|
||||
table_columns_no_group_.xlsx_convert(Context);
|
||||
*/
|
||||
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
office_element_ptr & elm = content_[i];
|
||||
elm->xlsx_convert(Context);
|
||||
@ -383,7 +383,7 @@ void table_columns_and_groups::xlsx_convert(oox::xlsx_conversion_context & Conte
|
||||
|
||||
void table_table_header_columns::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
for (int i = 0; i < table_table_column_.size(); i++)
|
||||
for (size_t i = 0; i < table_table_column_.size(); i++)
|
||||
{
|
||||
table_table_column_[i]->xlsx_convert(Context);
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ void paragraph_attrs::add_attributes( const xml::attributes_wc_ptr & Attributes
|
||||
std::vector< std::wstring > classNamesArray;
|
||||
boost::algorithm::split(classNamesArray, classNames, boost::algorithm::is_any_of(L" "));
|
||||
|
||||
for (int i = 0; i < classNamesArray.size(); i++)
|
||||
for (size_t i = 0; i < classNamesArray.size(); i++)
|
||||
{
|
||||
text_class_names_.push_back( style_ref(classNamesArray[i]) );
|
||||
}
|
||||
|
||||
@ -387,7 +387,7 @@ void paragraph::docx_convert(oox::docx_conversion_context & Context)
|
||||
|
||||
if (!Context.get_paragraph_keep())// например Appendix I_IPP.odt - tracked elements (
|
||||
{
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->docx_convert(Context);
|
||||
}
|
||||
@ -1238,7 +1238,7 @@ void text_tracked_changes::add_child_element( xml::sax * Reader, const std::wstr
|
||||
|
||||
void text_tracked_changes::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->docx_convert(Context);
|
||||
}
|
||||
@ -1263,7 +1263,7 @@ void text_changed_region::docx_convert(oox::docx_conversion_context & Context)
|
||||
|
||||
Context.get_text_tracked_context().start_change (*text_id_);
|
||||
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->docx_convert(Context);
|
||||
}
|
||||
@ -1296,7 +1296,7 @@ void text_unknown_base_change::docx_convert(oox::docx_conversion_context & Conte
|
||||
|
||||
//тут удаленный текст. не по стандарту сделать бы и форматы - стилями чтоли ....
|
||||
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
Context.get_text_tracked_context().start_changes_content();
|
||||
{
|
||||
@ -1311,7 +1311,7 @@ void text_unknown_base_change::docx_convert(oox::docx_conversion_context & Conte
|
||||
|
||||
//if (para)
|
||||
//{
|
||||
// for (int j = 0; j < para->content_.size(); j++)
|
||||
// for (size_t j = 0; j < para->content_.size(); j++)
|
||||
// {
|
||||
// para->content_[j]->docx_convert(Context);
|
||||
// }
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Version="8,00"
|
||||
Name="OdfFormatReaderLib"
|
||||
ProjectGUID="{50E20601-4A8D-4AFB-8870-63828D328429}"
|
||||
RootNamespace="cpodf"
|
||||
|
||||
@ -119,7 +119,7 @@ void header_footer_content::serialize(std::wostream & strm)
|
||||
if (tracked_changes_)
|
||||
tracked_changes_->serialize(strm);
|
||||
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->serialize(strm);
|
||||
}
|
||||
|
||||
@ -296,8 +296,10 @@ void number_currency_symbol::serialize(std::wostream & strm)
|
||||
CP_XML_ATTR_OPT(L"number:language", number_language_);
|
||||
CP_XML_ATTR_OPT(L"number:country", number_country_);
|
||||
|
||||
for (long i=0; i < text_.size(); i++)
|
||||
for (size_t i = 0; i < text_.size(); i++)
|
||||
{
|
||||
CP_XML_STREAM() << text_[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -248,7 +248,7 @@ std::wstring odf_chart_context::Impl::convert_formula(std::wstring oox_formula)
|
||||
|
||||
chart_chart* odf_chart_context::Impl::get_current_chart()
|
||||
{
|
||||
for (long i=current_level_.size()-1; i>=0; i--)
|
||||
for (long i = (long)current_level_.size() - 1; i >= 0; i--)
|
||||
{
|
||||
chart_chart * chart = dynamic_cast<chart_chart*>(current_level_[i].elm.get());
|
||||
if (chart) return chart;
|
||||
@ -257,7 +257,7 @@ chart_chart* odf_chart_context::Impl::get_current_chart()
|
||||
}
|
||||
chart_series* odf_chart_context::Impl::get_current_series()
|
||||
{
|
||||
for (long i=current_level_.size()-1; i>=0; i--)
|
||||
for (long i = (long)current_level_.size() - 1; i >= 0; i--)
|
||||
{
|
||||
chart_series * chart = dynamic_cast<chart_series*>(current_level_[i].elm.get());
|
||||
if (chart) return chart;
|
||||
@ -706,7 +706,7 @@ void odf_chart_context::end_group_series()
|
||||
bool presentZ = false;
|
||||
long countX = 0;
|
||||
long countY = 0;
|
||||
for (long j = 0; j < impl_->axis_.size(); j++)
|
||||
for (size_t j = 0; j < impl_->axis_.size(); j++)
|
||||
{
|
||||
if (impl_->axis_[j].dimension ==1) countX++;
|
||||
else if (impl_->axis_[j].dimension ==3) presentZ = true;
|
||||
@ -727,9 +727,9 @@ void odf_chart_context::end_group_series()
|
||||
countY--;
|
||||
}
|
||||
|
||||
for (long i=0; i < impl_->axis_group_series_.size(); i++)
|
||||
for (size_t i=0; i < impl_->axis_group_series_.size(); i++)
|
||||
{
|
||||
for (long j = 0; j < impl_->axis_.size(); j++)
|
||||
for (size_t j = 0; j < impl_->axis_.size(); j++)
|
||||
{
|
||||
if (impl_->axis_[j].oox_id == impl_->axis_group_series_[i] && impl_->axis_[j].dimension ==2)
|
||||
{
|
||||
@ -741,7 +741,7 @@ void odf_chart_context::end_group_series()
|
||||
}
|
||||
|
||||
|
||||
for (long i =0; i < impl_->group_series_.size() && axis_name.length() > 0; i++)
|
||||
for (size_t i =0; i < impl_->group_series_.size() && axis_name.length() > 0; i++)
|
||||
{
|
||||
chart_series *series= dynamic_cast<chart_series*>(impl_->group_series_[i].get());
|
||||
if (series)
|
||||
@ -899,7 +899,7 @@ void odf_chart_context::end_plot_area()
|
||||
if (plot_area)
|
||||
{
|
||||
std::wstring cell_range;
|
||||
for (long i = 0; i < impl_->data_cell_ranges_.size(); i++)
|
||||
for (size_t i = 0; i < impl_->data_cell_ranges_.size(); i++)
|
||||
{
|
||||
cell_range = cell_range + impl_->data_cell_ranges_[i].ref + L" ";
|
||||
}
|
||||
@ -928,7 +928,7 @@ void odf_chart_context::end_text()
|
||||
odf_text_context * text_context_ = text_context();
|
||||
if (text_context_ == NULL || impl_->current_level_.size() <1 )return;
|
||||
|
||||
for (long i=0; i< text_context_->text_elements_list_.size(); i++)
|
||||
for (size_t i=0; i< text_context_->text_elements_list_.size(); i++)
|
||||
{
|
||||
if (text_context_->text_elements_list_[i].level ==0)
|
||||
{
|
||||
@ -1400,7 +1400,7 @@ void odf_chart_context::end_chart()
|
||||
|
||||
|
||||
int cat = 0;
|
||||
for (long i = 0; i < impl_->axis_.size() && impl_->categories_.size() > 0; i++)
|
||||
for (size_t i = 0; i < impl_->axis_.size() && impl_->categories_.size() > 0; i++)
|
||||
{
|
||||
if (impl_->axis_[i].elm == NULL) continue;
|
||||
|
||||
@ -1692,7 +1692,7 @@ void odf_chart_context::Impl::create_local_table()
|
||||
//выкинем дублирующие ref
|
||||
for (size_t i = 0; i < cash_.size(); i++)
|
||||
{
|
||||
for (long j = i + 1; j < cash_.size(); j++)
|
||||
for (size_t j = i + 1; j < cash_.size(); j++)
|
||||
{
|
||||
if (cash_[j].ref == cash_[i].ref && cash_[j].ref.length() > 1)
|
||||
{
|
||||
@ -1813,7 +1813,7 @@ void odf_chart_context::Impl::create_local_table()
|
||||
table_elm->add_child_element(cols_elm);
|
||||
|
||||
|
||||
for (long i=0; i < max_columns - (col_header ? 1 : 0); i++)
|
||||
for (int i=0; i < max_columns - (col_header ? 1 : 0); i++)
|
||||
cols_elm->add_child_element(col_elm);
|
||||
|
||||
office_element_ptr row_headers_elm;
|
||||
@ -1840,12 +1840,12 @@ void odf_chart_context::Impl::create_local_table()
|
||||
if ((std::min)(r1, r2) > min_row) min_row = (std::min)(r1, r2);
|
||||
if ((std::min)(c1, c2) > min_col) min_col = (std::min)(c1, c2);
|
||||
|
||||
for (int i = 0 ; i < cells_cash_label.size(); i++)
|
||||
for (size_t i = 0 ; i < cells_cash_label.size(); i++)
|
||||
{
|
||||
cells_cash_label[i].row -= min_row - 1;
|
||||
cells_cash_label[i].col -= min_col - 1;
|
||||
}
|
||||
for (int i = 0 ; i < cells_cash.size(); i++)
|
||||
for (size_t i = 0 ; i < cells_cash.size(); i++)
|
||||
{
|
||||
cells_cash[i].row -= min_row - 1;
|
||||
cells_cash[i].col -= min_col - 1;
|
||||
|
||||
@ -111,7 +111,7 @@ void odf_comment_context::start_comment(office_element_ptr &elm, int oox_id)
|
||||
}
|
||||
void odf_comment_context::end_comment(office_element_ptr &elm, int oox_id)
|
||||
{
|
||||
for(long i=0; i < impl_->comments_.size(); i++)
|
||||
for (size_t i = 0; i < impl_->comments_.size(); i++)
|
||||
{
|
||||
if (impl_->comments_[i].oox_id == oox_id)
|
||||
{
|
||||
@ -138,7 +138,7 @@ void odf_comment_context::end_comment_content()
|
||||
}
|
||||
int odf_comment_context::find_by_id(int oox_id)
|
||||
{
|
||||
for(long i=0; i < impl_->comments_.size(); i++)
|
||||
for (size_t i=0; i < impl_->comments_.size(); i++)
|
||||
{
|
||||
if (impl_->comments_[i].oox_id == oox_id)
|
||||
{
|
||||
@ -150,7 +150,7 @@ int odf_comment_context::find_by_id(int oox_id)
|
||||
}
|
||||
std::wstring odf_comment_context::find_name_by_id(int oox_id)
|
||||
{
|
||||
for(long i=0; i < impl_->comments_.size(); i++)
|
||||
for (size_t i = 0; i < impl_->comments_.size(); i++)
|
||||
{
|
||||
if (impl_->comments_[i].oox_id == oox_id) return impl_->comments_[i].odf_name;
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ _mediaitems* odf_conversion_context::mediaitems()
|
||||
void odf_conversion_context::end_document()
|
||||
{
|
||||
rels rels_;
|
||||
for (long i=0; i< objects_.size(); i++)
|
||||
for (size_t i = 0; i < objects_.size(); i++)
|
||||
{
|
||||
_object & object = objects_[i];
|
||||
bool isRoot = (i == 0 ? true : false);
|
||||
|
||||
@ -908,7 +908,7 @@ void odf_drawing_context::end_shape()
|
||||
|
||||
enhanced->draw_enhanced_geometry_attlist_.draw_enhanced_path_ = shape_define->enhanced_path;
|
||||
|
||||
for (long i=0; i < shape_define->equations.size();i++)
|
||||
for (size_t i = 0; i < shape_define->equations.size();i++)
|
||||
{
|
||||
office_element_ptr elm_eq;
|
||||
create_element(L"draw", L"equation", elm_eq, impl_->odf_context_);
|
||||
@ -922,7 +922,7 @@ void odf_drawing_context::end_shape()
|
||||
end_element();
|
||||
}
|
||||
//-----------------------------
|
||||
for (long i=0; i < shape_define->handles.size();i++)
|
||||
for (size_t i = 0; i < shape_define->handles.size();i++)
|
||||
{
|
||||
office_element_ptr elm_h;
|
||||
create_element(L"draw", L"handle", elm_h, impl_->odf_context_);
|
||||
@ -2128,7 +2128,7 @@ bool odf_drawing_context::is_exist_content()
|
||||
|
||||
void odf_drawing_context::finalize(office_element_ptr & root_elm)//для привязки
|
||||
{
|
||||
for (int i=0; i< impl_->tops_elements_.size(); i++)
|
||||
for (size_t i=0; i< impl_->tops_elements_.size(); i++)
|
||||
{
|
||||
root_elm->add_child_element(impl_->tops_elements_[i]);
|
||||
}
|
||||
@ -2144,7 +2144,7 @@ void odf_drawing_context::set_text(odf_text_context* text_context)
|
||||
{
|
||||
if (text_context == NULL || impl_->current_level_.size() <1 )return;
|
||||
|
||||
for (long i=0; i< text_context->text_elements_list_.size(); i++)
|
||||
for (size_t i = 0; i < text_context->text_elements_list_.size(); i++)
|
||||
{
|
||||
if (text_context->text_elements_list_[i].level ==0)
|
||||
{
|
||||
|
||||
@ -56,7 +56,7 @@ void odf_lists_styles_context::set_odf_context(odf_conversion_context * Context)
|
||||
|
||||
void odf_lists_styles_context::process_styles(office_element_ptr root )
|
||||
{
|
||||
for (long i=0; i< lists_format_array_.size(); i++)
|
||||
for (size_t i = 0; i < lists_format_array_.size(); i++)
|
||||
{
|
||||
if (lists_format_array_[i].elements.size() < 1) continue;
|
||||
|
||||
@ -70,7 +70,7 @@ void odf_lists_styles_context::add_style(int style_num, int based_num)
|
||||
|
||||
std::wstring style_name;
|
||||
|
||||
for (long i=0 ; i < lists_format_array_.size(); i++)
|
||||
for (size_t i = 0 ; i < lists_format_array_.size(); i++)
|
||||
{
|
||||
if (lists_format_array_[i].oox_based_number == based_num)
|
||||
{
|
||||
@ -81,7 +81,7 @@ void odf_lists_styles_context::add_style(int style_num, int based_num)
|
||||
}
|
||||
std::wstring odf_lists_styles_context::get_style_name1(int oox_style_num)
|
||||
{
|
||||
for (long i=0 ; i < lists_format_array_.size(); i++)
|
||||
for (size_t i=0 ; i < lists_format_array_.size(); i++)
|
||||
{
|
||||
if (lists_format_array_[i].oox_based_number == oox_style_num)
|
||||
{
|
||||
|
||||
@ -142,7 +142,7 @@ void odf_notes_context::end_note_content()
|
||||
|
||||
int odf_notes_context::find_by_id(int oox_id, int type)
|
||||
{
|
||||
for (int i=0; i < impl_->notes_.size(); i++)
|
||||
for (size_t i=0; i < impl_->notes_.size(); i++)
|
||||
{
|
||||
if (impl_->notes_[i].oox_id == oox_id &&
|
||||
impl_->notes_[i].type == type)
|
||||
@ -155,7 +155,7 @@ int odf_notes_context::find_by_id(int oox_id, int type)
|
||||
}
|
||||
std::wstring odf_notes_context::find_name_by_id(int oox_id, int type)
|
||||
{
|
||||
for (int i=0; i < impl_->notes_.size(); i++)
|
||||
for (size_t i=0; i < impl_->notes_.size(); i++)
|
||||
{
|
||||
if (impl_->notes_[i].oox_id == oox_id &&
|
||||
impl_->notes_[i].type == type)
|
||||
|
||||
@ -362,7 +362,7 @@ number_format_state & odf_number_styles_context::add_or_find(int oox_num_fmt, st
|
||||
|
||||
void odf_number_styles_context::process_styles(office_element_ptr root )
|
||||
{
|
||||
for (long i=0; i< number_format_array_.size(); i++)
|
||||
for (size_t i=0; i< number_format_array_.size(); i++)
|
||||
{
|
||||
create_style(number_format_array_[i]);
|
||||
|
||||
@ -432,7 +432,7 @@ void odf_number_styles_context::create_numbers(number_format_state & state, offi
|
||||
|
||||
boost::algorithm::split(numbers, str1, boost::algorithm::is_any_of(L".,"), boost::algorithm::token_compress_on);
|
||||
int ind=1;//
|
||||
for (long i=0;i<numbers.size();i++)
|
||||
for (size_t i = 0;i < numbers.size(); i++)
|
||||
{
|
||||
if (numbers[i].length()<1)continue;
|
||||
if (ind==1)min_digit= numbers[i].length();
|
||||
|
||||
@ -106,7 +106,7 @@ void odf_page_layout_context::add_master_page(std::wstring page_name)
|
||||
|
||||
void odf_page_layout_context::process_master_styles(office_element_ptr root )
|
||||
{
|
||||
for (long i =0; i < master_state_list_.size(); i++)
|
||||
for (size_t i =0 ; i < master_state_list_.size(); i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -532,7 +532,7 @@ void odf_page_layout_context::set_pages_mirrored(bool val)
|
||||
{
|
||||
//for all
|
||||
|
||||
for (long i=0; i < layout_state_list_.size(); i++)
|
||||
for (size_t i = 0; i < layout_state_list_.size(); i++)
|
||||
{
|
||||
layout_state_list_[i].set_pages_mirrored(val);
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ style_page_layout_properties *odf_layout_state::get_properties()
|
||||
{
|
||||
style_page_layout_properties *result=NULL;
|
||||
|
||||
for (long i= 1; i<elements_.size(); i++)//"0" - root
|
||||
for (size_t i= 1; i<elements_.size(); i++)//"0" - root
|
||||
{
|
||||
result = dynamic_cast<style_page_layout_properties *>(elements_[i].elm.get());
|
||||
if (result) return result;
|
||||
@ -185,7 +185,7 @@ style_page_layout_properties *odf_layout_state::get_properties()
|
||||
|
||||
style_header_footer_properties *odf_layout_state::get_header_properties()
|
||||
{
|
||||
for (long i = 1; i < elements_.size(); i++)//"0" - root
|
||||
for (size_t i = 1; i < elements_.size(); i++)//"0" - root
|
||||
{
|
||||
style_header_style *style_ = dynamic_cast<style_header_style *>(elements_[i].elm.get());
|
||||
if (style_)
|
||||
@ -197,7 +197,7 @@ style_header_footer_properties *odf_layout_state::get_header_properties()
|
||||
}
|
||||
style_header_footer_properties *odf_layout_state::get_footer_properties()
|
||||
{
|
||||
for (long i = 1; i < elements_.size(); i++)//"0" - root
|
||||
for (size_t i = 1; i < elements_.size(); i++)//"0" - root
|
||||
{
|
||||
style_footer_style *style_ = dynamic_cast<style_footer_style *>(elements_[i].elm.get());
|
||||
if (style_)
|
||||
|
||||
@ -142,7 +142,7 @@ void odf_settings_context::process_office_settings(office_element_ptr root )
|
||||
if (item_map_indexed) item_map_indexed->config_name_ = L"Views";
|
||||
}
|
||||
|
||||
for (int v = 0 ; v < views_.size(); v++)
|
||||
for (size_t v = 0 ; v < views_.size(); v++)
|
||||
{
|
||||
office_element_ptr views_entry_elm;
|
||||
{
|
||||
@ -150,7 +150,7 @@ void odf_settings_context::process_office_settings(office_element_ptr root )
|
||||
views_elm->add_child_element(views_entry_elm);
|
||||
}
|
||||
|
||||
for (int i = 0; i < views_[v].content.size(); i++)
|
||||
for (size_t i = 0; i < views_[v].content.size(); i++)
|
||||
{
|
||||
views_entry_elm->add_child_element(views_[v].content[i]);
|
||||
}
|
||||
@ -164,7 +164,7 @@ void odf_settings_context::process_office_settings(office_element_ptr root )
|
||||
item_map_named= dynamic_cast<settings_config_item_map_named*>(tables_elm.get());
|
||||
if (item_map_named) item_map_named->config_name_ = L"Tables";
|
||||
|
||||
for (int t = 0 ; t < views_[v].tables.size(); t++)
|
||||
for (size_t t = 0 ; t < views_[v].tables.size(); t++)
|
||||
{
|
||||
office_element_ptr table_elm;
|
||||
create_element(L"config", L"config-item-map-entry", table_elm, odf_context_);
|
||||
@ -173,7 +173,7 @@ void odf_settings_context::process_office_settings(office_element_ptr root )
|
||||
item_map_entry= dynamic_cast<settings_config_item_map_entry*>(table_elm.get());
|
||||
if (item_map_entry) item_map_entry->config_name_ = views_[v].tables[t].name;
|
||||
|
||||
for (int j = 0; j < views_[v].tables[t].content.size(); j++)
|
||||
for (size_t j = 0; j < views_[v].tables[t].content.size(); j++)
|
||||
{
|
||||
table_elm->add_child_element(views_[v].tables[t].content[j]);
|
||||
}
|
||||
@ -190,7 +190,7 @@ void odf_settings_context::process_office_settings(office_element_ptr root )
|
||||
item_set = dynamic_cast<settings_config_item_set*>(ooo_config_elm.get());
|
||||
if (item_set) item_set->config_name_ = L"ooo:configuration-settings";
|
||||
|
||||
for (int j = 0; j < config_content_.size(); j++)
|
||||
for (size_t j = 0; j < config_content_.size(); j++)
|
||||
{
|
||||
ooo_config_elm->add_child_element(config_content_[j]);
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ void odf_style_context::set_odf_context(odf_conversion_context * Context)
|
||||
|
||||
odf_style_state_ptr odf_style_context::last_state(style_family::type family)
|
||||
{
|
||||
for (long i = style_state_list_.size()-1; i>=0; i--)
|
||||
for (size_t i = style_state_list_.size()-1; i>=0; i--)
|
||||
{
|
||||
if (style_state_list_[i]->get_family_type() == family || family == style_family::None )
|
||||
{
|
||||
@ -144,7 +144,7 @@ void odf_style_context::reset_defaults()
|
||||
|
||||
void odf_style_context::process_automatic_for_styles(office_element_ptr root )
|
||||
{//автоматические стили для эементнов стилей
|
||||
for (long i =0; i < style_state_list_.size(); i++)
|
||||
for (size_t i =0; i < style_state_list_.size(); i++)
|
||||
{
|
||||
if (style_state_list_[i]->writable_ == false) continue;
|
||||
|
||||
@ -154,7 +154,7 @@ void odf_style_context::process_automatic_for_styles(office_element_ptr root )
|
||||
}
|
||||
void odf_style_context::process_automatic_styles(office_element_ptr root )
|
||||
{//автоматические стили для элементов
|
||||
for (long i =0; i < style_state_list_.size(); i++)
|
||||
for (size_t i =0; i < style_state_list_.size(); i++)
|
||||
{
|
||||
if (style_state_list_[i]->writable_ == false) continue;
|
||||
|
||||
@ -167,7 +167,7 @@ void odf_style_context::process_office_styles(office_element_ptr root )
|
||||
{
|
||||
number_styles_context_.process_styles(root );
|
||||
|
||||
for (long i =0; i < style_state_list_.size(); i++)
|
||||
for (size_t i =0; i < style_state_list_.size(); i++)
|
||||
{
|
||||
if (style_state_list_[i]->writable_ == false) continue;
|
||||
|
||||
@ -179,7 +179,7 @@ void odf_style_context::process_office_styles(office_element_ptr root )
|
||||
}
|
||||
std::wstring odf_style_context::find_odf_style_name(int oox_id_style, style_family::type family, bool root, bool automatic)
|
||||
{
|
||||
for (long i =0; i < style_state_list_.size(); i++)
|
||||
for (size_t i =0; i < style_state_list_.size(); i++)
|
||||
{
|
||||
if (style_state_list_[i]->odf_style_)
|
||||
{
|
||||
@ -199,7 +199,7 @@ std::wstring odf_style_context::find_odf_style_name(int oox_id_style, style_fami
|
||||
//office_element_ptr odf_style_context::find_odf_style(int oox_id_style, style_family::type family, bool root, _CP_OPT(bool) automatic)
|
||||
//{
|
||||
// //for (std::list<odf_style_state>::iterator it = style_state_list_.begin(); it != style_state_list_.end(); it++)
|
||||
// for (int i=0;i<style_state_list_.size(); i++)
|
||||
// for (size_t i=0;i<style_state_list_.size(); i++)
|
||||
// {
|
||||
// if (style_state_list_[i]->odf_style_)
|
||||
// {
|
||||
@ -218,7 +218,7 @@ std::wstring odf_style_context::find_odf_style_name(int oox_id_style, style_fami
|
||||
//}
|
||||
std::wstring odf_style_context::find_conditional_style_name(int oox_id_style, style_family::type family)
|
||||
{
|
||||
for (long i =0; i < style_state_list_.size(); i++)
|
||||
for (size_t i =0; i < style_state_list_.size(); i++)
|
||||
{
|
||||
if (style_state_list_[i]->odf_style_)
|
||||
{
|
||||
@ -235,7 +235,7 @@ std::wstring odf_style_context::find_conditional_style_name(int oox_id_style, st
|
||||
}
|
||||
office_element_ptr odf_style_context::find_conditional_style(int oox_id_style, style_family::type family)
|
||||
{
|
||||
for (int i=0;i<style_state_list_.size(); i++)
|
||||
for (size_t i = 0; i < style_state_list_.size(); i++)
|
||||
{
|
||||
if (style_state_list_[i]->odf_style_)
|
||||
{
|
||||
@ -252,7 +252,7 @@ office_element_ptr odf_style_context::find_conditional_style(int oox_id_style, s
|
||||
}
|
||||
bool odf_style_context::find_odf_style_state(int oox_id_style, style_family::type family, odf_style_state_ptr & state, bool root, bool automatic)
|
||||
{
|
||||
for (int i=0;i<style_state_list_.size(); i++)
|
||||
for (size_t i = 0; i < style_state_list_.size(); i++)
|
||||
{
|
||||
if (style_state_list_[i]->odf_style_)
|
||||
{
|
||||
@ -275,7 +275,7 @@ bool odf_style_context::find_odf_style_state(int oox_id_style, style_family::typ
|
||||
}
|
||||
bool odf_style_context::find_odf_default_style_state(style_family::type family, odf_style_state_ptr & state)
|
||||
{
|
||||
for (int i=0;i<style_state_list_.size(); i++)
|
||||
for (size_t i=0;i<style_state_list_.size(); i++)
|
||||
{
|
||||
if (style_state_list_[i]->default_ == false) continue;
|
||||
|
||||
@ -290,7 +290,7 @@ bool odf_style_context::find_odf_default_style_state(style_family::type family,
|
||||
|
||||
bool odf_style_context::find_odf_style_state(std::wstring style_name, style_family::type family, odf_style_state_ptr & state)
|
||||
{
|
||||
for (int i=0;i<style_state_list_.size(); i++)
|
||||
for (size_t i = 0; i < style_state_list_.size(); i++)
|
||||
{
|
||||
if (style_state_list_[i]->odf_style_)
|
||||
{
|
||||
@ -308,7 +308,7 @@ bool odf_style_context::find_odf_style_state(std::wstring style_name, style_fami
|
||||
|
||||
bool odf_style_context::find_odf_style(std::wstring style_name, style_family::type family, style *& style_)
|
||||
{
|
||||
for (int i=0;i<style_state_list_.size(); i++)
|
||||
for (size_t i = 0; i < style_state_list_.size(); i++)
|
||||
{
|
||||
if (style_state_list_[i]->odf_style_)
|
||||
{
|
||||
@ -325,7 +325,7 @@ bool odf_style_context::find_odf_style(std::wstring style_name, style_family::ty
|
||||
}
|
||||
office_element_ptr odf_style_context::find_odf_style_default(style_family::type family)
|
||||
{
|
||||
for (int i=0; i < current_default_styles_.size(); i++)
|
||||
for (size_t i=0; i < current_default_styles_.size(); i++)
|
||||
{
|
||||
if (current_default_styles_[i]->odf_style_)
|
||||
{
|
||||
@ -336,7 +336,7 @@ office_element_ptr odf_style_context::find_odf_style_default(style_family::type
|
||||
}
|
||||
std::wstring odf_style_context::find_odf_style_name_default(style_family::type family)
|
||||
{
|
||||
for (int i = 0; i < current_default_styles_.size(); i++)
|
||||
for (size_t i = 0; i < current_default_styles_.size(); i++)
|
||||
{
|
||||
if (current_default_styles_[i]->odf_style_)
|
||||
{
|
||||
@ -390,7 +390,7 @@ std::wstring odf_style_context::find_free_name(style_family::type family)
|
||||
int count = style_family_counts_[(int)family];
|
||||
|
||||
//доооолго .. проще хранить
|
||||
//for (int i=0;i<style_state_list_.size(); i++)
|
||||
//for (size_t i=0;i<style_state_list_.size(); i++)
|
||||
//{
|
||||
// if ((style_state_list_[i]->odf_style_) && (style_state_list_[i]->get_family_type() == family))
|
||||
// {
|
||||
@ -402,7 +402,7 @@ std::wstring odf_style_context::find_free_name(style_family::type family)
|
||||
}
|
||||
office_element_ptr & odf_style_context::add_or_find(std::wstring name, style_family::type family, bool automatic , bool root, int oox_id)
|
||||
{
|
||||
for (int i=0;i<style_state_list_.size(); i++)
|
||||
for (size_t i=0;i<style_state_list_.size(); i++)
|
||||
{
|
||||
if (style_state_list_[i]->odf_style_)
|
||||
{
|
||||
|
||||
@ -172,7 +172,7 @@ void odf_table_context::start_table(office_element_ptr &elm, bool styled)
|
||||
void odf_table_context::end_table()
|
||||
{
|
||||
//последние объединенные по вертикали ячейки ..
|
||||
for (long i =0 ; i < impl_->current_table().columns.size(); i++)
|
||||
for (size_t i =0 ; i < impl_->current_table().columns.size(); i++)
|
||||
{
|
||||
impl_->current_table().current_column = i+1;
|
||||
set_cell_row_span_restart();
|
||||
|
||||
@ -283,7 +283,7 @@ std::wstring ods_table_state::get_column_default_cell_style(int column)
|
||||
{
|
||||
int curr=0;
|
||||
|
||||
for (int i=0; i < columns_.size(); i++)
|
||||
for (size_t i=0; i < columns_.size(); i++)
|
||||
{
|
||||
if (curr + columns_[i].repeated < column + 1)continue;
|
||||
else
|
||||
@ -400,7 +400,7 @@ bool ods_table_state::is_cell_comment()
|
||||
|
||||
int ods_table_state::is_cell_hyperlink(int col, int row)
|
||||
{
|
||||
for (long i=0; i< hyperlinks_.size();i++)
|
||||
for (size_t i=0; i < hyperlinks_.size();i++)
|
||||
{
|
||||
if (hyperlinks_[i].col == col && hyperlinks_[i].row == row)
|
||||
{
|
||||
@ -411,7 +411,7 @@ int ods_table_state::is_cell_hyperlink(int col, int row)
|
||||
}
|
||||
int ods_table_state::is_cell_comment(int col, int row, short repeate_col)
|
||||
{
|
||||
for (long i=0; i< comments_.size();i++)
|
||||
for (size_t i = 0; i < comments_.size(); i++)
|
||||
{
|
||||
if ((comments_[i].col < col+repeate_col && comments_[i].col >= col) && comments_[i].row == row)
|
||||
{
|
||||
@ -590,7 +590,7 @@ void ods_table_state::end_comment(odf_text_context *text_context)
|
||||
{
|
||||
if (text_context == NULL || comments_.size() <1 )return;
|
||||
|
||||
for (long i=0; i< text_context->text_elements_list_.size(); i++)
|
||||
for (size_t i = 0; i < text_context->text_elements_list_.size(); i++)
|
||||
{
|
||||
if (text_context->text_elements_list_[i].level ==0 && comments_.back().elm)
|
||||
{
|
||||
@ -739,7 +739,7 @@ void ods_table_state::add_or_find_cell_shared_formula(std::wstring & formula, st
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i=0; i<shared_formulas_.size() ;i++)
|
||||
for (size_t i = 0; i < shared_formulas_.size() ;i++)
|
||||
{
|
||||
if (shared_formulas_[i].index == ind)
|
||||
{
|
||||
@ -825,7 +825,7 @@ void ods_table_state::add_child_element( const office_element_ptr & child_elemen
|
||||
void ods_table_state::convert_position(oox_table_position & oox_pos, double & x, double & y)//c 0 отсчет
|
||||
{
|
||||
double sz_col=0;
|
||||
int curr_col = 0,i;
|
||||
size_t curr_col = 0, i;
|
||||
|
||||
for (i = 0; i < columns_.size(); i++)
|
||||
{
|
||||
@ -850,7 +850,8 @@ void ods_table_state::convert_position(oox_table_position & oox_pos, double & x,
|
||||
x = sz_col + oox_pos.col_off;
|
||||
|
||||
double sz_row=0;
|
||||
int curr_row =0;
|
||||
|
||||
size_t curr_row =0 ;
|
||||
for (i = 0; i < rows_.size(); i++)
|
||||
{
|
||||
if (oox_pos.row > rows_[i].repeated + curr_row)
|
||||
@ -880,7 +881,7 @@ void ods_table_state::set_cell_text(odf_text_context* text_context, bool cash_va
|
||||
{
|
||||
if (text_context == NULL)return;
|
||||
|
||||
for (long i=0; i< text_context->text_elements_list_.size(); i++)
|
||||
for (size_t i = 0; i< text_context->text_elements_list_.size(); i++)
|
||||
{
|
||||
if (text_context->text_elements_list_[i].level ==0)
|
||||
{
|
||||
|
||||
@ -117,14 +117,14 @@ void odt_conversion_context::start_document()
|
||||
void odt_conversion_context::end_document()
|
||||
{
|
||||
//add sections to root
|
||||
for (long i=0; i< sections_.size(); i++)
|
||||
for (size_t i = 0; i< sections_.size(); i++)
|
||||
{
|
||||
root_document_->add_child_element(sections_[i].elm);
|
||||
}
|
||||
sections_.clear();
|
||||
|
||||
//add last elements to root
|
||||
for (long i=0; i< current_root_elements_.size(); i++)
|
||||
for (size_t i = 0; i< current_root_elements_.size(); i++)
|
||||
{
|
||||
root_document_->add_child_element(current_root_elements_[i].elm);
|
||||
}
|
||||
@ -246,7 +246,7 @@ void odt_conversion_context::end_drawings()
|
||||
bool bSet = false;
|
||||
if (( anchor == anchor_type::Page || anchor == anchor_type::Paragraph) || (is_header_ || is_footer_))
|
||||
{
|
||||
for (long i = text_context()->current_level_.size()-1; i>=0; i--)
|
||||
for (long i = (long)text_context()->current_level_.size() - 1 ; i>=0; i--)
|
||||
{
|
||||
text_p *p = dynamic_cast<text_p*>(text_context()->current_level_[i].elm.get());
|
||||
text_h *h = dynamic_cast<text_h*>(text_context()->current_level_[i].elm.get());
|
||||
@ -513,7 +513,7 @@ void odt_conversion_context::add_section_column(std::vector<std::pair<double,dou
|
||||
if (!columns)return;
|
||||
|
||||
double width_all = 0;
|
||||
for (int i = 0; i < width_space.size() ; i++)
|
||||
for (size_t i = 0; i < width_space.size() ; i++)
|
||||
{
|
||||
if (width_space[i].first >= 0)
|
||||
|
||||
@ -527,7 +527,7 @@ void odt_conversion_context::add_section_column(std::vector<std::pair<double,dou
|
||||
|
||||
section_properties->style_editable_ = false;
|
||||
|
||||
for (int i = 0; i < width_space.size() && width_all > 0 ; i++)
|
||||
for (size_t i = 0; i < width_space.size() && width_all > 0 ; i++)
|
||||
{
|
||||
office_element_ptr col_elm;
|
||||
|
||||
@ -634,7 +634,7 @@ void odt_conversion_context::flush_section()
|
||||
{
|
||||
if (sections_.size() > 0 && sections_.back().empty)
|
||||
{
|
||||
for (long i=0; i< current_root_elements_.size(); i++)
|
||||
for (size_t i=0; i< current_root_elements_.size(); i++)
|
||||
{
|
||||
if ((sections_.back().continuous && i < 2) || !sections_.back().continuous)
|
||||
// при вставлении параграфа возможен искусственный разрыв в параграфах - см add_page_break
|
||||
|
||||
@ -269,7 +269,7 @@ void text_span::add_child_element( const office_element_ptr & child_element)
|
||||
void text_span::add_text(const std::wstring & Text)
|
||||
{
|
||||
int bSpace = true;
|
||||
for (int i = 0 ; i < Text.size() ; i++)
|
||||
for (size_t i = 0 ; i < Text.size() ; i++)
|
||||
{
|
||||
if (Text[i] != 0x20)
|
||||
{
|
||||
@ -306,7 +306,7 @@ void text_a::serialize(std::wostream & _Wostream)
|
||||
CP_XML_ATTR_OPT(L"text:style-name", text_style_name_);
|
||||
CP_XML_ATTR_OPT(L"text:visited-style-name", text_visited_style_name_);
|
||||
|
||||
for (int i = 0; i < paragraph_content_.size(); i++)
|
||||
for (size_t i = 0; i < paragraph_content_.size(); i++)
|
||||
{
|
||||
paragraph_content_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
@ -358,7 +358,7 @@ void text_note_citation::serialize(std::wostream & _Wostream)
|
||||
{
|
||||
CP_XML_ATTR_OPT(L"text:label", text_label_);
|
||||
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
@ -386,7 +386,7 @@ void text_note_body::serialize(std::wostream & _Wostream)
|
||||
{
|
||||
CP_XML_NODE_SIMPLE()
|
||||
{
|
||||
for (int i = 0; i < content_.size(); i++)
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ void text_list_style::serialize(std::wostream & strm)
|
||||
{
|
||||
text_list_style_attr_.serialize(CP_GET_XML_NODE());
|
||||
|
||||
for (int i = 0; i < text_list_style_content_.size(); i++)
|
||||
for (size_t i = 0; i < text_list_style_content_.size(); i++)
|
||||
{
|
||||
if (text_list_style_content_[i])
|
||||
text_list_style_content_[i]->serialize(CP_XML_STREAM());
|
||||
|
||||
@ -578,7 +578,7 @@ public:
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
int get_count(){return content_.size();}//временно .. для группировок
|
||||
int get_count(){return (int)content_.size();}//временно .. для группировок
|
||||
|
||||
office_element_ptr_array content_;
|
||||
//int type_;
|
||||
|
||||
@ -80,7 +80,7 @@ void table_database_ranges::serialize(std::wostream & _Wostream)
|
||||
{
|
||||
CP_XML_NODE_SIMPLE()
|
||||
{
|
||||
for (int i = 0; i < database_ranges_.size(); i++)
|
||||
for (size_t i = 0; i < database_ranges_.size(); i++)
|
||||
{
|
||||
database_ranges_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
|
||||
@ -88,11 +88,11 @@ void table_named_expressions::serialize(std::wostream & _Wostream)
|
||||
{
|
||||
CP_XML_NODE_SIMPLE()
|
||||
{
|
||||
for (int i = 0; i < named_expression_.size(); i++)
|
||||
for (size_t i = 0; i < named_expression_.size(); i++)
|
||||
{
|
||||
named_expression_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
for (int i = 0; i < named_range_.size(); i++)
|
||||
for (size_t i = 0; i < named_range_.size(); i++)
|
||||
{
|
||||
named_range_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
|
||||
@ -272,7 +272,7 @@ void text_section::serialize(std::wostream & _Wostream)
|
||||
if (text_section_source_)
|
||||
text_section_source_->serialize(CP_XML_STREAM());
|
||||
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
@ -321,7 +321,7 @@ void text_index_body::serialize(std::wostream & _Wostream)
|
||||
{
|
||||
CP_XML_NODE_SIMPLE()
|
||||
{
|
||||
for (int i = 0 ; i < index_content_main_.size(); i++)
|
||||
for (size_t i = 0 ; i < index_content_main_.size(); i++)
|
||||
{
|
||||
index_content_main_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
@ -350,7 +350,7 @@ void text_index_title::serialize(std::wostream & _Wostream)
|
||||
{
|
||||
CP_XML_NODE_SIMPLE()
|
||||
{
|
||||
for (int i = 0 ; i < index_content_main_.size(); i++)
|
||||
for (size_t i = 0 ; i < index_content_main_.size(); i++)
|
||||
{
|
||||
index_content_main_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
@ -426,7 +426,7 @@ void text_tracked_changes::serialize(std::wostream & _Wostream)
|
||||
{
|
||||
CP_XML_NODE_SIMPLE()
|
||||
{
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->serialize (CP_XML_STREAM());
|
||||
}
|
||||
@ -446,7 +446,7 @@ void text_insertion::serialize(std::wostream & _Wostream)
|
||||
if (office_change_info_)
|
||||
office_change_info_->serialize(CP_XML_STREAM());
|
||||
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
@ -466,7 +466,7 @@ void text_deletion::serialize(std::wostream & _Wostream)
|
||||
if (office_change_info_)
|
||||
office_change_info_->serialize(CP_XML_STREAM());
|
||||
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
@ -489,7 +489,7 @@ void text_format_change::serialize(std::wostream & _Wostream)
|
||||
if (office_change_info_)
|
||||
office_change_info_->serialize(CP_XML_STREAM());
|
||||
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
@ -525,7 +525,7 @@ void text_unknown_change::serialize(std::wostream & _Wostream)
|
||||
if (office_change_info_)
|
||||
office_change_info_->serialize(CP_XML_STREAM());
|
||||
|
||||
for (int i = 0 ; i < content_.size(); i++)
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
|
||||
@ -380,7 +380,7 @@ public:
|
||||
OOX::Spreadsheet::IFileContainer *oox_current_child_document_spreadsheet;
|
||||
OOX::IFileContainer *oox_current_child_document;
|
||||
|
||||
void convert (double oox_font_size, cpdoccore::_CP_OPT(cpdoccore::odf_types::font_size) & odf_font_size);
|
||||
void convert (double oox_font_size, _CP_OPT(cpdoccore::odf_types::font_size) & odf_font_size);
|
||||
bool convert (int indexSchemeColor, BYTE& ucA, BYTE& ucG, BYTE& ucB, BYTE& ucR);
|
||||
//.......................................................................................................................
|
||||
void convert(OOX::WritingElement *oox_unknown);
|
||||
@ -418,10 +418,10 @@ public:
|
||||
void convert(OOX::Drawing::CPath2DQuadBezierTo *oox_geom_path);
|
||||
void convert(OOX::Drawing::CPath2DCubicBezierTo *oox_geom_path);
|
||||
void convert(OOX::Drawing::CPath2DClose *oox_geom_path);
|
||||
void convert(OOX::Drawing::CColor *oox_color, std::wstring & hexColor , cpdoccore::_CP_OPT(double) &opacity);
|
||||
void convert(OOX::Drawing::CSchemeColor *oox_ShemeClr, std::wstring & hexString, cpdoccore::_CP_OPT(double) &opacity);
|
||||
void convert(OOX::Drawing::Colors::CColorTransform *oox_ScrgbClr, std::wstring & hexString, cpdoccore::_CP_OPT(double) &opacity);
|
||||
void convert(OOX::Drawing::CSolidColorFillProperties *oox_solid_fill,std::wstring & hexColor , cpdoccore::_CP_OPT(double) &opacity);
|
||||
void convert(OOX::Drawing::CColor *oox_color, std::wstring & hexColor , _CP_OPT(double) &opacity);
|
||||
void convert(OOX::Drawing::CSchemeColor *oox_ShemeClr, std::wstring & hexString, _CP_OPT(double) &opacity);
|
||||
void convert(OOX::Drawing::Colors::CColorTransform *oox_ScrgbClr, std::wstring & hexString, _CP_OPT(double) &opacity);
|
||||
void convert(OOX::Drawing::CSolidColorFillProperties *oox_solid_fill,std::wstring & hexColor , _CP_OPT(double) &opacity);
|
||||
|
||||
void convert(OOX::Drawing::CParagraph *oox_paragraph);
|
||||
void convert(OOX::Drawing::CParagraphProperty *oox_paragraph_pr, cpdoccore::odf_writer::style_paragraph_properties * paragraph_properties);
|
||||
@ -446,7 +446,7 @@ public:
|
||||
void convert(PPTX::Logic::PathBase *oox_path);
|
||||
void convert(PPTX::Logic::BodyPr *oox_bodyPr);
|
||||
void convert(PPTX::Logic::UniFill *oox_fill, PPTX::Logic::ShapeStyle* oox_sp_style = NULL);
|
||||
void convert(PPTX::Logic::UniColor *color, std::wstring & hexString, cpdoccore::_CP_OPT(double) & opacity);
|
||||
void convert(PPTX::Logic::UniColor *color, std::wstring & hexString, _CP_OPT(double) & opacity);
|
||||
void convert(PPTX::Logic::NvSpPr *oox_nvSpPr);
|
||||
void convert(PPTX::Logic::CNvPr *oox_cnvPr);
|
||||
void convert(PPTX::Logic::CNvSpPr *oox_cnvSpPr);
|
||||
|
||||
@ -124,10 +124,9 @@ static void GetColorWithEffect(const std::wstring& sColor, const int& R, const i
|
||||
}
|
||||
else if (0 == sColor.find(L"blackwhite"))
|
||||
{
|
||||
int nparam = (int)nparam;
|
||||
resR = (R < nparam) ? 0 : 255;
|
||||
resG = (G < nparam) ? 0 : 255;
|
||||
resB = (B < nparam) ? 0 : 255;
|
||||
resR = (R < (int)param) ? 0 : 255;
|
||||
resG = (G < (int)param) ? 0 : 255;
|
||||
resB = (B < (int)param) ? 0 : 255;
|
||||
isEffect = true;
|
||||
}
|
||||
|
||||
@ -148,7 +147,7 @@ namespace NS_DWC_Common
|
||||
{
|
||||
void CorrentCropString(std::wstring& s)
|
||||
{
|
||||
int nLen = s.length();
|
||||
size_t nLen = s.length();
|
||||
if (nLen > 0 && (s[nLen - 1] == ((wchar_t)'f')))
|
||||
{
|
||||
s.erase(nLen - 1);
|
||||
@ -280,7 +279,7 @@ namespace NS_DWC_Common
|
||||
{
|
||||
std::wstring str;
|
||||
|
||||
int pos = colorStr.find(' ');
|
||||
int pos = (int)colorStr.find(' ');
|
||||
if( pos < 0 )
|
||||
str = colorStr;
|
||||
else
|
||||
@ -544,7 +543,7 @@ namespace PPTX
|
||||
{
|
||||
// здесь не будем плодить тормозов - напишем без всяких Mid, Find, чтобы был только один проход
|
||||
wchar_t* pData = (wchar_t*)strParams.c_str();
|
||||
int nCount = strParams.length();
|
||||
int nCount = (int) strParams.length();
|
||||
|
||||
int nPosition = 0;
|
||||
wchar_t* pDataMem = pData;
|
||||
@ -598,7 +597,7 @@ namespace PPTX
|
||||
|
||||
// здесь не будем плодить тормозов - напишем без всяких Mid, Find, чтобы был только один проход
|
||||
wchar_t* pData = (wchar_t*)strParams.c_str();
|
||||
int nCount = strParams.length();
|
||||
int nCount = (int) strParams.length();
|
||||
|
||||
int nPosition = 0;
|
||||
wchar_t* pDataMem = pData;
|
||||
@ -677,7 +676,7 @@ namespace PPTX
|
||||
|
||||
// здесь не будем плодить тормозов - напишем без всяких Mid, Find, чтобы был только один проход
|
||||
wchar_t* pData = (wchar_t*)strParams.c_str();
|
||||
int nCount = strParams.length();
|
||||
int nCount = (int) strParams.length();
|
||||
|
||||
int nPosition = 0;
|
||||
wchar_t* pDataMem = pData;
|
||||
@ -754,7 +753,7 @@ namespace PPTX
|
||||
Clear();
|
||||
|
||||
wchar_t* pData = (wchar_t*)strParams.c_str();
|
||||
int nCount = strParams.length();
|
||||
int nCount = (int) strParams.length();
|
||||
|
||||
int nPosition = 0;
|
||||
int nPositionOld = 0;
|
||||
@ -1088,12 +1087,6 @@ PPTX::Logic::SpTreeElem CDrawingConverter::ObjectFromXml(const std::wstring& sXm
|
||||
std::wstring strVMLShapeXml = GetVMLShapeXml(oElem);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (strCurrentRelsPath != m_strCurrentRelsPath)
|
||||
{
|
||||
m_strCurrentRelsPath = strCurrentRelsPath;
|
||||
SetCurrentRelsPath();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1318,7 +1311,7 @@ std::wstring CDrawingConverter::ObjectToDrawingML(const std::wstring& sXml, LONG
|
||||
std::wstring strMainProps = *pMainProps;
|
||||
std::wstring strMainPropsTail;
|
||||
|
||||
int nIndexF = strMainProps.find(L"</wp:inline>");
|
||||
int nIndexF = (int)strMainProps.find(L"</wp:inline>");
|
||||
if (-1 != nIndexF)
|
||||
{
|
||||
bIsInline = true;
|
||||
@ -1326,7 +1319,7 @@ std::wstring CDrawingConverter::ObjectToDrawingML(const std::wstring& sXml, LONG
|
||||
}
|
||||
else
|
||||
{
|
||||
nIndexF = strMainProps.find(L"</wp:anchor>");
|
||||
nIndexF = (int)strMainProps.find(L"</wp:anchor>");
|
||||
strMainProps = strMainProps.substr(0, nIndexF);
|
||||
}
|
||||
|
||||
@ -1336,7 +1329,7 @@ std::wstring CDrawingConverter::ObjectToDrawingML(const std::wstring& sXml, LONG
|
||||
return oXmlWriter.GetXmlString();
|
||||
}
|
||||
|
||||
int nIndexTail = strMainProps.find(L"<wp14:sizeRel");
|
||||
int nIndexTail = (int)strMainProps.find(L"<wp14:sizeRel");
|
||||
if(-1 != nIndexTail)
|
||||
{
|
||||
strMainPropsTail = strMainProps.substr( nIndexTail );
|
||||
@ -1791,7 +1784,7 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
|
||||
pDiagramData = dynamic_cast<OOX::CDiagramData*>(oFileData.operator->());
|
||||
if (pDiagramData)
|
||||
{
|
||||
for (int i = 0; (pDiagramData->m_oExtLst.IsInit()) && i < pDiagramData->m_oExtLst->m_arrExt.size(); i++)
|
||||
for (size_t i = 0; (pDiagramData->m_oExtLst.IsInit()) && i < pDiagramData->m_oExtLst->m_arrExt.size(); i++)
|
||||
{
|
||||
if (pDiagramData->m_oExtLst->m_arrExt[i]->m_oDataModelExt.IsInit())
|
||||
{
|
||||
@ -1810,7 +1803,7 @@ void CDrawingConverter::doc_LoadDiagram(PPTX::Logic::SpTreeElem *result, XmlUtil
|
||||
{
|
||||
OOX::CPath pathDiagramData = pDiagramData->m_strFilename;
|
||||
|
||||
int a1 = pathDiagramData.GetFilename().find(L".");
|
||||
int a1 = (int)pathDiagramData.GetFilename().find(L".");
|
||||
std::wstring strId = pathDiagramData.GetFilename().substr(4, pathDiagramData.GetFilename().length() - 8);
|
||||
|
||||
OOX::CPath pathDiagramDrawing = pathDiagramData.GetDirectory() + FILE_SEPARATOR_STR + L"drawing" + strId + L".xml";
|
||||
@ -1957,7 +1950,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
std::vector<std::wstring> oArray;
|
||||
boost::algorithm::split(oArray, strPoints, boost::algorithm::is_any_of(L","), boost::algorithm::token_compress_on);
|
||||
|
||||
int nSize = oArray.size();
|
||||
int nSize = (int)oArray.size();
|
||||
if ((nSize % 2 == 0) && nSize > 3)
|
||||
{
|
||||
int* _POINTS = new int[nSize];
|
||||
@ -2252,9 +2245,9 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
|
||||
int pos1 = 0, pos2 = 0;
|
||||
|
||||
while(pos1 < tmpString.length() && pos2 < tmpString.length())
|
||||
while(pos1 < (int)tmpString.length() && pos2 < (int)tmpString.length())
|
||||
{
|
||||
pos2 = tmpString.find(L"\n", pos1);
|
||||
pos2 = (int)tmpString.find(L"\n", pos1);
|
||||
if (pos2 > 0)
|
||||
{
|
||||
wordArtString.push_back(tmpString.substr(pos1, pos2 - pos1));
|
||||
@ -2422,9 +2415,9 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
std::vector<std::wstring> arSplit;
|
||||
boost::algorithm::split(arSplit, strColors, boost::algorithm::is_any_of(L";"), boost::algorithm::token_compress_on);
|
||||
|
||||
for (int i = 0 ; i < arSplit.size(); i++)
|
||||
for (size_t i = 0 ; i < arSplit.size(); i++)
|
||||
{
|
||||
int p = arSplit[i].find(L" ");
|
||||
int p = (int)arSplit[i].find(L" ");
|
||||
|
||||
std::wstring strPos = resToken.substr(0, p);
|
||||
std::wstring strColor = resToken.substr(p + 1);
|
||||
@ -2511,9 +2504,9 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
else if (eFillType == etGradFill)
|
||||
{
|
||||
strRPr += L"<w14:gradFill><w14:gsLst>";
|
||||
int nSize = arColors.size();
|
||||
bool bRevert = false;
|
||||
int nColorsLen = arColors.size();
|
||||
int nSize = (int)arColors.size();
|
||||
bool bRevert = false;
|
||||
int nColorsLen = (int)arColors.size();
|
||||
|
||||
int nDiff = nSize - 1;
|
||||
if (nFocus != 1 && nFocus != 0)
|
||||
@ -2553,7 +2546,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
if (nAngle != 90)
|
||||
dNewZero *= -1;
|
||||
|
||||
for (int i = 0; i < nColorsLen-1; i++)
|
||||
for (int i = 0; i < nColorsLen - 1; i++)
|
||||
{
|
||||
arColorsNew.push_back(arColors.at(i));
|
||||
|
||||
@ -2562,9 +2555,9 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
}
|
||||
|
||||
arColorsNew.push_back(arColors.at(nColorsLen - 1));
|
||||
arPosNew.push_back(dNewZero);
|
||||
arPosNew.push_back((int)dNewZero);
|
||||
|
||||
for (int i = nColorsLen-2; i >= 0; i--)
|
||||
for (int i = nColorsLen - 2; i >= 0; i--)
|
||||
{
|
||||
arColorsNew.push_back(arColors.at(i));
|
||||
|
||||
@ -2592,7 +2585,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < arColorsNew.size(); i++)
|
||||
for (size_t i = 0; i < arColorsNew.size(); i++)
|
||||
{
|
||||
int pos = arPosNew.at(i);
|
||||
std::wstring color = arColorsNew.at(i)->toXML();
|
||||
@ -2622,7 +2615,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
if (sStrokeWeight.is_init())
|
||||
{
|
||||
std::wstring strW(*sStrokeWeight);
|
||||
int p = strW.find(L"pt");
|
||||
int p = (int)strW.find(L"pt");
|
||||
if (p >= 0)
|
||||
strW.erase(p);
|
||||
|
||||
@ -3419,7 +3412,7 @@ std::wstring CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, P
|
||||
std::vector<std::wstring> arPoints;
|
||||
boost::algorithm::split(arPoints, strWrapPoints, boost::algorithm::is_any_of(L","), boost::algorithm::token_compress_on);
|
||||
|
||||
int nCountP = arPoints.size();
|
||||
int nCountP = (int)arPoints.size();
|
||||
if (nCountP > 1 && ((nCountP % 2) == 0))
|
||||
{
|
||||
strWrapPointsResult = L"<wp:wrapPolygon edited=\"1\">";
|
||||
@ -3701,7 +3694,7 @@ std::wstring CDrawingConverter::GetVMLShapeXml(CPPTShape* pPPTShape)
|
||||
strCoordSize = std::to_wstring(lCoordW) + L"," + std::to_wstring(lCoordH);
|
||||
oXmlWriter.WriteAttribute(L"coordsize", strCoordSize);
|
||||
|
||||
int nAdjCount = pPPTShape->m_arAdjustments.size();
|
||||
int nAdjCount = (int)pPPTShape->m_arAdjustments.size();
|
||||
if (nAdjCount > 0)
|
||||
{
|
||||
oXmlWriter.WriteString(L" adj=\"");
|
||||
@ -3726,7 +3719,7 @@ std::wstring CDrawingConverter::GetVMLShapeXml(CPPTShape* pPPTShape)
|
||||
oXmlWriter.EndAttributes();
|
||||
|
||||
std::vector<CFormula>& arGuides = pPPTShape->m_oManager.m_arFormulas;
|
||||
int nGuides = arGuides.size();
|
||||
int nGuides = (int)arGuides.size();
|
||||
if (nGuides != 0)
|
||||
{
|
||||
oXmlWriter.StartNode(L"v:formulas");
|
||||
@ -3820,7 +3813,7 @@ std::wstring CDrawingConverter::GetVMLShapeXml(CPPTShape* pPPTShape)
|
||||
oXmlWriter.WriteString(L"\"/>");
|
||||
}
|
||||
|
||||
int nHandles = pPPTShape->m_arHandles.size();
|
||||
int nHandles = (int)pPPTShape->m_arHandles.size();
|
||||
if (0 < nHandles)
|
||||
{
|
||||
oXmlWriter.StartNode(L"v:handles");
|
||||
@ -4603,7 +4596,7 @@ HRESULT CDrawingConverter::SaveObject(LONG lStart, LONG lLength, const std::wstr
|
||||
bool bIsInline = false;
|
||||
std::wstring strMainProps = bsMainProps;
|
||||
std::wstring strMainPropsTail;
|
||||
int nIndexF = strMainProps.find(L"</wp:inline>");
|
||||
int nIndexF = (int)strMainProps.find(L"</wp:inline>");
|
||||
if (-1 != nIndexF)
|
||||
{
|
||||
bIsInline = true;
|
||||
@ -4611,14 +4604,14 @@ HRESULT CDrawingConverter::SaveObject(LONG lStart, LONG lLength, const std::wstr
|
||||
}
|
||||
else
|
||||
{
|
||||
nIndexF = strMainProps.find(L"</wp:anchor>");
|
||||
nIndexF = (int)strMainProps.find(L"</wp:anchor>");
|
||||
strMainProps = strMainProps.substr(0, nIndexF);
|
||||
}
|
||||
|
||||
if (-1 == nIndexF)
|
||||
return S_FALSE;
|
||||
|
||||
int nIndexTail = strMainProps.find(L"<wp14:sizeRel");
|
||||
int nIndexTail = (int)strMainProps.find(L"<wp14:sizeRel");
|
||||
if(-1 != nIndexTail)
|
||||
{
|
||||
strMainPropsTail = strMainProps.substr( nIndexTail );
|
||||
@ -4943,7 +4936,7 @@ void CDrawingConverter::ConvertTextVML(XmlUtils::CXmlNode &nodeTextBox, PPTX::Lo
|
||||
{
|
||||
run->rPr = new PPTX::Logic::RunProperties();
|
||||
|
||||
for (long r = 0; r < attNames.size(); r++)
|
||||
for (size_t r = 0; r < attNames.size(); r++)
|
||||
{
|
||||
if (attNames[r] == L"color" && attValues[r].length() == 7)
|
||||
{
|
||||
@ -5465,7 +5458,7 @@ HRESULT CDrawingConverter::SaveDstContentRels(const std::wstring& bsRelsPath)
|
||||
|
||||
//if (-1 != m_pReader->m_nCurrentRelsStack)
|
||||
{
|
||||
int nIndex = m_pReader->m_stackRels.size() - 1;
|
||||
int nIndex = (int)m_pReader->m_stackRels.size() - 1;
|
||||
|
||||
if (0 <= nIndex)
|
||||
{
|
||||
|
||||
@ -563,8 +563,8 @@ private:
|
||||
public:
|
||||
COOXToVMLGeometry()
|
||||
{
|
||||
m_bIsFillPart = false;
|
||||
m_bIsStrokePart = false;
|
||||
m_bIsFillPart = false;
|
||||
m_bIsStrokePart = false;
|
||||
|
||||
m_dScaleX = 1.0;
|
||||
m_dScaleY = 1.0;
|
||||
|
||||
@ -134,7 +134,7 @@ namespace NSGuidesVML
|
||||
void ConvertHandles (std::vector<CHandle_>& arHnd)
|
||||
{
|
||||
|
||||
for (int nIndex=0; nIndex<arHnd.size(); nIndex++)
|
||||
for (size_t nIndex=0; nIndex<arHnd.size(); nIndex++)
|
||||
{
|
||||
CHandle_ oHandle;
|
||||
//TODO переименовать названия формул и прокинуть текстовые атрибуты topleft, rightbottom в полях хендла
|
||||
@ -399,7 +399,7 @@ namespace NSGuidesVML
|
||||
void ConvertGuides ( std::vector<NSGuidesOOXML::CFormula> &strGuides, std::map<std::wstring, long> &mapGuides )
|
||||
{
|
||||
//стандартные формулы для пптх будем добавлять, если только они встретятся
|
||||
for (int nIndex=32; nIndex < strGuides.size(); ++nIndex)
|
||||
for (size_t nIndex=32; nIndex < strGuides.size(); ++nIndex)
|
||||
{
|
||||
NSGuidesOOXML::CFormula pFormula = strGuides[nIndex];
|
||||
|
||||
|
||||
@ -260,7 +260,7 @@ namespace NSBinPptxRW
|
||||
m_oReader.Seek(pPair->second);
|
||||
m_oReader.Skip(6); // type + len + start attr
|
||||
|
||||
int index =0;
|
||||
size_t index =0;
|
||||
while (true)
|
||||
{
|
||||
BYTE _at = m_oReader.GetUChar_TypeNode();
|
||||
|
||||
@ -146,10 +146,11 @@ namespace PPTX
|
||||
{
|
||||
bool bIsDownload = false;
|
||||
std::wstring strFile = relation.Filename().GetPath();
|
||||
int n1 = strFile.find(_T("www"));
|
||||
int n2 = strFile.find(_T("http"));
|
||||
int n3 = strFile.find(_T("ftp"));
|
||||
int n4 = strFile.find(_T("https://"));
|
||||
|
||||
int n1 = (int)strFile.find(_T("www"));
|
||||
int n2 = (int)strFile.find(_T("http"));
|
||||
int n3 = (int)strFile.find(_T("ftp"));
|
||||
int n4 = (int)strFile.find(_T("https://"));
|
||||
|
||||
//если nI сранивать не с 0, то будут проблемы
|
||||
//потому что в инсталяции мы кладем файлы в /var/www...
|
||||
|
||||
@ -63,7 +63,7 @@ namespace PPTX
|
||||
long files = CountFiles(path);
|
||||
if(files == 0)
|
||||
return;
|
||||
m_lPercent = floor(1000000. / files);
|
||||
m_lPercent = (long)floor(1000000. / files);
|
||||
FileContainer::read(rels, path, map, Event);
|
||||
|
||||
long percent = Event->GetPercent();
|
||||
|
||||
@ -126,7 +126,7 @@ namespace PPTX
|
||||
|
||||
void Controls::AddObjectsTo (const std::vector<SpTreeElem> *spTreeElements, NSShapeImageGen::CImageManager* pImageManager) const
|
||||
{
|
||||
for (long i=0; i < arrControls.size(); ++i)
|
||||
for (size_t i=0; i < arrControls.size(); ++i)
|
||||
{
|
||||
if (arrControls[i].spid.IsInit() == false) continue;
|
||||
|
||||
|
||||
@ -127,6 +127,198 @@ namespace PPTX
|
||||
return XmlUtils::CreateNode(_T("p:sp"), oAttr, oValue);
|
||||
}
|
||||
|
||||
void Shape::toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_DOCX)
|
||||
pWriter->StartNode(_T("wps:wsp"));
|
||||
else if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_XLSX)
|
||||
pWriter->StartNode(_T("xdr:sp"));
|
||||
else
|
||||
pWriter->StartNode(_T("p:sp"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("useBgFill"), attrUseBgFill);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_DOCX)
|
||||
{
|
||||
//nvSpPr.cNvPr.toXmlWriter2(_T("wps"), pWriter);
|
||||
nvSpPr.cNvSpPr.toXmlWriter2(_T("wps"), pWriter);
|
||||
}
|
||||
else
|
||||
nvSpPr.toXmlWriter(pWriter);
|
||||
|
||||
bool bIsPresentStyle = false;
|
||||
if (style.is_init() && (style->fillRef.idx.is_init() || style->fillRef.Color.Color.is_init()))
|
||||
{
|
||||
bIsPresentStyle = true;
|
||||
}
|
||||
if (pWriter->m_lGroupIndex > 1 && !bIsPresentStyle)
|
||||
{
|
||||
pWriter->m_lFlag += 0x02;
|
||||
}
|
||||
spPr.toXmlWriter(pWriter);
|
||||
if (pWriter->m_lGroupIndex > 1 && !bIsPresentStyle)
|
||||
{
|
||||
pWriter->m_lFlag -= 0x02;
|
||||
}
|
||||
|
||||
if (style.is_init())
|
||||
{
|
||||
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_DOCX)
|
||||
style->m_ns = _T("wps");
|
||||
else if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_XLSX)
|
||||
style->m_ns = _T("xdr");
|
||||
|
||||
pWriter->Write(style);
|
||||
}
|
||||
|
||||
if (pWriter->m_lDocType != XMLWRITER_DOC_TYPE_DOCX)
|
||||
{
|
||||
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_XLSX && txBody.is_init())
|
||||
txBody->m_ns = _T("xdr");
|
||||
pWriter->Write(txBody);
|
||||
}
|
||||
|
||||
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_DOCX)
|
||||
{
|
||||
bool bIsWritedBodyPr = false;
|
||||
if (TextBoxShape.is_init())
|
||||
{
|
||||
pWriter->WriteString(_T("<wps:txbx>"));
|
||||
pWriter->WriteString(*TextBoxShape);
|
||||
pWriter->WriteString(_T("</wps:txbx>"));
|
||||
|
||||
if (TextBoxBodyPr.is_init())
|
||||
{
|
||||
TextBoxBodyPr->m_namespace = _T("wps");
|
||||
TextBoxBodyPr->toXmlWriter(pWriter);
|
||||
bIsWritedBodyPr = true;
|
||||
}
|
||||
}
|
||||
else if (txBody.is_init())
|
||||
{
|
||||
txBody->m_ns = _T("wps");
|
||||
pWriter->Write(txBody);
|
||||
}
|
||||
|
||||
if (!bIsWritedBodyPr)
|
||||
{
|
||||
pWriter->WriteString(_T("<wps:bodyPr rot=\"0\"><a:prstTxWarp prst=\"textNoShape\"><a:avLst/></a:prstTxWarp><a:noAutofit/></wps:bodyPr>"));
|
||||
}
|
||||
}
|
||||
|
||||
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_DOCX)
|
||||
pWriter->EndNode(_T("wps:wsp"));
|
||||
else if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_XLSX)
|
||||
pWriter->EndNode(_T("xdr:sp"));
|
||||
else
|
||||
pWriter->EndNode(_T("p:sp"));
|
||||
}
|
||||
|
||||
void Shape::fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetLong() + 4;
|
||||
|
||||
pReader->Skip(1); // start attributes
|
||||
|
||||
while (true)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar_TypeNode();
|
||||
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
|
||||
break;
|
||||
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
attrUseBgFill = pReader->GetBool();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
while (pReader->GetPos() < _end_rec)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar();
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
nvSpPr.fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
spPr.fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
style = new ShapeStyle();
|
||||
style->m_ns = _T("p");
|
||||
style->fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
txBody = new TxBody();
|
||||
txBody->fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
if (NULL != pReader->m_pMainDocument)
|
||||
{
|
||||
LONG lLenRec = pReader->GetLong();
|
||||
|
||||
LONG lPosition = pReader->GetPos();
|
||||
LONG lSize_Reader = pReader->GetSize();
|
||||
BYTE* pData_Reader = pReader->GetData();
|
||||
|
||||
std::wstring sXmlContent;
|
||||
pReader->m_pMainDocument->getXmlContent(*pReader, lLenRec, sXmlContent);
|
||||
|
||||
std::wstring strC = _T("<w:txbxContent>");
|
||||
strC += sXmlContent;
|
||||
strC += _T("</w:txbxContent>");
|
||||
TextBoxShape = strC;
|
||||
|
||||
//pReader->Seek(lPosition + lLenRec);
|
||||
pReader->Init(pData_Reader, lPosition + lLenRec, lSize_Reader - (lPosition + lLenRec));
|
||||
}
|
||||
else
|
||||
{
|
||||
pReader->SkipRecord();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
TextBoxBodyPr = new PPTX::Logic::BodyPr();
|
||||
TextBoxBodyPr->fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
txXfrm = new PPTX::Logic::Xfrm();
|
||||
txXfrm->fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Shape::FillParentPointersForChilds()
|
||||
{
|
||||
nvSpPr.SetParentPointer(this);
|
||||
@ -137,6 +329,61 @@ namespace PPTX
|
||||
txBody->SetParentPointer(this);
|
||||
levelUp = NULL;
|
||||
}
|
||||
|
||||
void Shape::toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter)const
|
||||
{
|
||||
pWriter->StartRecord(SPTREE_TYPE_SHAPE);
|
||||
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteBool2(0, attrUseBgFill);
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
|
||||
pWriter->WriteRecord1(0, nvSpPr);
|
||||
pWriter->WriteRecord1(1, spPr);
|
||||
pWriter->WriteRecord2(2, style);
|
||||
|
||||
if (pWriter->m_pMainDocument != NULL)
|
||||
{
|
||||
if (TextBoxShape.is_init())
|
||||
{
|
||||
long lDataSize = 0;
|
||||
ULONG lPos = pWriter->GetPosition();
|
||||
pWriter->SetPosition(lPos);
|
||||
pWriter->StartRecord(4);
|
||||
pWriter->m_pMainDocument->getBinaryContent(TextBoxShape.get(), *pWriter, lDataSize);
|
||||
pWriter->EndRecord();
|
||||
|
||||
if (TextBoxBodyPr.is_init())
|
||||
{
|
||||
pWriter->StartRecord(5);
|
||||
TextBoxBodyPr->toPPTY(pWriter);
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
}
|
||||
else if (txBody.is_init())
|
||||
{
|
||||
std::wstring strContent = txBody->GetDocxTxBoxContent(pWriter, style);
|
||||
|
||||
long lDataSize = 0;
|
||||
ULONG lPos = pWriter->GetPosition();
|
||||
pWriter->SetPosition(lPos);
|
||||
pWriter->StartRecord(4);
|
||||
pWriter->m_pMainDocument->getBinaryContent(strContent, *pWriter, lDataSize);
|
||||
pWriter->EndRecord();
|
||||
|
||||
pWriter->WriteRecord1(5, txBody->bodyPr);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pWriter->WriteRecord2(3, txBody);
|
||||
}
|
||||
|
||||
pWriter->WriteRecord2(6, txXfrm);
|
||||
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
|
||||
|
||||
void Shape::GetRect(Aggplus::RECT& pRect)const
|
||||
{
|
||||
|
||||
@ -305,248 +305,12 @@ namespace PPTX
|
||||
public:
|
||||
void SetLevelUpElement(const Shape& p)const{levelUp = &p;};
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartRecord(SPTREE_TYPE_SHAPE);
|
||||
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteBool2(0, attrUseBgFill);
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
|
||||
pWriter->WriteRecord1(0, nvSpPr);
|
||||
pWriter->WriteRecord1(1, spPr);
|
||||
pWriter->WriteRecord2(2, style);
|
||||
|
||||
if (pWriter->m_pMainDocument != NULL)
|
||||
{
|
||||
if (TextBoxShape.is_init())
|
||||
{
|
||||
long lDataSize = 0;
|
||||
ULONG lPos = pWriter->GetPosition();
|
||||
pWriter->SetPosition(lPos);
|
||||
pWriter->StartRecord(4);
|
||||
pWriter->m_pMainDocument->getBinaryContent(TextBoxShape.get(), *pWriter, lDataSize);
|
||||
pWriter->EndRecord();
|
||||
|
||||
if (TextBoxBodyPr.is_init())
|
||||
{
|
||||
pWriter->StartRecord(5);
|
||||
TextBoxBodyPr->toPPTY(pWriter);
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
}
|
||||
else if (txBody.is_init())
|
||||
{
|
||||
std::wstring strContent = txBody->GetDocxTxBoxContent(pWriter, style);
|
||||
|
||||
long lDataSize = 0;
|
||||
ULONG lPos = pWriter->GetPosition();
|
||||
pWriter->SetPosition(lPos);
|
||||
pWriter->StartRecord(4);
|
||||
pWriter->m_pMainDocument->getBinaryContent(strContent, *pWriter, lDataSize);
|
||||
pWriter->EndRecord();
|
||||
|
||||
pWriter->WriteRecord1(5, txBody->bodyPr);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pWriter->WriteRecord2(3, txBody);
|
||||
}
|
||||
|
||||
pWriter->WriteRecord2(6, txXfrm);
|
||||
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
|
||||
void toXmlWriterVML(NSBinPptxRW::CXmlWriter* pWriter, smart_ptr<PPTX::WrapperFile>& oTheme, smart_ptr<PPTX::WrapperWritingElement>& oClrMap, bool in_group = false);
|
||||
void toXmlWriterVMLBackground(NSBinPptxRW::CXmlWriter *pWriter, NSCommon::smart_ptr<PPTX::WrapperFile>& oTheme, NSCommon::smart_ptr<PPTX::WrapperWritingElement>& oClrMap);
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_DOCX)
|
||||
pWriter->StartNode(_T("wps:wsp"));
|
||||
else if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_XLSX)
|
||||
pWriter->StartNode(_T("xdr:sp"));
|
||||
else
|
||||
pWriter->StartNode(_T("p:sp"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("useBgFill"), attrUseBgFill);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_DOCX)
|
||||
{
|
||||
//nvSpPr.cNvPr.toXmlWriter2(_T("wps"), pWriter);
|
||||
nvSpPr.cNvSpPr.toXmlWriter2(_T("wps"), pWriter);
|
||||
}
|
||||
else
|
||||
nvSpPr.toXmlWriter(pWriter);
|
||||
|
||||
bool bIsPresentStyle = false;
|
||||
if (style.is_init() && (style->fillRef.idx.is_init() || style->fillRef.Color.Color.is_init()))
|
||||
{
|
||||
bIsPresentStyle = true;
|
||||
}
|
||||
if (pWriter->m_lGroupIndex > 1 && !bIsPresentStyle)
|
||||
{
|
||||
pWriter->m_lFlag += 0x02;
|
||||
}
|
||||
spPr.toXmlWriter(pWriter);
|
||||
if (pWriter->m_lGroupIndex > 1 && !bIsPresentStyle)
|
||||
{
|
||||
pWriter->m_lFlag -= 0x02;
|
||||
}
|
||||
|
||||
if (style.is_init())
|
||||
{
|
||||
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_DOCX)
|
||||
style->m_ns = _T("wps");
|
||||
else if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_XLSX)
|
||||
style->m_ns = _T("xdr");
|
||||
|
||||
pWriter->Write(style);
|
||||
}
|
||||
|
||||
if (pWriter->m_lDocType != XMLWRITER_DOC_TYPE_DOCX)
|
||||
{
|
||||
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_XLSX && txBody.is_init())
|
||||
txBody->m_ns = _T("xdr");
|
||||
pWriter->Write(txBody);
|
||||
}
|
||||
|
||||
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_DOCX)
|
||||
{
|
||||
bool bIsWritedBodyPr = false;
|
||||
if (TextBoxShape.is_init())
|
||||
{
|
||||
pWriter->WriteString(_T("<wps:txbx>"));
|
||||
pWriter->WriteString(*TextBoxShape);
|
||||
pWriter->WriteString(_T("</wps:txbx>"));
|
||||
|
||||
if (TextBoxBodyPr.is_init())
|
||||
{
|
||||
TextBoxBodyPr->m_namespace = _T("wps");
|
||||
TextBoxBodyPr->toXmlWriter(pWriter);
|
||||
bIsWritedBodyPr = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!bIsWritedBodyPr)
|
||||
{
|
||||
pWriter->WriteString(_T("<wps:bodyPr rot=\"0\"><a:prstTxWarp prst=\"textNoShape\"><a:avLst/></a:prstTxWarp><a:noAutofit/></wps:bodyPr>"));
|
||||
}
|
||||
}
|
||||
|
||||
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_DOCX)
|
||||
pWriter->EndNode(_T("wps:wsp"));
|
||||
else if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_XLSX)
|
||||
pWriter->EndNode(_T("xdr:sp"));
|
||||
else
|
||||
pWriter->EndNode(_T("p:sp"));
|
||||
}
|
||||
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetLong() + 4;
|
||||
|
||||
pReader->Skip(1); // start attributes
|
||||
|
||||
while (true)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar_TypeNode();
|
||||
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
|
||||
break;
|
||||
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
attrUseBgFill = pReader->GetBool();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
while (pReader->GetPos() < _end_rec)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar();
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
nvSpPr.fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
spPr.fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
style = new ShapeStyle();
|
||||
style->m_ns = _T("p");
|
||||
style->fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
txBody = new TxBody();
|
||||
txBody->fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
if (NULL != pReader->m_pMainDocument)
|
||||
{
|
||||
LONG lLenRec = pReader->GetLong();
|
||||
|
||||
LONG lPosition = pReader->GetPos();
|
||||
LONG lSize_Reader = pReader->GetSize();
|
||||
BYTE* pData_Reader = pReader->GetData();
|
||||
|
||||
std::wstring sXmlContent;
|
||||
pReader->m_pMainDocument->getXmlContent(*pReader, lLenRec, sXmlContent);
|
||||
|
||||
std::wstring strC = _T("<w:txbxContent>");
|
||||
strC += sXmlContent;
|
||||
strC += _T("</w:txbxContent>");
|
||||
TextBoxShape = strC;
|
||||
|
||||
//pReader->Seek(lPosition + lLenRec);
|
||||
pReader->Init(pData_Reader, lPosition + lLenRec, lSize_Reader - (lPosition + lLenRec));
|
||||
}
|
||||
else
|
||||
{
|
||||
pReader->SkipRecord();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
TextBoxBodyPr = new PPTX::Logic::BodyPr();
|
||||
TextBoxBodyPr->fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
txXfrm = new PPTX::Logic::Xfrm();
|
||||
txXfrm->fromPPTY(pReader);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const;
|
||||
void toXmlWriterVML (NSBinPptxRW::CXmlWriter* pWriter, smart_ptr<PPTX::WrapperFile>& oTheme, smart_ptr<PPTX::WrapperWritingElement>& oClrMap, bool in_group = false);
|
||||
void toXmlWriterVMLBackground (NSBinPptxRW::CXmlWriter *pWriter, NSCommon::smart_ptr<PPTX::WrapperFile>& oTheme, NSCommon::smart_ptr<PPTX::WrapperWritingElement>& oClrMap);
|
||||
|
||||
virtual void toXmlWriter (NSBinPptxRW::CXmlWriter* pWriter) const;
|
||||
virtual void fromPPTY (NSBinPptxRW::CBinaryFileReader* pReader);
|
||||
|
||||
NvSpPr nvSpPr;
|
||||
SpPr spPr;
|
||||
|
||||
@ -72,7 +72,7 @@ namespace PPTX
|
||||
|
||||
if ((pDiagramData) && (pDiagramData->m_oExtLst.IsInit()))
|
||||
{
|
||||
for (int i = 0; i < pDiagramData->m_oExtLst->m_arrExt.size(); i++)
|
||||
for (size_t i = 0; i < pDiagramData->m_oExtLst->m_arrExt.size(); i++)
|
||||
{
|
||||
if (pDiagramData->m_oExtLst->m_arrExt[i]->m_oDataModelExt.IsInit())
|
||||
{
|
||||
@ -106,7 +106,7 @@ namespace PPTX
|
||||
// easy4cargo1.pptx - слайд 2 - в диаграмме Smart вместо ссылки на drawing.xml ссылка на стороннюю картинку
|
||||
OOX::CPath pathDiagramData = pDiagramData->m_strFilename;
|
||||
|
||||
int a1 = pathDiagramData.GetFilename().find(L".");
|
||||
int a1 = (int)pathDiagramData.GetFilename().find(L".");
|
||||
std::wstring strId = pathDiagramData.GetFilename().substr(4, pathDiagramData.GetFilename().length() - 8);
|
||||
|
||||
OOX::CPath pathDiagramDrawing = pathDiagramData.GetDirectory() + FILE_SEPARATOR_STR + L"drawing" + strId + L".xml";
|
||||
@ -201,7 +201,7 @@ xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"
|
||||
oXlsxSerializer.setDrawingConverter(&oDrawingConverter);
|
||||
|
||||
std::wstring strDstChart = pReader->m_pRels->m_pManager->GetDstMedia();
|
||||
int nPos = strDstChart.rfind(wchar_t('m'));
|
||||
int nPos = (int)strDstChart.rfind(wchar_t('m'));
|
||||
if (-1 != nPos)
|
||||
strDstChart = strDstChart.substr(0, nPos);
|
||||
|
||||
|
||||
@ -108,17 +108,17 @@ namespace PPTX
|
||||
oStylesWriter.WriteAttributeCSS(L"position", L"absolute");
|
||||
if (in_group)
|
||||
{
|
||||
oStylesWriter.WriteAttributeCSS_int(L"left", dL / 100.);
|
||||
oStylesWriter.WriteAttributeCSS_int(L"top", dT / 100.);
|
||||
oStylesWriter.WriteAttributeCSS_int(L"width", dW / 100.);
|
||||
oStylesWriter.WriteAttributeCSS_int(L"height", dH / 100.);
|
||||
oStylesWriter.WriteAttributeCSS_int(L"left", dL / 100);
|
||||
oStylesWriter.WriteAttributeCSS_int(L"top", dT / 100);
|
||||
oStylesWriter.WriteAttributeCSS_int(L"width", dW / 100);
|
||||
oStylesWriter.WriteAttributeCSS_int(L"height", dH / 100);
|
||||
}
|
||||
else
|
||||
{
|
||||
oStylesWriter.WriteAttributeCSS_int_pt(L"left", dL / 12700.);
|
||||
oStylesWriter.WriteAttributeCSS_int_pt(L"top", dT / 12700.);
|
||||
oStylesWriter.WriteAttributeCSS_int_pt(L"width", dW / 12700.);
|
||||
oStylesWriter.WriteAttributeCSS_int_pt(L"height", dH / 12700.);
|
||||
oStylesWriter.WriteAttributeCSS_int_pt(L"left", dL / 12700);
|
||||
oStylesWriter.WriteAttributeCSS_int_pt(L"top", dT / 12700);
|
||||
oStylesWriter.WriteAttributeCSS_int_pt(L"width", dW / 12700);
|
||||
oStylesWriter.WriteAttributeCSS_int_pt(L"height", dH / 12700);
|
||||
}
|
||||
|
||||
if (grpSpPr.xfrm.is_init())
|
||||
@ -164,16 +164,16 @@ namespace PPTX
|
||||
}
|
||||
oStylesWriter.ClearNoAttack();
|
||||
oStylesWriter.m_oWriter.AddSize(30);
|
||||
oStylesWriter.m_oWriter.AddIntNoCheck(dL / 100.);
|
||||
oStylesWriter.m_oWriter.AddIntNoCheck(dL / 100);
|
||||
oStylesWriter.m_oWriter.AddCharNoCheck(WCHAR(','));
|
||||
oStylesWriter.m_oWriter.AddIntNoCheck(dT / 100.);
|
||||
oStylesWriter.m_oWriter.AddIntNoCheck(dT / 100);
|
||||
pWriter->WriteAttribute(_T("coordorigin"), oStylesWriter.GetXmlString());
|
||||
|
||||
oStylesWriter.ClearNoAttack();
|
||||
oStylesWriter.m_oWriter.AddSize(30);
|
||||
oStylesWriter.m_oWriter.AddIntNoCheck(dW / 100.);
|
||||
oStylesWriter.m_oWriter.AddIntNoCheck(dW / 100);
|
||||
oStylesWriter.m_oWriter.AddCharNoCheck(WCHAR(','));
|
||||
oStylesWriter.m_oWriter.AddIntNoCheck(dH / 100.);
|
||||
oStylesWriter.m_oWriter.AddIntNoCheck(dH / 100);
|
||||
pWriter->WriteAttribute(_T("coordsize"), oStylesWriter.GetXmlString());
|
||||
|
||||
pWriter->EndAttributes();
|
||||
|
||||
@ -294,8 +294,12 @@
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="Paragraph"
|
||||
Name="Paragraph&Run"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\source\Reader\OOXParagraphElementReaders.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\source\Reader\OOXParagraphReader.h"
|
||||
>
|
||||
@ -312,6 +316,14 @@
|
||||
RelativePath="..\source\Reader\OOXpPrTabReader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\source\Reader\OOXrPrReader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\source\Reader\OOXRunReader.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Table"
|
||||
@ -397,22 +409,6 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Run"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\source\Reader\OOXParagraphElementReaders.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\source\Reader\OOXrPrReader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\source\Reader\OOXRunReader.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="FileReader"
|
||||
|
||||
@ -37,17 +37,8 @@
|
||||
#include "IdGenerator.h"
|
||||
#include "RtfDefine.h"
|
||||
|
||||
#include "boost/shared_ptr.hpp"
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
template <class T>
|
||||
struct optional
|
||||
{
|
||||
typedef T Base;
|
||||
typedef boost::optional<T> Type;
|
||||
};
|
||||
|
||||
#define _CP_OPT(V) optional<V>::Type
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "../../../ASCOfficeOdfFile/include/cpdoccore/CPOptional.h"
|
||||
|
||||
enum _MetricUnits{ mu_none, mu_Auto, mu_Percent, mu_Twips };
|
||||
|
||||
|
||||
@ -2592,7 +2592,10 @@ bool RtfParagraphPropDestination::ExecuteCommand(RtfDocument& oDocument, RtfRead
|
||||
else if ( "shpgrp" == sCommand )
|
||||
{
|
||||
RtfShapePtr oNewShape ( new RtfShape() );
|
||||
oNewShape->m_oCharProperty = oReader.m_oState->m_oCharProp;
|
||||
|
||||
oNewShape->m_bIsGroup = true;
|
||||
oNewShape->m_nShapeType = 1;
|
||||
oNewShape->m_oCharProperty = oReader.m_oState->m_oCharProp;
|
||||
|
||||
RtfShapeGroupReader oShapeGroupReader( *oNewShape );
|
||||
oAbstrReader.StartSubReader( oShapeGroupReader, oDocument, oReader );
|
||||
|
||||
@ -118,6 +118,13 @@ OOX::Logic::CDrawing* OOXDrawingGraphicConverter::Convert( ReaderParameter oPara
|
||||
|
||||
if (sXml.empty())return NULL;
|
||||
|
||||
OOX::CPath pathDrawingRels(drawingConverter.m_strCurrentRelsPath);
|
||||
|
||||
if (m_ooxGraphicRels)
|
||||
{
|
||||
m_ooxGraphicRels->Read(pathDrawingRels, pathDrawingRels);
|
||||
}
|
||||
|
||||
std::wstring sBegin (L"<main xmlns:wpc=\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\" xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns:p=\"urn:schemas-microsoft-com:office:powerpoint\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:w10=\"urn:schemas-microsoft-com:office:word\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" xmlns:ve=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" 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: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\" xmlns:a14=\"http://schemas.microsoft.com/office/drawing/2010/main\" xmlns:pic=\"http://schemas.openxmlformats.org/drawingml/2006/picture\" xmlns:xdr=\"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\">");
|
||||
std::wstring sEnd (L"</main>");
|
||||
|
||||
|
||||
@ -46,9 +46,18 @@ private:
|
||||
std::wstring m_sXml;
|
||||
|
||||
public:
|
||||
OOX::IFileContainer *m_ooxGraphicRels;
|
||||
|
||||
OOXDrawingGraphicConverter(std::wstring sXml)
|
||||
{
|
||||
m_sXml = sXml;
|
||||
m_sXml = sXml;
|
||||
m_ooxGraphicRels = new OOX::IFileContainer();
|
||||
}
|
||||
virtual ~OOXDrawingGraphicConverter()
|
||||
{
|
||||
if (m_ooxGraphicRels)
|
||||
delete m_ooxGraphicRels;
|
||||
m_ooxGraphicRels = NULL;
|
||||
}
|
||||
//OOX::Logic::CPicture* Parse( ReaderParameter oParam , RtfShapePtr pOutput);
|
||||
OOX::Logic::CDrawing* Convert( ReaderParameter oParam, RtfShapePtr pOutput);
|
||||
|
||||
@ -93,12 +93,13 @@ public:
|
||||
class OOXFontReader2
|
||||
{
|
||||
private:
|
||||
ComplexTypes::Word::CFonts * m_ooxFont;
|
||||
ComplexTypes::Word::CFonts *m_ooxFont;
|
||||
public:
|
||||
OOXFontReader2(ComplexTypes::Word::CFonts * ooxFont)
|
||||
{
|
||||
m_ooxFont = ooxFont;
|
||||
m_ooxFont = ooxFont;
|
||||
}
|
||||
|
||||
bool Parse( ReaderParameter oParam, int& nFont)
|
||||
{
|
||||
if (!m_ooxFont) return false;
|
||||
@ -169,3 +170,90 @@ private:
|
||||
return sFont;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class OOXFontReader3
|
||||
{
|
||||
private:
|
||||
OOX::Drawing::CTextFont *m_asciiFont;
|
||||
OOX::Drawing::CTextFont *m_csFont;
|
||||
OOX::Drawing::CTextFont *m_asianFont;
|
||||
public:
|
||||
|
||||
OOXFontReader3(OOX::Drawing::CTextFont * asciiFont, OOX::Drawing::CTextFont * asianFont, OOX::Drawing::CTextFont * csFont)
|
||||
{
|
||||
m_asciiFont = asciiFont;
|
||||
m_asianFont = asianFont;
|
||||
m_csFont = csFont;
|
||||
}
|
||||
bool Parse( ReaderParameter oParam, int& nFont)
|
||||
{
|
||||
if (!m_asciiFont && !m_csFont && !m_asianFont) return false;
|
||||
|
||||
std::wstring sAscii, sCs, sEastAsia;
|
||||
|
||||
if ((m_asciiFont) && (m_asciiFont->m_oTypeFace.IsInit())) sAscii = m_asciiFont->m_oTypeFace->GetValue();
|
||||
if ((m_csFont) && (m_csFont->m_oTypeFace.IsInit())) sCs = m_csFont->m_oTypeFace->GetValue();
|
||||
if ((m_asianFont) && (m_asianFont->m_oTypeFace.IsInit())) sEastAsia = m_asianFont->m_oTypeFace->GetValue();
|
||||
|
||||
std::wstring sFont;
|
||||
std::wstring sTempFont;
|
||||
|
||||
if( !sAscii.empty() ) sFont = sAscii;
|
||||
else if( !sCs.empty() ) sFont = sCs;
|
||||
else if( !sEastAsia.empty() ) sFont = sEastAsia;
|
||||
|
||||
|
||||
if( !sFont.empty() )
|
||||
{
|
||||
RtfFont oCurFont;
|
||||
if( true == oParam.oRtf->m_oFontTable.GetFont( sFont, oCurFont ) )
|
||||
nFont = oCurFont.m_nID;
|
||||
else
|
||||
{
|
||||
nFont = oParam.oRtf->m_oFontTable.GetCount() + 1;
|
||||
oCurFont.m_nID = nFont;
|
||||
oCurFont.m_sName = sFont;
|
||||
|
||||
if( !sAscii.empty() )
|
||||
{
|
||||
if (m_asciiFont->m_oPanose.IsInit())
|
||||
oCurFont.m_sPanose = m_asciiFont->m_oPanose->GetValue();
|
||||
oCurFont.m_nCharset = m_asciiFont->m_oCharset.GetValue();
|
||||
oCurFont.m_nPitch = m_asciiFont->m_oPitchFamily.GetValue();
|
||||
}
|
||||
else if( !sCs.empty() )
|
||||
{
|
||||
if (m_csFont->m_oPanose.IsInit())
|
||||
oCurFont.m_sPanose = m_csFont->m_oPanose->GetValue();
|
||||
oCurFont.m_nCharset = m_csFont->m_oCharset.GetValue();
|
||||
oCurFont.m_nPitch = m_csFont->m_oPitchFamily.GetValue();
|
||||
}
|
||||
else if( !sEastAsia.empty() )
|
||||
{
|
||||
if (m_asianFont->m_oPanose.IsInit())
|
||||
oCurFont.m_sPanose = m_asianFont->m_oPanose->GetValue();
|
||||
oCurFont.m_nCharset = m_asianFont->m_oCharset.GetValue();
|
||||
oCurFont.m_nPitch = m_asianFont->m_oPitchFamily.GetValue();
|
||||
}
|
||||
oParam.oRtf->m_oFontTable.AddItem( oCurFont );
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
private:
|
||||
std::wstring GetThemeFont( std::wstring sTheme, OOXReader & oReader )
|
||||
{
|
||||
std::wstring sFont;
|
||||
if ( L"majorAscii" == sTheme ) sFont = oReader.m_smajorAscii;
|
||||
else if ( L"majorBidi" == sTheme ) sFont = oReader.m_smajorBidi;
|
||||
else if ( L"majorEastAsia" == sTheme ) sFont = oReader.m_smajorEastAsia;
|
||||
else if ( L"majorHAnsi" == sTheme ) sFont = oReader.m_smajorHAnsi;
|
||||
else if ( L"minorAscii" == sTheme ) sFont = oReader.m_sminorAscii;
|
||||
else if ( L"minorBidi" == sTheme ) sFont = oReader.m_sminorBidi;
|
||||
else if ( L"minorEastAsia" == sTheme ) sFont = oReader.m_sminorEastAsia;
|
||||
else if ( L"minorHAnsi" == sTheme ) sFont = oReader.m_sminorHAnsi;
|
||||
|
||||
return sFont;
|
||||
}
|
||||
};
|
||||
|
||||
@ -40,6 +40,20 @@
|
||||
|
||||
bool OOXParagraphReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagraph, CcnfStyle oConditionalTableStyle )
|
||||
{
|
||||
if (m_drawingParagraph)
|
||||
{
|
||||
if (m_drawingParagraph->m_oParagraphProperty.IsInit())
|
||||
{
|
||||
OOXpPrReader opPrReader(m_drawingParagraph->m_oParagraphProperty.GetPointer());
|
||||
|
||||
opPrReader.Parse( oParam, oOutputParagraph.m_oProperty, oConditionalTableStyle);
|
||||
}
|
||||
m_ooxElement = dynamic_cast<OOX::WritingElementWithChilds<OOX::WritingElement>*>(m_drawingParagraph);
|
||||
|
||||
bool res = Parse2(oParam, oOutputParagraph, oConditionalTableStyle, RtfStylePtr() );
|
||||
|
||||
return true;
|
||||
}
|
||||
if (m_ooxParagraph == NULL) return false;
|
||||
|
||||
//надо default стиль применять до OOXParagraphReader
|
||||
@ -91,7 +105,7 @@ bool OOXParagraphReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputPa
|
||||
|
||||
m_ooxElement = dynamic_cast<OOX::WritingElementWithChilds<OOX::WritingElement>*>(m_ooxParagraph);
|
||||
|
||||
bool res = Parse2(oParam ,oOutputParagraph, oConditionalTableStyle, poExternalStyle );
|
||||
bool res = Parse2(oParam, oOutputParagraph, oConditionalTableStyle, poExternalStyle );
|
||||
|
||||
return res;
|
||||
}
|
||||
@ -162,6 +176,13 @@ bool OOXParagraphReader::Parse2( ReaderParameter oParam , RtfParagraph& oOutputP
|
||||
|
||||
oSubParReader.Parse2( oParam, oOutputParagraph, oConditionalTableStyle, poStyle);
|
||||
}break;
|
||||
case OOX::et_a_r:
|
||||
{
|
||||
OOX::Drawing::CRun * pRun = dynamic_cast<OOX::Drawing::CRun*>(m_ooxElement->m_arrItems[i]);
|
||||
|
||||
OOXRunReader oRunReader(pRun);
|
||||
oRunReader.Parse ( oParam, oOutputParagraph, poExternalStyle );
|
||||
}break;
|
||||
case OOX::et_w_r:
|
||||
{
|
||||
OOX::Logic::CRun * pRun = dynamic_cast<OOX::Logic::CRun*>(m_ooxElement->m_arrItems[i]);
|
||||
@ -717,16 +738,20 @@ bool OOXRunReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagrap
|
||||
}
|
||||
else if (result == 2 && ooxDrawing->m_sXml.IsInit())
|
||||
{
|
||||
OOX::IFileContainer* store_container = oParam.oReader->m_currentContainer;
|
||||
|
||||
OOXDrawingGraphicConverter oGraphicConverter(*ooxDrawing->m_sXml);
|
||||
OOX::Logic::CDrawing* ooxNewDrawing = oGraphicConverter.Convert( oParam, pNewDrawing );
|
||||
//OOX::Logic::CPicture *ooxPicture = oGraphiceReader.Parse( oParam, pNewDrawing );
|
||||
|
||||
oParam.oReader->m_currentContainer = oGraphicConverter.m_ooxGraphicRels;
|
||||
if (Parse(oParam , oOutputParagraph, poStyle, oNewProperty, ooxNewDrawing/*ooxPicture*/))
|
||||
{
|
||||
bAddDrawing = true;
|
||||
}
|
||||
//if (ooxPicture)delete ooxPicture;
|
||||
if (ooxNewDrawing) delete ooxNewDrawing;
|
||||
oParam.oReader->m_currentContainer = store_container;
|
||||
}
|
||||
if (!bAddDrawing)
|
||||
{
|
||||
@ -950,41 +975,68 @@ bool OOXRunReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagrap
|
||||
}
|
||||
bool OOXRunReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagraph, RtfStylePtr poStyle )
|
||||
{
|
||||
if (m_ooxRun == NULL) return false;
|
||||
|
||||
RtfCharProperty oNewProperty;
|
||||
oNewProperty.SetDefaultOOX();
|
||||
//применяем default
|
||||
oNewProperty = oParam.oRtf->m_oDefaultCharProp;
|
||||
if (m_ooxRun == NULL && m_drawingRun == NULL) return false;
|
||||
|
||||
//применяем внешний стиль
|
||||
//oNewProperty.Merge( oOutputParagraph.m_oProperty.m_oCharProperty );
|
||||
oNewProperty.Merge( m_oCharProperty );
|
||||
|
||||
if( NULL != poStyle && TYPE_RTF_PROPERTY_STYLE_CHAR == poStyle->GetType() )
|
||||
if (m_drawingRun)
|
||||
{
|
||||
RtfCharStylePtr oCharStyle = boost::static_pointer_cast<RtfCharStyle, RtfStyle>( poStyle );
|
||||
oNewProperty.Merge( oCharStyle->m_oCharProp );
|
||||
RtfCharProperty oNewProperty;
|
||||
oNewProperty.SetDefaultOOX();
|
||||
|
||||
if (m_drawingRun->m_oRunProperty.IsInit())
|
||||
{
|
||||
OOXrPrReader orPrReader(m_drawingRun->m_oRunProperty.GetPointer());
|
||||
orPrReader.Parse( oParam, oNewProperty );
|
||||
}
|
||||
|
||||
if (m_drawingRun->m_oText.IsInit())
|
||||
{
|
||||
std::wstring sValue = m_drawingRun->m_oText->m_sText;
|
||||
|
||||
RtfCharPtr pNewChar ( new RtfChar() );
|
||||
|
||||
pNewChar->m_oProperty = oNewProperty;
|
||||
pNewChar->setText( sValue );
|
||||
|
||||
oOutputParagraph.AddItem( pNewChar );
|
||||
}
|
||||
}
|
||||
|
||||
if (m_ooxRun->m_oRunProperty)
|
||||
else
|
||||
{
|
||||
OOXrPrReader orPrReader(m_ooxRun->m_oRunProperty);
|
||||
orPrReader.Parse( oParam, oNewProperty );
|
||||
}
|
||||
RtfCharProperty oNewProperty;
|
||||
oNewProperty.SetDefaultOOX();
|
||||
//применяем default
|
||||
oNewProperty = oParam.oRtf->m_oDefaultCharProp;
|
||||
|
||||
//применяем внешний стиль
|
||||
//oNewProperty.Merge( oOutputParagraph.m_oProperty.m_oCharProperty );
|
||||
oNewProperty.Merge( m_oCharProperty );
|
||||
|
||||
for (size_t i =0 ; i < m_ooxRun->m_arrItems.size(); i++)
|
||||
{
|
||||
Parse(oParam, oOutputParagraph, poStyle, oNewProperty, m_ooxRun->m_arrItems[i]);
|
||||
if( NULL != poStyle && TYPE_RTF_PROPERTY_STYLE_CHAR == poStyle->GetType() )
|
||||
{
|
||||
RtfCharStylePtr oCharStyle = boost::static_pointer_cast<RtfCharStyle, RtfStyle>( poStyle );
|
||||
oNewProperty.Merge( oCharStyle->m_oCharProp );
|
||||
}
|
||||
|
||||
if (m_ooxRun->m_oRunProperty)
|
||||
{
|
||||
OOXrPrReader orPrReader(m_ooxRun->m_oRunProperty);
|
||||
orPrReader.Parse( oParam, oNewProperty );
|
||||
}
|
||||
|
||||
for (size_t i =0 ; i < m_ooxRun->m_arrItems.size(); i++)
|
||||
{
|
||||
Parse(oParam, oOutputParagraph, poStyle, oNewProperty, m_ooxRun->m_arrItems[i]);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool OOXpPrReader::Parse( ReaderParameter oParam ,RtfParagraphProperty& oOutputProperty, CcnfStyle& oConditionalTableStyle )
|
||||
bool OOXpPrReader::Parse( ReaderParameter oParam, RtfParagraphProperty& oOutputProperty, CcnfStyle& oConditionalTableStyle )
|
||||
{
|
||||
if (m_ooxParaProps == NULL) return false;
|
||||
if (m_drawingParaProps) return ParseDrawing( oParam, oOutputProperty);
|
||||
|
||||
if (m_ooxParaProps == NULL) return false;
|
||||
//применяем внешний стиль
|
||||
if( NULL != oParam.poTableStyle )
|
||||
{
|
||||
@ -1326,8 +1378,10 @@ bool OOXpPrReader::Parse( ReaderParameter oParam ,RtfParagraphProperty& oOutputP
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool OOXrPrReader::Parse( ReaderParameter oParam ,RtfCharProperty& oOutputProperty)
|
||||
bool OOXrPrReader::Parse( ReaderParameter oParam, RtfCharProperty& oOutputProperty)
|
||||
{
|
||||
if (m_drawingRunProps) ParseDrawing( oParam, oOutputProperty );
|
||||
|
||||
if (m_ooxRunProps == NULL) return false;
|
||||
|
||||
//сначала применяем стили
|
||||
@ -1580,6 +1634,210 @@ bool OOXrPrReader::Parse( ReaderParameter oParam ,RtfCharProperty& oOutputProper
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool OOXpPrReader::ParseDrawing( ReaderParameter oParam, RtfParagraphProperty& oOutputProperty)
|
||||
{
|
||||
if (m_drawingParaProps == NULL) return false;
|
||||
|
||||
if (m_drawingParaProps->m_oLvl.IsInit())
|
||||
oOutputProperty.m_nOutlinelevel = m_drawingParaProps->m_oLvl->GetValue();
|
||||
|
||||
if( m_drawingParaProps->m_oAlgn.IsInit())
|
||||
{
|
||||
switch(m_drawingParaProps->m_oAlgn->GetValue())
|
||||
{
|
||||
case SimpleTypes::jcBoth : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qj;break;
|
||||
case SimpleTypes::jcCenter : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qc;break;
|
||||
case SimpleTypes::jcDistribute : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qd;break;
|
||||
case SimpleTypes::jcEnd : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qr;break;
|
||||
case SimpleTypes::jcHighKashida : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qk20;break;
|
||||
case SimpleTypes::jcLowKashida : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qk0; break;
|
||||
case SimpleTypes::jcMediumKashida : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qk10; break;
|
||||
case SimpleTypes::jcNumTab : break;
|
||||
case SimpleTypes::jcStart : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_ql;break;
|
||||
case SimpleTypes::jcThaiDistribute : break;
|
||||
case SimpleTypes::jcLeft : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_ql;break;
|
||||
case SimpleTypes::jcRight : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qr;break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
//if( m_drawingParaProps->m_oInd.IsInit() )
|
||||
//{
|
||||
// int nFirstLine = PROP_DEF;
|
||||
|
||||
// if (m_drawingParaProps->m_oInd->m_oHanging.IsInit())
|
||||
// nFirstLine = m_drawingParaProps->m_oInd->m_oHanging->ToTwips();
|
||||
// if( PROP_DEF != nFirstLine )
|
||||
// oOutputProperty.m_nIndFirstLine = -nFirstLine;
|
||||
|
||||
// if (m_drawingParaProps->m_oInd->m_oFirstLine.IsInit())
|
||||
// oOutputProperty.m_nIndFirstLine = m_drawingParaProps->m_oInd->m_oFirstLine->ToTwips();
|
||||
|
||||
// if (m_drawingParaProps->m_oInd->m_oStart.IsInit())
|
||||
// oOutputProperty.m_nIndStart = m_drawingParaProps->m_oInd->m_oStart->ToTwips();
|
||||
|
||||
// if (m_drawingParaProps->m_oInd->m_oEnd.IsInit())
|
||||
// oOutputProperty.m_nIndEnd = m_drawingParaProps->m_oInd->m_oEnd->ToTwips();
|
||||
//}
|
||||
|
||||
if ( m_drawingParaProps->m_oBeforeSpacing.IsInit()
|
||||
&& m_drawingParaProps->m_oBeforeSpacing->m_oLineSpacingPoints.IsInit()
|
||||
&& m_drawingParaProps->m_oBeforeSpacing->m_oLineSpacingPoints->m_oVal.IsInit())
|
||||
oOutputProperty.m_nSpaceBefore = m_drawingParaProps->m_oBeforeSpacing->m_oLineSpacingPoints->m_oVal->GetValue();
|
||||
|
||||
if ( m_drawingParaProps->m_oAfterSpacing.IsInit()
|
||||
&& m_drawingParaProps->m_oAfterSpacing->m_oLineSpacingPoints.IsInit()
|
||||
&& m_drawingParaProps->m_oAfterSpacing->m_oLineSpacingPoints->m_oVal.IsInit())
|
||||
oOutputProperty.m_nSpaceAfter = m_drawingParaProps->m_oAfterSpacing->m_oLineSpacingPoints->m_oVal->GetValue();
|
||||
|
||||
if (m_drawingParaProps->m_oBuChar.IsInit() || m_drawingParaProps->m_oBuAutoNum.IsInit())
|
||||
{
|
||||
oOutputProperty.m_nListLevel = 0;
|
||||
oOutputProperty.m_nListId = oParam.oRtf->m_oListTable.GetCount() + 1;
|
||||
|
||||
RtfListProperty oNewList;
|
||||
oNewList.m_nID = oOutputProperty.m_nListId;
|
||||
oNewList.m_nListSimple = 1;
|
||||
|
||||
RtfListLevelProperty oNewLevel;
|
||||
if (m_drawingParaProps->m_oBuChar.IsInit() && m_drawingParaProps->m_oBuChar->m_sChar.IsInit())
|
||||
{
|
||||
oNewLevel.m_sText = m_drawingParaProps->m_oBuChar->m_sChar.get();
|
||||
oNewLevel.m_nNumberType = 23;
|
||||
}
|
||||
else if ( m_drawingParaProps->m_oBuAutoNum.IsInit() )
|
||||
{
|
||||
if (m_drawingParaProps->m_oBuAutoNum->m_sType.IsInit())
|
||||
oNewLevel.m_nNumberType = oNewLevel.GetFormat( m_drawingParaProps->m_oBuAutoNum->m_sType.get());
|
||||
else
|
||||
oNewLevel.m_nNumberType = 0;
|
||||
|
||||
if (m_drawingParaProps->m_oBuAutoNum->m_nStartAt.IsInit())
|
||||
oNewLevel.m_nStart = m_drawingParaProps->m_oBuAutoNum->m_nStartAt->GetValue();
|
||||
}
|
||||
|
||||
oNewList.AddItem( oNewLevel );
|
||||
oParam.oRtf->m_oListTable.AddItem( oNewList ); }
|
||||
|
||||
if (m_drawingParaProps->m_oRtl.IsInit())
|
||||
oOutputProperty.m_bRtl = m_drawingParaProps->m_oRtl->ToBool() ? 1 : 0;
|
||||
|
||||
if( m_drawingParaProps->m_oDefRunProperty.IsInit() )
|
||||
{
|
||||
OOXrPrReader orPrReader(m_drawingParaProps->m_oDefRunProperty.GetPointer());
|
||||
orPrReader.Parse( oParam, oOutputProperty.m_oCharProperty );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
bool OOXrPrReader::ParseDrawing( ReaderParameter oParam, RtfCharProperty& oOutputProperty)
|
||||
{
|
||||
if (m_drawingRunProps == NULL) return false;
|
||||
|
||||
|
||||
if (m_drawingRunProps->m_oBold.IsInit())
|
||||
oOutputProperty.m_bBold = m_drawingRunProps->m_oBold->ToBool() ? 1 : 0;
|
||||
|
||||
//if (m_drawingRunProps->m_oCaps.IsInit())
|
||||
// oOutputProperty.m_bCaps = m_drawingRunProps->m_oCaps->ToBool() ? 1 : 0;
|
||||
|
||||
if( m_drawingRunProps->m_oSz.IsInit())
|
||||
oOutputProperty.m_nFontSize = m_drawingRunProps->m_oSz->GetValue() / 50;
|
||||
|
||||
if (m_drawingRunProps->m_oItalic.IsInit())
|
||||
oOutputProperty.m_bItalic = m_drawingRunProps->m_oItalic->ToBool() ? 1 : 0;
|
||||
|
||||
if( m_drawingRunProps->m_oLatinFont.IsInit() || m_drawingRunProps->m_oComplexFont.IsInit() || m_drawingRunProps->m_oAsianFont.IsInit())
|
||||
{
|
||||
OOXFontReader3 oFontReader3(m_drawingRunProps->m_oLatinFont.GetPointer(),
|
||||
m_drawingRunProps->m_oAsianFont.GetPointer(),
|
||||
m_drawingRunProps->m_oComplexFont.GetPointer());
|
||||
oFontReader3.Parse( oParam, oOutputProperty.m_nFont);
|
||||
}
|
||||
//if (m_drawingRunProps->m_oComplexFont.IsInit() && m_drawingRunProps->m_oComplexFont->m_oTypeFace.IsInit())
|
||||
// oOutputProperty.m_nComplexScript = m_drawingRunProps->m_oCs->m_oVal.ToBool() ? 1 : 0;;
|
||||
|
||||
if (m_drawingRunProps->m_oOutline.IsInit())
|
||||
{
|
||||
//oOutputProperty.m_bOutline = m_drawingRunProps->m_oOutline->ToBool() ? 1 : 0;
|
||||
}
|
||||
|
||||
//if (m_drawingRunProps->m_oSmallCaps.IsInit())
|
||||
// oOutputProperty.m_bScaps = m_drawingRunProps->m_oSmallCaps->m_oVal.ToBool() ? 1 : 0;
|
||||
|
||||
//if (m_drawingRunProps->m_oShadow.IsInit())
|
||||
// oOutputProperty.m_bShadow = m_drawingRunProps->m_oShadow->m_oVal.ToBool() ? 1 : 0;
|
||||
|
||||
//if (m_drawingRunProps->m_oStrike.IsInit())
|
||||
// oOutputProperty.m_bStrike = m_drawingRunProps->m_oStrike->m_oVal.ToBool() ? 1 : 0;
|
||||
|
||||
//if (m_drawingRunProps->m_oDStrike.IsInit())
|
||||
// oOutputProperty.m_nStriked = m_drawingRunProps->m_oDStrike->m_oVal.ToBool() ? 1 : 0;
|
||||
|
||||
//if( m_drawingRunProps->m_oVertAlign.IsInit() && m_drawingRunProps->m_oVertAlign->m_oVal.IsInit())
|
||||
//{
|
||||
// switch(m_drawingRunProps->m_oVertAlign->m_oVal->GetValue())
|
||||
// {
|
||||
// case SimpleTypes::verticalalignrunBaseline : break;
|
||||
// case SimpleTypes::verticalalignrunSubscript : oOutputProperty.m_bSub = 1; break;
|
||||
// case SimpleTypes::verticalalignrunSuperscript : oOutputProperty.m_bSuper = 1; break;
|
||||
// default: break;
|
||||
// }
|
||||
//}
|
||||
//if( m_drawingRunProps->m_oHighlight.IsInit() && m_drawingRunProps->m_oHighlight->m_oVal.IsInit() )
|
||||
//{
|
||||
// //switch(m_drawingRunProps->m_oHighlight->m_oVal->GetValue())
|
||||
// //{//незачем
|
||||
// //}
|
||||
// oOutputProperty.m_nHightlited = oParam.oRtf->m_oColorTable.AddItem(RtfColor(m_drawingRunProps->m_oHighlight->m_oVal->Get_R(),
|
||||
// m_drawingRunProps->m_oHighlight->m_oVal->Get_G(),
|
||||
// m_drawingRunProps->m_oHighlight->m_oVal->Get_B()));
|
||||
//}
|
||||
if( m_drawingRunProps->m_oSolidFill.IsInit() )
|
||||
{
|
||||
//m_drawingRunProps->m_oSolidFill
|
||||
//OOXColorReader oColorReader;
|
||||
//RtfColor oColor;
|
||||
//if( true == oColorReader.Parse( oParam, m_drawingRunProps->m_oColor.get2(), oColor ) )
|
||||
//{
|
||||
// oOutputProperty.m_nForeColor = oParam.oRtf->m_oColorTable.AddItem( oColor );
|
||||
//}
|
||||
}
|
||||
if( m_drawingRunProps->m_oUnderline.IsInit())
|
||||
{
|
||||
switch(m_drawingRunProps->m_oUnderline->GetValue())
|
||||
{
|
||||
case SimpleTypes::underlineDash : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Dashed; break;
|
||||
case SimpleTypes::underlineDashDotDotHeavy : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Thick_dash_dot_dotted;break;
|
||||
case SimpleTypes::underlineDashDotHeavy : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Thick_dash_dotted; break;
|
||||
case SimpleTypes::underlineDashedHeavy : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Thick_dashed; break;
|
||||
case SimpleTypes::underlineDashLong : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Long_dashe; break;
|
||||
case SimpleTypes::underlineDashLongHeavy : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Thick_long_dashed; break;
|
||||
case SimpleTypes::underlineDotDash : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Dash_dotted; break;
|
||||
case SimpleTypes::underlineDotDotDash : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Dash_dot_dotted; break;
|
||||
case SimpleTypes::underlineDotted : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Dotted; break;
|
||||
case SimpleTypes::underlineDottedHeavy : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Thick_dotted; break;
|
||||
case SimpleTypes::underlineDouble : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Double; break;
|
||||
case SimpleTypes::underlineNone : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_none; break;
|
||||
case SimpleTypes::underlineSingle : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Single; break;
|
||||
case SimpleTypes::underlineThick : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Thick; break;
|
||||
case SimpleTypes::underlineWave : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Wave; break;
|
||||
case SimpleTypes::underlineWavyDouble : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Double_wave; break;
|
||||
case SimpleTypes::underlineWavyHeavy : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Heavy_wave; break;
|
||||
case SimpleTypes::underlineWords : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Word; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
//if ((m_drawingRunProps->m_oU->m_oColor.IsInit()) && (m_drawingRunProps->m_oU->m_oColor->GetValue() == SimpleTypes::hexcolorRGB))
|
||||
//{
|
||||
// RtfColor oColor(m_drawingRunProps->m_oU->m_oColor->Get_R(), m_drawingRunProps->m_oU->m_oColor->Get_G(), m_drawingRunProps->m_oU->m_oColor->Get_B());
|
||||
// oOutputProperty.m_nUnderlineColor = oParam.oRtf->m_oColorTable.AddItem( oColor );
|
||||
//}//todooo theme color, tint, shadow
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OOXpPrFrameReader::Parse( ReaderParameter oParam ,RtfFrame& oOutputProperty)
|
||||
{
|
||||
if (m_ooxFramePr == NULL) return false;
|
||||
|
||||
@ -40,6 +40,7 @@
|
||||
class OOXParagraphReader
|
||||
{
|
||||
private:
|
||||
OOX::Drawing::CParagraph *m_drawingParagraph;
|
||||
OOX::Logic::CParagraph *m_ooxParagraph;
|
||||
OOX::WritingElementWithChilds<OOX::WritingElement> *m_ooxElement;
|
||||
public:
|
||||
@ -47,15 +48,25 @@ public:
|
||||
|
||||
OOXParagraphReader (OOX::Logic::CParagraph *ooxParagraph)
|
||||
{
|
||||
m_ooxElement = NULL;
|
||||
m_ooxParagraph = ooxParagraph;
|
||||
m_ooxElement = NULL;
|
||||
m_ooxParagraph = ooxParagraph;
|
||||
m_drawingParagraph = NULL;
|
||||
|
||||
m_oCharProperty.SetDefault();
|
||||
}
|
||||
OOXParagraphReader (OOX::Drawing::CParagraph *ooxParagraph)
|
||||
{
|
||||
m_ooxElement = NULL;
|
||||
m_ooxParagraph = NULL;
|
||||
m_drawingParagraph = ooxParagraph;
|
||||
|
||||
m_oCharProperty.SetDefault();
|
||||
}
|
||||
OOXParagraphReader (OOX::WritingElementWithChilds<OOX::WritingElement> *ooxElement)
|
||||
{
|
||||
m_ooxParagraph = NULL;
|
||||
m_ooxElement = ooxElement;
|
||||
m_drawingParagraph = NULL;
|
||||
m_ooxParagraph = NULL;
|
||||
m_ooxElement = ooxElement;
|
||||
}
|
||||
bool Parse( ReaderParameter oParam , RtfParagraph& oOutputParagraph, CcnfStyle oConditionalTableStyle);
|
||||
bool Parse2( ReaderParameter oParam , RtfParagraph& oOutputParagraph, CcnfStyle oConditionalTableStyle, RtfStylePtr poStyle);
|
||||
|
||||
@ -44,11 +44,12 @@ class OOXGraphicReader
|
||||
{
|
||||
private:
|
||||
OOX::Drawing::CGraphic *m_ooxGraphic;
|
||||
|
||||
public:
|
||||
|
||||
OOXGraphicReader(OOX::Drawing::CGraphic *ooxGraphic)
|
||||
{
|
||||
m_ooxGraphic = ooxGraphic;
|
||||
m_ooxGraphic = ooxGraphic;
|
||||
}
|
||||
|
||||
int Parse( ReaderParameter oParam, RtfShapePtr & pOutput);
|
||||
};
|
||||
|
||||
@ -44,16 +44,23 @@
|
||||
class OOXRunReader
|
||||
{
|
||||
private:
|
||||
OOX::Drawing::CRun* m_drawingRun;
|
||||
OOX::Logic::CRun* m_ooxRun;
|
||||
public:
|
||||
RtfCharProperty m_oCharProperty;
|
||||
|
||||
OOXRunReader(OOX::Logic::CRun *ooxRun)
|
||||
{
|
||||
m_ooxRun = ooxRun;
|
||||
m_drawingRun = NULL;
|
||||
m_ooxRun = ooxRun;
|
||||
m_oCharProperty.SetDefault();
|
||||
}
|
||||
OOXRunReader(OOX::Drawing::CRun *ooxRun)
|
||||
{
|
||||
m_drawingRun = ooxRun;
|
||||
m_ooxRun = NULL;
|
||||
m_oCharProperty.SetDefault();
|
||||
}
|
||||
|
||||
bool Parse( ReaderParameter oParam , RtfParagraph& oOutputParagraph, RtfStylePtr poStyle );
|
||||
bool Parse( ReaderParameter oParam , RtfParagraph& oOutputParagraph, RtfStylePtr poStyle, RtfCharProperty& oNewProperty, OOX::WritingElement* ooxItem );
|
||||
};
|
||||
@ -32,9 +32,10 @@
|
||||
#include "OOXShapeReader.h"
|
||||
#include "OOXTextItemReader.h"
|
||||
|
||||
#include "../../../ASCOfficePPTXFile/Editor/Drawing/Elements.h"
|
||||
#include "../../../ASCOfficePPTXFile/Editor/Drawing/Shapes/Shape.h"
|
||||
#include "../../../ASCOfficePPTXFile/PPTXFormat/Logic/Shape.h"
|
||||
|
||||
#include "../../../ASCOfficeOdfFile/src/odf/svg_parser.h"
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#ifndef RGB
|
||||
@ -1045,8 +1046,11 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
|
||||
}
|
||||
}
|
||||
|
||||
std::wstring strXml;
|
||||
if (m_ooxShape->m_oSpPr->m_oCustGeom.IsInit())
|
||||
{
|
||||
pOutput->m_nShapeType = SimpleTypes::Vml::sptNotPrimitive;
|
||||
strXml = m_ooxShape->m_oSpPr->m_oCustGeom->toXML();
|
||||
}
|
||||
if (m_ooxShape->m_oSpPr->m_oPrstGeom.IsInit())
|
||||
{
|
||||
@ -1054,20 +1058,38 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
|
||||
SimpleTypes::EShapeType type = geometry->m_oPrst.GetValue();
|
||||
|
||||
pOutput->m_nShapeType = OOX::PrstGeom2VmlShapeType(type);
|
||||
|
||||
if (pOutput->m_nShapeType == SimpleTypes::Vml::sptNotPrimitive)
|
||||
{
|
||||
pOutput->m_nShapeType = 0; //custom
|
||||
strXml = m_ooxShape->m_oSpPr->m_oPrstGeom->toXML();
|
||||
}
|
||||
if (pOutput->m_nShapeType == SimpleTypes::Vml::sptNotPrimitive && !strXml.empty())
|
||||
{
|
||||
XmlUtils::CXmlNode xmlNode;
|
||||
xmlNode.FromXmlString(strXml);
|
||||
PPTX::Logic::Geometry geom(xmlNode);
|
||||
|
||||
NSPresentationEditor::CShapeElement* pShapeElement = NULL;
|
||||
if(type != OOXMLShapes::sptNil)
|
||||
pShapeElement = new NSPresentationEditor::CShapeElement(NSBaseShape::pptx, (int)type);
|
||||
if (pShapeElement)
|
||||
{
|
||||
|
||||
delete pShapeElement;
|
||||
}
|
||||
}
|
||||
std::wstring strVmlPath, strVmlRect;
|
||||
|
||||
LONG lW = 0, lH = 0;
|
||||
|
||||
//if ((m_ooxShape->m_oSpPr->m_oXfrm.IsInit()) && (m_ooxShape->m_oSpPr->m_oXfrm->m_oExt.IsInit()))
|
||||
//{
|
||||
// lW = m_ooxShape->m_oSpPr->m_oXfrm->m_oExt->m_oCx.GetValue();
|
||||
// lH = m_ooxShape->m_oSpPr->m_oXfrm->m_oExt->m_oCy.GetValue();
|
||||
//}
|
||||
|
||||
COOXToVMLGeometry *renderer = new COOXToVMLGeometry();
|
||||
geom.ConvertToCustomVML(renderer, strVmlPath, strVmlRect, lW, lH);
|
||||
delete renderer;
|
||||
|
||||
if (!strVmlPath.empty())
|
||||
ParseVmlPath(pOutput, strVmlPath);
|
||||
|
||||
pOutput->m_nShapePath = 4; //complex
|
||||
|
||||
pOutput->m_nGeoLeft = 0;
|
||||
pOutput->m_nGeoTop = 0;
|
||||
pOutput->m_nGeoRight = 100000;
|
||||
pOutput->m_nGeoBottom = 100000;
|
||||
}
|
||||
if (m_ooxShape->m_oSpPr->m_oXfrm.IsInit())
|
||||
{
|
||||
@ -1082,8 +1104,8 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
|
||||
{
|
||||
if (m_ooxShape->m_oSpPr->m_oXfrm->m_oOff.IsInit())
|
||||
{
|
||||
pOutput->m_nRelLeft = m_ooxShape->m_oSpPr->m_oXfrm->m_oOff->m_oX.ToEmu();
|
||||
pOutput->m_nRelTop = m_ooxShape->m_oSpPr->m_oXfrm->m_oOff->m_oY.ToEmu();
|
||||
pOutput->m_nRelLeft = (int)m_ooxShape->m_oSpPr->m_oXfrm->m_oOff->m_oX.ToEmu();
|
||||
pOutput->m_nRelTop = (int)m_ooxShape->m_oSpPr->m_oXfrm->m_oOff->m_oY.ToEmu();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1092,8 +1114,8 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
|
||||
}
|
||||
if (m_ooxShape->m_oSpPr->m_oXfrm->m_oExt.IsInit())
|
||||
{
|
||||
pOutput->m_nRelRight = pOutput->m_nRelLeft + m_ooxShape->m_oSpPr->m_oXfrm->m_oExt->m_oCx.GetValue();
|
||||
pOutput->m_nRelBottom = pOutput->m_nRelTop + m_ooxShape->m_oSpPr->m_oXfrm->m_oExt->m_oCy.GetValue();
|
||||
pOutput->m_nRelRight = (int)pOutput->m_nRelLeft + m_ooxShape->m_oSpPr->m_oXfrm->m_oExt->m_oCx.GetValue();
|
||||
pOutput->m_nRelBottom = (int)pOutput->m_nRelTop + m_ooxShape->m_oSpPr->m_oXfrm->m_oExt->m_oCy.GetValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1138,15 +1160,29 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
|
||||
//OoxConverter::Parse(m_ooxShape->m_oCNvConnSpPr.GetPointer());
|
||||
pOutput->m_bFilled = false; //частенько приплывает из стиля заполенение объекта .. а он то одномерный :)
|
||||
}
|
||||
OOX::Drawing::CTextBodyProperties * text_properties = NULL;
|
||||
OOXTextItemReader oTextItemReader;
|
||||
|
||||
if (m_ooxShape->m_oTxBody.IsInit() && m_ooxShape->m_oTxBody->m_oTxtbxContent.IsInit())
|
||||
{
|
||||
OOXTextItemReader oTextItemReader;
|
||||
|
||||
for (size_t i=0; i < m_ooxShape->m_oTxBody->m_oTxtbxContent->m_arrItems.size(); i++)
|
||||
{
|
||||
oTextItemReader.Parse( m_ooxShape->m_oTxBody->m_oTxtbxContent->m_arrItems[i], oParam );
|
||||
}
|
||||
|
||||
|
||||
text_properties = m_ooxShape->m_oTxBodyProperties.GetPointer();
|
||||
}
|
||||
else if (m_ooxShape->m_oTxBodyAlt.IsInit())
|
||||
{
|
||||
for (size_t i=0; i < m_ooxShape->m_oTxBodyAlt->m_arrItems.size(); i++)
|
||||
{
|
||||
oTextItemReader.Parse( m_ooxShape->m_oTxBodyAlt->m_arrItems[i], oParam );
|
||||
}
|
||||
text_properties = m_ooxShape->m_oTxBodyAlt->m_oBodyPr.GetPointer();
|
||||
}
|
||||
|
||||
if (oTextItemReader.m_oTextItems)
|
||||
{
|
||||
if (pOutput->m_bGtext == 1)
|
||||
{
|
||||
RenderParameter oRenderParameter;
|
||||
@ -1158,21 +1194,11 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
|
||||
{
|
||||
pOutput->m_aTextItems = oTextItemReader.m_oTextItems;
|
||||
}
|
||||
//for (size_t i=0 ; i < m_ooxShape->m_oTxBody->m_oTxtbxContent->m_arrItems.size();i++)
|
||||
//{
|
||||
// Parse(m_ooxShape->m_oTxBody->m_oTxtbxContent->m_arrItems[i]);
|
||||
//}
|
||||
//odt_context->drawing_context()->set_text( odt_context->text_context());
|
||||
//
|
||||
////наложим внешние настройки для текста
|
||||
//OoxConverter::Parse(m_ooxShape->m_oTxBodyProperties.GetPointer());
|
||||
//
|
||||
//if (m_ooxShape->m_oShapeStyle.IsInit() && m_ooxShape->m_oShapeStyle->m_oFontRef.getType() == OOX::et_a_fontRef)
|
||||
//{
|
||||
// OoxConverter::Parse(&m_ooxShape->m_oShapeStyle->m_oFontRef);
|
||||
//}
|
||||
}
|
||||
|
||||
if (text_properties)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1193,6 +1219,7 @@ bool OOXShapeReader::ParseVml( ReaderParameter oParam , RtfShapePtr& pOutput)
|
||||
// геометрия --------------------------------------------------------------------------------------------------------
|
||||
|
||||
SimpleTypes::Vml::CVmlPath * custom_path = NULL;
|
||||
int Width = 0, Height = 0;
|
||||
|
||||
if (OOX::Vml::CShapeType* shape_type = dynamic_cast<OOX::Vml::CShapeType*>(m_vmlElement))
|
||||
{
|
||||
@ -1215,6 +1242,11 @@ bool OOXShapeReader::ParseVml( ReaderParameter oParam , RtfShapePtr& pOutput)
|
||||
}
|
||||
}
|
||||
custom_path = shape_type->m_oPath.GetPointer();
|
||||
if (shape_type->m_oCoordOrigin.IsInit())
|
||||
{
|
||||
Width = shape_type->m_oCoordOrigin->GetX();
|
||||
Height = shape_type->m_oCoordOrigin->GetY();
|
||||
}
|
||||
}
|
||||
if (OOX::Vml::CShape* shape = dynamic_cast<OOX::Vml::CShape*>(m_vmlElement))
|
||||
{
|
||||
@ -1249,6 +1281,11 @@ bool OOXShapeReader::ParseVml( ReaderParameter oParam , RtfShapePtr& pOutput)
|
||||
pOutput->m_nShapeType = NSOfficeDrawing::sptNotPrimitive;
|
||||
}
|
||||
custom_path = shape->m_oPath.GetPointer();
|
||||
if (shape->m_oCoordOrigin.IsInit())
|
||||
{
|
||||
Width = shape->m_oCoordOrigin->GetX();
|
||||
Height = shape->m_oCoordOrigin->GetY();
|
||||
}
|
||||
}
|
||||
else if (OOX::Vml::CRect* rect = dynamic_cast<OOX::Vml::CRect*>(m_vmlElement))
|
||||
{
|
||||
@ -1277,12 +1314,18 @@ bool OOXShapeReader::ParseVml( ReaderParameter oParam , RtfShapePtr& pOutput)
|
||||
else if (OOX::Vml::CPolyLine* polyline = dynamic_cast<OOX::Vml::CPolyLine*>(m_vmlElement))
|
||||
{
|
||||
pOutput->m_nShapeType = NSOfficeDrawing::sptNotPrimitive;
|
||||
//polyline->m_oPoints
|
||||
}
|
||||
|
||||
if (pOutput->m_nShapeType == NSOfficeDrawing::sptNotPrimitive && custom_path)
|
||||
{
|
||||
return false;
|
||||
ParseVmlPath(pOutput, custom_path->GetValue());
|
||||
|
||||
pOutput->m_nShapePath = 4; //complex
|
||||
|
||||
pOutput->m_nGeoLeft = 0;
|
||||
pOutput->m_nGeoTop = 0;
|
||||
pOutput->m_nGeoRight = Width;
|
||||
pOutput->m_nGeoBottom = Height;
|
||||
}
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
if (m_vmlElement->m_oFilled.IsInit())
|
||||
@ -1298,7 +1341,7 @@ bool OOXShapeReader::ParseVml( ReaderParameter oParam , RtfShapePtr& pOutput)
|
||||
pOutput->m_nLineColor = (m_vmlElement->m_oStrokeColor->Get_B() << 16) + (m_vmlElement->m_oStrokeColor->Get_G() << 8) + m_vmlElement->m_oStrokeColor->Get_R();
|
||||
|
||||
if( m_vmlElement->m_oStrokeWeight.IsInit())
|
||||
pOutput->m_nLineWidth = m_vmlElement->m_oStrokeWeight->ToEmu();
|
||||
pOutput->m_nLineWidth = (int)m_vmlElement->m_oStrokeWeight->ToEmu();
|
||||
|
||||
if (m_vmlElement->m_oConnectorType.IsInit())
|
||||
{
|
||||
@ -1472,7 +1515,7 @@ bool OOXShapeGroupReader::Parse( ReaderParameter oParam , RtfShapePtr& pOutput)
|
||||
{
|
||||
double rot = m_ooxGroup->m_oGroupSpPr->m_oXfrm->m_oRot.GetAngle();
|
||||
if (rot > 0.01)
|
||||
pOutput->m_nRotation = rot * 65535;
|
||||
pOutput->m_nRotation = (int)(rot * 65535);
|
||||
|
||||
if (m_ooxGroup->m_oGroupSpPr->m_oXfrm->m_oFlipH.ToBool()) pOutput->m_bFlipH = 1;
|
||||
if (m_ooxGroup->m_oGroupSpPr->m_oXfrm->m_oFlipV.ToBool()) pOutput->m_bFlipV = 1;
|
||||
@ -1491,8 +1534,8 @@ bool OOXShapeGroupReader::Parse( ReaderParameter oParam , RtfShapePtr& pOutput)
|
||||
{
|
||||
if (m_ooxGroup->m_oGroupSpPr->m_oXfrm->m_oOff.IsInit())
|
||||
{
|
||||
pOutput->m_nRelLeft = m_ooxGroup->m_oGroupSpPr->m_oXfrm->m_oOff->m_oX.ToEmu();
|
||||
pOutput->m_nRelTop = m_ooxGroup->m_oGroupSpPr->m_oXfrm->m_oOff->m_oY.ToEmu();
|
||||
pOutput->m_nRelLeft = (int)m_ooxGroup->m_oGroupSpPr->m_oXfrm->m_oOff->m_oX.ToEmu();
|
||||
pOutput->m_nRelTop = (int)m_ooxGroup->m_oGroupSpPr->m_oXfrm->m_oOff->m_oY.ToEmu();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1501,8 +1544,8 @@ bool OOXShapeGroupReader::Parse( ReaderParameter oParam , RtfShapePtr& pOutput)
|
||||
}
|
||||
if (m_ooxGroup->m_oGroupSpPr->m_oXfrm->m_oExt.IsInit())
|
||||
{
|
||||
pOutput->m_nRelRight = pOutput->m_nRelLeft + m_ooxGroup->m_oGroupSpPr->m_oXfrm->m_oExt->m_oCx.GetValue();
|
||||
pOutput->m_nRelBottom = pOutput->m_nRelTop + m_ooxGroup->m_oGroupSpPr->m_oXfrm->m_oExt->m_oCy.GetValue();
|
||||
pOutput->m_nRelRight = (int)pOutput->m_nRelLeft + m_ooxGroup->m_oGroupSpPr->m_oXfrm->m_oExt->m_oCx.GetValue();
|
||||
pOutput->m_nRelBottom = (int)pOutput->m_nRelTop + m_ooxGroup->m_oGroupSpPr->m_oXfrm->m_oExt->m_oCy.GetValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1566,7 +1609,42 @@ bool OOXShapeGroupReader::Parse( ReaderParameter oParam , RtfShapePtr& pOutput)
|
||||
return true;
|
||||
}
|
||||
|
||||
void OOXShapeReader::ParseAdjustment(RtfShape& oShape, std::wstring sAdjustment)
|
||||
void OOXShapeReader::ParseVmlPath (RtfShapePtr& pOutput, const std::wstring &custom_path)
|
||||
{
|
||||
std::vector<svg_path::_polyline> o_Polyline;
|
||||
|
||||
bool res = svg_path::parseVml(o_Polyline, custom_path);
|
||||
|
||||
int val = 0;
|
||||
for (size_t i = 0; i < o_Polyline.size(); i++)
|
||||
{
|
||||
if (o_Polyline[i].command == L"m")
|
||||
{
|
||||
val = 0x4000;
|
||||
}
|
||||
else if (o_Polyline[i].command == L"l")
|
||||
{
|
||||
val = 0x0000 | 1;
|
||||
}
|
||||
else if (o_Polyline[i].command == L"c")
|
||||
{
|
||||
val = 0x2000 | 1;
|
||||
}
|
||||
|
||||
pOutput->m_aPSegmentInfo.push_back(val);
|
||||
|
||||
for (size_t j = 0; j < o_Polyline[i].points.size(); j++)
|
||||
{
|
||||
pOutput->m_aPVerticles.push_back(std::make_pair((int)(o_Polyline[i].points[j].x.get_value_or(0)/* / 10000. * W*/),
|
||||
(int)(o_Polyline[i].points[j].y.get_value_or(0)/* / 10000. * H*/)));
|
||||
}
|
||||
}
|
||||
|
||||
pOutput->m_aPSegmentInfo.push_back(0x6001);
|
||||
pOutput->m_aPSegmentInfo.push_back(0x8000);
|
||||
}
|
||||
|
||||
void OOXShapeReader::ParseAdjustment (RtfShape& oShape, std::wstring sAdjustment)
|
||||
{
|
||||
std::vector< std::wstring > splitted;
|
||||
|
||||
@ -1622,7 +1700,7 @@ bool OOXBackgroundReader::Parse( ReaderParameter oParam , RtfShapePtr& pOutput)
|
||||
|
||||
unsigned char opacity = m_ooxBackground->m_oColor->Get_A();
|
||||
if (opacity != 0xff)
|
||||
pOutput->m_nFillOpacity = opacity / 255. * 100;
|
||||
pOutput->m_nFillOpacity = (int)(opacity / 255. * 100);
|
||||
}
|
||||
if (m_ooxBackground->m_oColor->GetValue() == SimpleTypes::colormodeAuto)
|
||||
rtfColor.m_bAuto = true;
|
||||
@ -1759,8 +1837,8 @@ bool OOXShapeReader::WriteDataToPicture( std::wstring sPath, RtfPicture& pOutput
|
||||
meta.GetBounds(&dX, &dY, &dW, &dH);
|
||||
meta.Close();
|
||||
|
||||
pOutput.m_nWidthGoal = dW * 15; //pixels to twip
|
||||
pOutput.m_nHeightGoal = dH * 15; //pixels to twip;
|
||||
pOutput.m_nWidthGoal = (int)(dW * 15); //pixels to twip
|
||||
pOutput.m_nHeightGoal = (int)(dH * 15); //pixels to twip;
|
||||
}
|
||||
//Запоминаем только имя
|
||||
pOutput.m_sPicFilename = sPath;
|
||||
@ -1780,6 +1858,5 @@ bool OOXShapeReader::WriteDataToPicture( std::wstring sPath, RtfPicture& pOutput
|
||||
pOutput.m_bIsCopy = false; //не удалять
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -88,7 +88,8 @@ private:
|
||||
|
||||
OOX::Logic::CShape *m_ooxShape;
|
||||
|
||||
bool ParseVmlStyles(RtfShapePtr pShape, std::vector<SimpleTypes::Vml::CCssPropertyPtr> & props)
|
||||
void ParseVmlPath (RtfShapePtr& pShape, const std::wstring &custom_path);
|
||||
bool ParseVmlStyles (RtfShapePtr& pShape, std::vector<SimpleTypes::Vml::CCssPropertyPtr> & props)
|
||||
{
|
||||
for (size_t i=0; i< props.size(); i++)
|
||||
{
|
||||
|
||||
@ -53,6 +53,22 @@ public:
|
||||
{
|
||||
switch(ooxElement->getType())
|
||||
{
|
||||
case OOX::et_a_p:
|
||||
{
|
||||
OOX::Drawing::CParagraph * pParagraph = dynamic_cast<OOX::Drawing::CParagraph*>(ooxElement);
|
||||
|
||||
OOXParagraphReader m_oParagraphReader(pParagraph);
|
||||
RtfParagraphPtr oNewParagraph ( new RtfParagraph() );
|
||||
//применяем к новому параграфу default property
|
||||
oNewParagraph->m_oProperty = oParam.oRtf->m_oDefaultParagraphProp;
|
||||
oNewParagraph->m_oProperty.m_oCharProperty = oParam.oRtf->m_oDefaultCharProp;
|
||||
oNewParagraph->m_oProperty.m_nItap = 0;
|
||||
|
||||
if( true == m_oParagraphReader.Parse( oParam, (*oNewParagraph), CcnfStyle() ))
|
||||
{
|
||||
m_oTextItems->AddItem( oNewParagraph );
|
||||
}
|
||||
}break;
|
||||
case OOX::et_w_p:
|
||||
{
|
||||
OOX::Logic::CParagraph * pParagraph = dynamic_cast<OOX::Logic::CParagraph*>(ooxElement);
|
||||
@ -67,15 +83,6 @@ public:
|
||||
if( true == m_oParagraphReader.Parse( oParam, (*oNewParagraph), CcnfStyle() ))
|
||||
{
|
||||
m_oTextItems->AddItem( oNewParagraph );
|
||||
//if( true == oParam.oRtf->m_oStatusSection.start_new )
|
||||
//{
|
||||
// RtfSectionPtr oCurSection;
|
||||
// if( true == oParam.oRtf->GetItem( oCurSection, oParam.oRtf->m_oStatusSection.number - 1) )
|
||||
// {
|
||||
// m_oTextItems = oCurSection;
|
||||
// }
|
||||
// oParam.oRtf->m_oStatusSection.start_new = false;
|
||||
//}
|
||||
}
|
||||
}break;
|
||||
case OOX::et_w_tbl:
|
||||
|
||||
@ -44,14 +44,24 @@
|
||||
class OOXpPrReader
|
||||
{
|
||||
private:
|
||||
OOX::Logic::CParagraphProperty *m_ooxParaProps;
|
||||
bool ParseDrawing( ReaderParameter oParam, RtfParagraphProperty& oOutputProperty);
|
||||
|
||||
OOX::Drawing::CParagraphProperty * m_drawingParaProps;
|
||||
OOX::Logic::CParagraphProperty * m_ooxParaProps;
|
||||
public:
|
||||
bool m_bDefStyle;
|
||||
|
||||
OOXpPrReader(OOX::Logic::CParagraphProperty *ooxParaProps)
|
||||
{
|
||||
m_bDefStyle = true;
|
||||
m_ooxParaProps = ooxParaProps;
|
||||
m_bDefStyle = true;
|
||||
m_ooxParaProps = ooxParaProps;
|
||||
m_drawingParaProps = NULL;
|
||||
}
|
||||
OOXpPrReader(OOX::Drawing::CParagraphProperty *ooxParaProps)
|
||||
{
|
||||
m_bDefStyle = true;
|
||||
m_ooxParaProps = NULL;
|
||||
m_drawingParaProps = ooxParaProps;
|
||||
}
|
||||
bool Parse( ReaderParameter oParam ,RtfParagraphProperty& oOutputProperty, CcnfStyle& oConditionalTableStyle);
|
||||
};
|
||||
|
||||
@ -43,15 +43,24 @@
|
||||
class OOXrPrReader
|
||||
{
|
||||
private:
|
||||
OOX::Logic::CRunProperty *m_ooxRunProps;
|
||||
bool ParseDrawing( ReaderParameter oParam, RtfCharProperty& oOutputProperty);
|
||||
|
||||
OOX::Drawing::CRunProperty * m_drawingRunProps;
|
||||
OOX::Logic::CRunProperty * m_ooxRunProps;
|
||||
public:
|
||||
bool m_bDefStyle;
|
||||
|
||||
OOXrPrReader(OOX::Logic::CRunProperty *ooxRunProps)
|
||||
{
|
||||
m_bDefStyle = true;
|
||||
m_ooxRunProps = ooxRunProps;
|
||||
m_bDefStyle = true;
|
||||
m_ooxRunProps = ooxRunProps;
|
||||
m_drawingRunProps = NULL;
|
||||
}
|
||||
|
||||
OOXrPrReader(OOX::Drawing::CRunProperty *ooxRunProps)
|
||||
{
|
||||
m_bDefStyle = true;
|
||||
m_ooxRunProps = NULL;
|
||||
m_drawingRunProps = ooxRunProps;
|
||||
}
|
||||
bool Parse( ReaderParameter oParam ,RtfCharProperty& oOutputProperty);
|
||||
};
|
||||
|
||||
@ -500,7 +500,6 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
|
||||
}
|
||||
if( !m_aPSegmentInfo.empty())
|
||||
{
|
||||
sResult += L"{\\sp{\\sn pSegmentInfo}{\\sv ";
|
||||
sResult += L"{\\sp{\\sn pSegmentInfo}{\\sv 2;" + std::to_wstring( m_aPSegmentInfo.size() );
|
||||
for (size_t i = 0; i < m_aPSegmentInfo.size(); i ++ )
|
||||
sResult += L";" + std::to_wstring( m_aPSegmentInfo[i] );
|
||||
@ -807,14 +806,14 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
if (m_sName.empty())
|
||||
{
|
||||
RtfDocument* poDocument = static_cast<RtfDocument*>( oRenderParameter.poDocument );
|
||||
m_sName += L"_x0000_s " + std::to_wstring(poDocument->GetShapeId( m_nID )) + L"";
|
||||
m_sName += L"_x0000_s" + std::to_wstring(poDocument->GetShapeId( m_nID )) + L"";
|
||||
}
|
||||
sResult += L" id=\"" + m_sName + L"\"";
|
||||
|
||||
if( PROP_DEF != m_nShapeType && 0 != m_nShapeType)
|
||||
{
|
||||
sResult += L" type=\"#_x0000_t " + std::to_wstring(m_nShapeType) + L"\"";
|
||||
sResult += L" o:spt=\" " + std::to_wstring(m_nShapeType) + L"\"";
|
||||
sResult += L" type=\"#_x0000_t" + std::to_wstring(m_nShapeType) + L"\"";
|
||||
sResult += L" o:spt=\"" + std::to_wstring(m_nShapeType) + L"\"";
|
||||
}
|
||||
|
||||
if( 0 == m_bFilled) sResult += L" filled=\"f\"";
|
||||
@ -882,11 +881,11 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
int nHeight = m_nRelBottom - m_nRelTop;
|
||||
|
||||
sStyle += L"position:absolute;";
|
||||
sStyle += L"left: " + std::to_wstring(m_nRelLeft) + L";";
|
||||
sStyle += L"top: " + std::to_wstring(m_nRelTop) + L";";
|
||||
//sStyle += L"bottom: " + std::to_wstring() + L";" , m_nRelBottom );
|
||||
//sStyle += L"right: " + std::to_wstring() + L";" , m_nRelRight);
|
||||
sStyle += L"width: " + std::to_wstring(nWidth) + L";height: " + std::to_wstring(nHeight) + L";";
|
||||
sStyle += L"left:" + std::to_wstring(m_nRelLeft) + L";";
|
||||
sStyle += L"top:" + std::to_wstring(m_nRelTop) + L";";
|
||||
//sStyle += L"bottom:" + std::to_wstring() + L";" , m_nRelBottom );
|
||||
//sStyle += L"right:" + std::to_wstring() + L";" , m_nRelRight);
|
||||
sStyle += L"width:" + std::to_wstring(nWidth) + L";height:" + std::to_wstring(nHeight) + L";";
|
||||
}
|
||||
else if( 0 != m_oPicture && PROP_DEF != m_oPicture->m_nWidthGoal && PROP_DEF != m_oPicture->m_nHeightGoal
|
||||
&& PROP_DEF != (int)m_oPicture->m_dScaleX && PROP_DEF != (int)m_oPicture->m_dScaleY )
|
||||
@ -920,7 +919,7 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
}
|
||||
if( PROP_DEF != m_nPositionHPct )//todo
|
||||
{
|
||||
sStyle += L"mso-left-percent: " + std::to_wstring(m_nPositionHPct) + L";";
|
||||
sStyle += L"mso-left-percent:" + std::to_wstring(m_nPositionHPct) + L";";
|
||||
}
|
||||
if( PROP_DEF != m_nPositionH && PROP_DEF == m_nPositionHRelative )
|
||||
m_nPositionHRelative = 2;
|
||||
@ -958,7 +957,7 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
case 5: sStyle += L"mso-position-vertical:outside;"; break;
|
||||
}
|
||||
if( PROP_DEF != m_nPositionVPct )
|
||||
sStyle += L"mso-top-percent: " + std::to_wstring(m_nPositionVPct) + L";";
|
||||
sStyle += L"mso-top-percent:" + std::to_wstring(m_nPositionVPct) + L";";
|
||||
|
||||
if( PROP_DEF != m_nPositionV && PROP_DEF == m_nPositionVRelative )
|
||||
m_nPositionVRelative =2;
|
||||
@ -981,12 +980,12 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
switch( m_eYAnchor )
|
||||
{
|
||||
case ay_page: sStyle += L"mso-position-vertical-relative:page;"; break;
|
||||
case ay_margin: sStyle += L"mso-position-vertical-relative:margin;"; break;
|
||||
case ay_margin: sStyle += L" mso-position-vertical-relative:margin;"; break;
|
||||
//case ay_Para: sStyle += L"mso-position-vertical-relative:text;"; break;
|
||||
}
|
||||
}
|
||||
if( PROP_DEF != m_nPctWidth )
|
||||
sStyle += L"mso-width-percent: " + std::to_wstring(m_nPctWidth) + L";";
|
||||
sStyle += L"mso-width-percent:" + std::to_wstring(m_nPctWidth) + L";";
|
||||
switch( m_nPctWidthRelative )
|
||||
{
|
||||
case 0: sStyle += L"mso-width-relative:margin;"; break;
|
||||
@ -998,7 +997,7 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
}
|
||||
|
||||
if( PROP_DEF != m_nPctHeight )
|
||||
sStyle += L"mso-height-percent: " + std::to_wstring(m_nPctHeight) + L";";
|
||||
sStyle += L"mso-height-percent:" + std::to_wstring(m_nPctHeight) + L";";
|
||||
|
||||
switch( m_nPctHeightRelative )
|
||||
{
|
||||
@ -1011,9 +1010,9 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
}
|
||||
|
||||
if( PROP_DEF != m_nRotation )
|
||||
sStyle += L"rotation: " + std::to_wstring(m_nRotation / 65536) + L";";
|
||||
sStyle += L"rotation:" + std::to_wstring(m_nRotation / 65536) + L";";
|
||||
else if( PROP_DEF != m_nRelRotation )
|
||||
sStyle += L"rotation: " + std::to_wstring(m_nRelRotation / 65536) + L";";
|
||||
sStyle += L"rotation:" + std::to_wstring(m_nRelRotation / 65536) + L";";
|
||||
|
||||
int nZIndex = PROP_DEF;
|
||||
if( PROP_DEF != m_nRelZOrder )
|
||||
@ -1030,7 +1029,7 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
else nZIndex -= 10000;
|
||||
}
|
||||
if (PROP_DEF != nZIndex)
|
||||
sStyle += L"z-index: " + std::to_wstring(nZIndex) + L";";
|
||||
sStyle += L"z-index:" + std::to_wstring(nZIndex) + L";";
|
||||
|
||||
if( PROP_DEF != m_nWrapDistLeft )
|
||||
sStyle += L"mso-wrap-distance-left:" + XmlUtils::DoubleToString(RtfUtility::Twip2pt( m_nWrapDistLeft ), L"%.2f") + L"pt;";
|
||||
@ -1062,15 +1061,15 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
sResult += L" style=\"" + sStyle + L"\"";
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------------------------------
|
||||
if( true == m_bIsOle ) sResult += L" o:ole=\"\"";
|
||||
if( true == m_bIsOle ) sResult += L" o:ole=\"\"";
|
||||
|
||||
if( PROP_DEF != m_nGroupLeft && PROP_DEF != m_nGroupTop )
|
||||
sResult += L" coordorigin=\" " + std::to_wstring(m_nGroupLeft) + L", " + std::to_wstring(m_nGroupTop) + L"\"";
|
||||
sResult += L" coordorigin=\"" + std::to_wstring(m_nGroupLeft) + L"," + std::to_wstring(m_nGroupTop) + L"\"";
|
||||
|
||||
if( PROP_DEF != m_nGroupLeft && PROP_DEF != m_nGroupTop && PROP_DEF != m_nGroupRight && PROP_DEF != m_nGroupBottom)
|
||||
sResult += L" coordsize=\" " + std::to_wstring(m_nGroupRight - m_nGroupLeft) + L", " + std::to_wstring(m_nGroupBottom - m_nGroupTop) + L"\"";
|
||||
sResult += L" coordsize=\"" + std::to_wstring(m_nGroupRight - m_nGroupLeft) + L"," + std::to_wstring(m_nGroupBottom - m_nGroupTop) + L"\"";
|
||||
else if ( PROP_DEF != m_nGeoLeft && PROP_DEF != m_nGeoTop && PROP_DEF != m_nGeoRight && PROP_DEF != m_nGeoBottom)
|
||||
sResult += L" coordsize=\" " + std::to_wstring(m_nGeoRight - m_nGeoLeft) + L", " + std::to_wstring(m_nGeoBottom - m_nGeoTop) + L"\"";
|
||||
sResult += L" coordsize=\"" + std::to_wstring(m_nGeoRight - m_nGeoLeft) + L"," + std::to_wstring(m_nGeoBottom - m_nGeoTop) + L"\"";
|
||||
|
||||
if (oRenderParameter.nType != RENDER_TO_OOX_PARAM_SHAPE_WSHAPE2)
|
||||
{
|
||||
@ -1097,7 +1096,7 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
for (size_t i = 1 ; i < 10; i++)
|
||||
{
|
||||
if (PROP_DEF != m_nAdjustValue[i])
|
||||
sAdjust += L", " + std::to_wstring(m_nAdjustValue[i]) + L"";
|
||||
sAdjust += L"," + std::to_wstring(m_nAdjustValue[i]) + L"";
|
||||
else
|
||||
sAdjust += L",";
|
||||
}
|
||||
@ -1136,7 +1135,7 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
sResult += L" wrapcoords=\"";
|
||||
sResult += L" " + std::to_wstring(m_aWrapPoints[0].first) + L", " + std::to_wstring(m_aWrapPoints[0].second) + L"";
|
||||
|
||||
for (size_t i = 0; i < (int)m_aWrapPoints.size(); i++ )
|
||||
for (size_t i = 1; i < (int)m_aWrapPoints.size(); i++ )
|
||||
{
|
||||
sResult += L", " + std::to_wstring(m_aWrapPoints[i].first) + L", " + std::to_wstring(m_aWrapPoints[i].second) + L"";
|
||||
}
|
||||
@ -1246,9 +1245,9 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
sResult += L"<v:textbox";
|
||||
if (m_nTexpLeft != PROP_DEF && m_nTexpTop != PROP_DEF && m_nTexpRight != PROP_DEF && m_nTexpBottom != PROP_DEF)
|
||||
{
|
||||
sResult += L" inset=\" " + std::to_wstring((int)RtfUtility::Emu2Pt(m_nTexpLeft)) + L"pt, "
|
||||
+ std::to_wstring((int)RtfUtility::Emu2Pt(m_nTexpTop)) + L"pt, "
|
||||
+ std::to_wstring((int)RtfUtility::Emu2Pt(m_nTexpRight)) + L"pt, "
|
||||
sResult += L" inset=\"" + std::to_wstring((int)RtfUtility::Emu2Pt(m_nTexpLeft)) + L"pt,"
|
||||
+ std::to_wstring((int)RtfUtility::Emu2Pt(m_nTexpTop)) + L"pt,"
|
||||
+ std::to_wstring((int)RtfUtility::Emu2Pt(m_nTexpRight)) + L"pt,"
|
||||
+ std::to_wstring((int)RtfUtility::Emu2Pt(m_nTexpBottom)) + L"pt\">";
|
||||
}
|
||||
else
|
||||
@ -1295,13 +1294,13 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
sResult += L"<v:imagedata r:id=\"" + sPicture + L"\"";
|
||||
|
||||
if( PROP_DEF != nCropLeft )
|
||||
sResult += L" cropleft=\" " + std::to_wstring(nCropLeft) + L"f\"";
|
||||
sResult += L" cropleft=\"" + std::to_wstring(nCropLeft) + L"f\"";
|
||||
if( PROP_DEF != nCropTop )
|
||||
sResult += L" croptop=\" " + std::to_wstring(nCropTop) + L"f\"";
|
||||
sResult += L" croptop=\"" + std::to_wstring(nCropTop) + L"f\"";
|
||||
if( PROP_DEF != nCropRight )
|
||||
sResult += L" cropright=\" " + std::to_wstring(nCropRight) + L"f\"";
|
||||
sResult += L" cropright=\"" + std::to_wstring(nCropRight) + L"f\"";
|
||||
if( PROP_DEF != nCropBottom )
|
||||
sResult += L" cropbottom=\" " + std::to_wstring(nCropBottom) + L"f\"";
|
||||
sResult += L" cropbottom=\"" + std::to_wstring(nCropBottom) + L"f\"";
|
||||
|
||||
sResult += L" o:title=\"\"/>";
|
||||
}
|
||||
@ -1334,7 +1333,7 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
{
|
||||
std::wstring sOpacity = std::to_wstring( /*100 - */m_nFillOpacity);
|
||||
sResult += L" opacity=\"" + sOpacity +L"%\"";
|
||||
//sResult += L" opacity=\" " + std::to_wstring(m_nFillOpacity) + L"f\"";
|
||||
//sResult += L" opacity=\"" + std::to_wstring(m_nFillOpacity) + L"f\"";
|
||||
}
|
||||
if ( PROP_DEF != m_nFillColor2)
|
||||
{
|
||||
@ -1345,7 +1344,7 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
{
|
||||
std::wstring sOpacity = std::to_wstring( /*100 - */m_nFillOpacity2);
|
||||
sResult += L" opacity2=\"" + sOpacity +L"%\"";
|
||||
//sResult += L" opacity=\" " + std::to_wstring(m_nFillOpacity) + L"f\"";
|
||||
//sResult += L" opacity=\"" + std::to_wstring(m_nFillOpacity) + L"f\"";
|
||||
}
|
||||
if ( PROP_DEF != m_nFillFocus)
|
||||
{
|
||||
@ -1383,7 +1382,7 @@ std::wstring RtfShape::RenderToOOXBegin(RenderParameter oRenderParameter)
|
||||
sResult += L" style=\"" + sTextStyle + L"\"";
|
||||
|
||||
if ( PROP_DEF != m_nGtextSize )
|
||||
sTextStyle += L"font-size: " + std::to_wstring(m_nGtextSize) + L"pt;";
|
||||
sTextStyle += L"font-size:" + std::to_wstring(m_nGtextSize) + L"pt;";
|
||||
|
||||
sResult += L" string=\"" + XmlUtils::EncodeXmlString(m_sGtextUNICODE) + L"\"";
|
||||
sResult += L"/>";
|
||||
|
||||
@ -395,6 +395,10 @@
|
||||
RelativePath="..\..\Common\3dParty\pole\pole.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\ASCOfficeOdfFile\src\odf\svg_parser.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\UnicodeConverter\UnicodeConverter.cpp"
|
||||
>
|
||||
@ -412,12 +416,6 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\..\build\bin\icu\win_32\icudt.lib"
|
||||
>
|
||||
|
||||
@ -443,29 +443,29 @@ namespace OOX
|
||||
// HLinks
|
||||
// TitlesOfParts
|
||||
|
||||
nullable<std::wstring> m_sApplication;
|
||||
nullable<std::wstring> m_sAppVersion;
|
||||
nullable<int> m_nCharacters;
|
||||
nullable<int> m_nCharactersWithSpaces;
|
||||
nullable<std::wstring> m_sCompany;
|
||||
nullable<int> m_nDocSecurity;
|
||||
nullable<int> m_nHiddenSlides;
|
||||
nullable<std::wstring> m_sHyperlinkBase;
|
||||
nullable<bool> m_bHyperlinksChanged;
|
||||
nullable<int> m_nLines;
|
||||
nullable<bool> m_bLinksUpToDate;
|
||||
nullable<std::wstring> m_sManager;
|
||||
nullable<int> m_nMMClips;
|
||||
nullable<int> m_nNotes;
|
||||
nullable<int> m_nPages;
|
||||
nullable<int> m_nParagraphs;
|
||||
nullable<std::wstring> m_sPresentationForm;
|
||||
nullable<bool> m_bScaleCrop;
|
||||
nullable<bool> m_bSharedDoc;
|
||||
nullable<int> m_nSlides;
|
||||
nullable<std::wstring> m_sTemplate;
|
||||
nullable<int> m_nTotalTime;
|
||||
nullable<int> m_nWords;
|
||||
nullable<std::wstring> m_sApplication;
|
||||
nullable<std::wstring> m_sAppVersion;
|
||||
nullable<int> m_nCharacters;
|
||||
nullable<int> m_nCharactersWithSpaces;
|
||||
nullable<std::wstring> m_sCompany;
|
||||
nullable<int> m_nDocSecurity;
|
||||
nullable<int> m_nHiddenSlides;
|
||||
nullable<std::wstring> m_sHyperlinkBase;
|
||||
nullable<bool> m_bHyperlinksChanged;
|
||||
nullable<int> m_nLines;
|
||||
nullable<bool> m_bLinksUpToDate;
|
||||
nullable<std::wstring> m_sManager;
|
||||
nullable<int> m_nMMClips;
|
||||
nullable<int> m_nNotes;
|
||||
nullable<int> m_nPages;
|
||||
nullable<int> m_nParagraphs;
|
||||
nullable<std::wstring> m_sPresentationForm;
|
||||
nullable<bool> m_bScaleCrop;
|
||||
nullable<bool> m_bSharedDoc;
|
||||
nullable<int> m_nSlides;
|
||||
nullable<std::wstring> m_sTemplate;
|
||||
nullable<int> m_nTotalTime;
|
||||
nullable<int> m_nWords;
|
||||
};
|
||||
} // namespace OOX
|
||||
|
||||
|
||||
@ -329,11 +329,11 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
@ -389,10 +389,10 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
@ -408,7 +408,7 @@ namespace OOX
|
||||
m_oRunProperty = oReader;
|
||||
}
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return _T("");
|
||||
}
|
||||
@ -429,6 +429,98 @@ namespace OOX
|
||||
nullable<CRunProperty> m_oRunProperty;
|
||||
};
|
||||
//--------------------------------------------------------------------------------
|
||||
class CBulletAutoNum : public WritingElement
|
||||
{
|
||||
public:
|
||||
WritingElement_AdditionConstructors(CBulletAutoNum)
|
||||
CBulletAutoNum()
|
||||
{
|
||||
}
|
||||
virtual ~CBulletAutoNum()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
if ( oReader.IsEmptyNode() )
|
||||
return;
|
||||
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return _T("");
|
||||
}
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_a_buChar;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start ( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, L"startAt", m_nStartAt)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, L"type", m_sType)
|
||||
WritingElement_ReadAttributes_End ( oReader )
|
||||
}
|
||||
public:
|
||||
|
||||
nullable<SimpleTypes::CDecimalNumber<>> m_nStartAt;
|
||||
nullable<std::wstring> m_sType; //временно .. потом на тип переделать
|
||||
};
|
||||
class CBulletChar : public WritingElement
|
||||
{
|
||||
public:
|
||||
WritingElement_AdditionConstructors(CBulletChar)
|
||||
CBulletChar()
|
||||
{
|
||||
}
|
||||
virtual ~CBulletChar()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
if ( oReader.IsEmptyNode() )
|
||||
return;
|
||||
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return _T("");
|
||||
}
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_a_buAutoNum;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle ( oReader, L"char", m_sChar)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
public:
|
||||
|
||||
nullable<std::wstring> m_sChar;
|
||||
};
|
||||
// 21.1.2.2.7 pPr (Text Paragraph Properties)
|
||||
//--------------------------------------------------------------------------------
|
||||
class CParagraphProperty : public WritingElement
|
||||
@ -444,12 +536,12 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
|
||||
// TO DO
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
@ -471,6 +563,16 @@ namespace OOX
|
||||
m_oAfterSpacing = oReader;
|
||||
else if ( _T("a:spcBef") == sName )
|
||||
m_oBeforeSpacing = oReader;
|
||||
else if ( _T("a:buBlip") == sName )
|
||||
m_oBuBlip = oReader;
|
||||
else if ( _T("a:buChar") == sName )
|
||||
m_oBuChar = oReader;
|
||||
else if ( _T("a:buAutoNum") == sName )
|
||||
m_oBuAutoNum = oReader;
|
||||
else if ( _T("a:buClr") == sName )
|
||||
m_oBuClr = oReader;
|
||||
else if ( _T("a:buFont") == sName )
|
||||
m_oBuFont = oReader;
|
||||
}
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
@ -518,12 +620,12 @@ namespace OOX
|
||||
nullable<CLineSpacing> m_oBeforeSpacing;
|
||||
nullable<OOX::Drawing::COfficeArtExtensionList> m_oExtLst;
|
||||
|
||||
//buAutoNum //(Auto-Numbered Bullet) §21.1.2.4.1
|
||||
//buBlip //(Picture Bullet) §21.1.2.4.2
|
||||
//buChar //(Character Bullet) §21.1.2.4.3
|
||||
//buClr //(Color Specified) §21.1.2.4.4
|
||||
nullable<OOX::Drawing::CBlipFillProperties> m_oBuBlip;
|
||||
nullable<OOX::Drawing::CBulletChar> m_oBuChar;
|
||||
nullable<OOX::Drawing::CBulletAutoNum> m_oBuAutoNum;
|
||||
nullable<OOX::Drawing::CSolidColorFillProperties> m_oBuClr;
|
||||
nullable<OOX::Drawing::CTextFont> m_oBuFont;
|
||||
//buClrTx //(Follow Text) §21.1.2.4.5
|
||||
//buFont //(Specified) §21.1.2.4.6
|
||||
//buFontTx //(Follow text) §21.1.2.4.7
|
||||
//buNone //(No Bullet) §21.1.2.4.8
|
||||
//buSzPct //(Bullet Size Percentage) §21.1.2.4.9
|
||||
@ -548,12 +650,12 @@ namespace OOX
|
||||
}
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
|
||||
// TO DO
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
|
||||
@ -56,10 +56,10 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
@ -109,10 +109,10 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
|
||||
@ -60,12 +60,12 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
m_eType = et_Unknown;
|
||||
// TO DO: Реализовать CTextFont::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
m_eType = et_Unknown;
|
||||
std::wstring sName = oReader.GetName();
|
||||
@ -85,7 +85,7 @@ namespace OOX
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
|
||||
@ -59,18 +59,18 @@ namespace OOX
|
||||
virtual ~CTxBody()
|
||||
{
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
}
|
||||
public:
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return _T("");
|
||||
}
|
||||
virtual void toXML(XmlUtils::CStringWriter& writer) const
|
||||
{
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
@ -119,7 +119,7 @@ namespace OOX
|
||||
virtual ~CTxSp()
|
||||
{
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
// TO DO: Реализовать fromXML(XmlUtils::CXmlNode& oNode)
|
||||
}
|
||||
@ -131,7 +131,7 @@ namespace OOX
|
||||
virtual void toXML(XmlUtils::CStringWriter& writer) const
|
||||
{
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
||||
|
||||
@ -188,14 +188,14 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
std::wstring m_sName;
|
||||
std::wstring m_sName;
|
||||
nullable<SimpleTypes::CFontCharset<SimpleTypes::fontcharsetANSI>> m_oCharset;
|
||||
nullable<SimpleTypes::CFontFamily<SimpleTypes::fontfamilyAuto>> m_oFamily;
|
||||
nullable<SimpleTypes::CPitch<SimpleTypes::pitchDefault>> m_oPitch;
|
||||
|
||||
nullable<std::wstring > m_oAltName;
|
||||
nullable<SimpleTypes::COnOff<> > m_oNotTrueType;
|
||||
nullable<SimpleTypes::CPanose > m_oPanose;
|
||||
nullable<std::wstring> m_oAltName;
|
||||
nullable<SimpleTypes::COnOff<>> m_oNotTrueType;
|
||||
nullable<SimpleTypes::CPanose > m_oPanose;
|
||||
|
||||
nullable<SimpleTypes::CLongHexNumber<>> m_oCsb0;
|
||||
nullable<SimpleTypes::CLongHexNumber<>> m_oCsb1;
|
||||
|
||||
@ -64,16 +64,16 @@ namespace OOX
|
||||
std::map<std::wstring, smart_ptr<OOX::File>> m_mContainer;
|
||||
size_t m_lMaxRid;
|
||||
|
||||
void Read (const OOX::CPath& oRootPath, const OOX::CPath& oPath);
|
||||
void Read (const OOX::CRels& oRels, const OOX::CPath& oRootPath, const CPath& oPath);
|
||||
void Write(const OOX::CPath& oFileName, const CPath& oDir, OOX::CContentTypes& oContent) const;
|
||||
void Write(OOX::CRels& oRels, const CPath& oCurrent, const CPath& oDir, OOX::CContentTypes& oContent) const;
|
||||
void Write (const OOX::CPath& oFileName, const CPath& oDir, OOX::CContentTypes& oContent) const;
|
||||
void Write (OOX::CRels& oRels, const CPath& oCurrent, const CPath& oDir, OOX::CContentTypes& oContent) const;
|
||||
|
||||
void Commit (const CPath& oPath);
|
||||
void Commit (const CPath& oPath);
|
||||
void Finalize(const CPath& oFilefilename, const CPath& oDir, OOX::CContentTypes& oContent);
|
||||
void Finalize(OOX::CRels& oRels, const CPath& oCurrent, const CPath& oDir, OOX::CContentTypes& oContent);
|
||||
|
||||
public:
|
||||
void Read (const OOX::CPath& oRootPath, const OOX::CPath& oPath);
|
||||
void ExtractPictures(const OOX::CPath& oPath) const;
|
||||
|
||||
virtual smart_ptr<Image> GetImage (const RId& rId) const;
|
||||
|
||||
@ -82,7 +82,7 @@ namespace OOX
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring toXML() const;
|
||||
virtual std::wstring toXML() const;
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_w_txbxContent;
|
||||
@ -117,7 +117,7 @@ namespace OOX
|
||||
public:
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return _T("");
|
||||
return L"";
|
||||
}
|
||||
virtual void toXML(XmlUtils::CStringWriter& writer) const
|
||||
{
|
||||
@ -137,7 +137,7 @@ namespace OOX
|
||||
{
|
||||
std::wstring sName = oReader.GetName();
|
||||
|
||||
if ( _T("w:txbxContent") == sName )
|
||||
if ( L"w:txbxContent" == sName )
|
||||
m_oTxtbxContent = oReader;
|
||||
}
|
||||
}
|
||||
@ -179,9 +179,9 @@ namespace OOX
|
||||
}
|
||||
|
||||
public:
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return _T("");
|
||||
return L"";
|
||||
}
|
||||
virtual void toXML(XmlUtils::CStringWriter& writer) const
|
||||
{
|
||||
@ -202,9 +202,9 @@ namespace OOX
|
||||
std::wstring sName = oReader.GetName();
|
||||
|
||||
sName = oReader.GetName();
|
||||
if ( _T("a:spLocks") == sName )
|
||||
if ( L"a:spLocks" == sName )
|
||||
m_oSpLocks = oReader;
|
||||
else if ( _T("a:extLst") == sName )
|
||||
else if ( L"a:extLst" == sName )
|
||||
m_oExtLst = oReader;
|
||||
}
|
||||
}
|
||||
@ -218,12 +218,12 @@ namespace OOX
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, _T("txBox"), m_otxBox )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, L"txBox", m_otxBox )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
public:
|
||||
// Attributes
|
||||
SimpleTypes::COnOff<SimpleTypes::onoffFalse> m_otxBox;
|
||||
SimpleTypes::COnOff<SimpleTypes::onoffFalse> m_otxBox;
|
||||
|
||||
// Childs
|
||||
nullable<OOX::Drawing::COfficeArtExtensionList> m_oExtLst;
|
||||
@ -252,9 +252,9 @@ namespace OOX
|
||||
}
|
||||
|
||||
public:
|
||||
virtual std::wstring toXML() const
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return _T("");
|
||||
return L"";
|
||||
}
|
||||
virtual void toXML(XmlUtils::CStringWriter& writer) const
|
||||
{
|
||||
@ -275,9 +275,9 @@ namespace OOX
|
||||
std::wstring sName = oReader.GetName();
|
||||
|
||||
sName = oReader.GetName();
|
||||
if ( _T("a:extLst") == sName )
|
||||
if ( L"a:extLst" == sName )
|
||||
m_oExtLst = oReader;
|
||||
//else ( _T("a:grpSpLocks") == sName )
|
||||
//else ( L"a:grpSpLocks" == sName )
|
||||
// m_oSpLocks = oReader;
|
||||
}
|
||||
}
|
||||
@ -327,7 +327,7 @@ namespace OOX
|
||||
public:
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return _T("");
|
||||
return L"";
|
||||
}
|
||||
virtual void toXML(XmlUtils::CStringWriter& writer) const
|
||||
{
|
||||
@ -348,9 +348,9 @@ namespace OOX
|
||||
std::wstring sName = oReader.GetName();
|
||||
|
||||
sName = oReader.GetName();
|
||||
if ( _T("a:picLocks") == sName )
|
||||
if ( L"a:picLocks" == sName )
|
||||
m_oPicLocks = oReader;
|
||||
else if ( _T("a:extLst") == sName )
|
||||
else if ( L"a:extLst" == sName )
|
||||
m_oExtLst = oReader;
|
||||
}
|
||||
}
|
||||
@ -364,7 +364,7 @@ namespace OOX
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, _T("preferRelativeResize"), m_oPreferRelativeResize )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, L"preferRelativeResize", m_oPreferRelativeResize )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
public:
|
||||
@ -399,7 +399,7 @@ namespace OOX
|
||||
public:
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return _T("");
|
||||
return L"";
|
||||
}
|
||||
virtual void toXML(XmlUtils::CStringWriter& writer) const
|
||||
{
|
||||
@ -419,20 +419,22 @@ namespace OOX
|
||||
{
|
||||
std::wstring sName = oReader.GetName();
|
||||
|
||||
if ( _T("wps:cNvSpPr") == sName )
|
||||
if ( L"wps:cNvSpPr" == sName )
|
||||
m_oCNvSpPr = oReader;
|
||||
else if ( _T("wps:cNvPr") == sName )
|
||||
else if ( L"wps:cNvPr" == sName )
|
||||
m_oCNvPr = oReader;
|
||||
else if ( _T("wps:cNvCnPr") == sName )
|
||||
else if ( L"wps:cNvCnPr" == sName )
|
||||
m_oCNvConnSpPr = oReader;
|
||||
else if ( _T("wps:spPr") == sName )
|
||||
else if ( L"wps:spPr" == sName )
|
||||
m_oSpPr = oReader;
|
||||
else if ( _T("wps:style") == sName )
|
||||
else if ( L"wps:style" == sName )
|
||||
m_oShapeStyle = oReader;
|
||||
else if ((_T("wps:txbx") == sName) || (_T("wps:textbox") == sName))
|
||||
else if ((L"wps:txbx" == sName) || (L"wps:textbox" == sName))
|
||||
m_oTxBody = oReader;
|
||||
else if (_T("wps:bodyPr") == sName)
|
||||
else if (L"wps:bodyPr" == sName)
|
||||
m_oTxBodyProperties = oReader;
|
||||
else if (L"wps:txBody" == sName)
|
||||
m_oTxBodyAlt = oReader;
|
||||
}
|
||||
}
|
||||
|
||||
@ -452,8 +454,12 @@ namespace OOX
|
||||
|
||||
nullable<OOX::Drawing::CShapeProperties> m_oSpPr;
|
||||
nullable<OOX::Drawing::CShapeStyle> m_oShapeStyle;
|
||||
|
||||
nullable<OOX::Logic::CTextBody> m_oTxBody;
|
||||
nullable<OOX::Drawing::CTextBodyProperties> m_oTxBodyProperties;
|
||||
nullable<OOX::Drawing::CTextBodyProperties> m_oTxBodyProperties;
|
||||
|
||||
nullable<OOX::Drawing::CTxBody> m_oTxBodyAlt;
|
||||
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
@ -480,7 +486,7 @@ namespace OOX
|
||||
public:
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return _T("");
|
||||
return L"";
|
||||
}
|
||||
virtual void toXML(XmlUtils::CStringWriter& writer) const
|
||||
{
|
||||
@ -500,20 +506,20 @@ namespace OOX
|
||||
{
|
||||
std::wstring sName = oReader.GetName();
|
||||
|
||||
if ( _T("wpg:grpSpPr") == sName )
|
||||
if ( L"wpg:grpSpPr" == sName )
|
||||
m_oGroupSpPr = oReader;
|
||||
else if ( _T("wpg:cNvPr") == sName )
|
||||
else if ( L"wpg:cNvPr" == sName )
|
||||
m_oCNvPr = oReader;
|
||||
else if ( _T("wpg:cNvGrpSpPr") == sName )
|
||||
else if ( L"wpg:cNvGrpSpPr" == sName )
|
||||
m_oCNvGroupSpPr = oReader;
|
||||
|
||||
else if ( _T("wps:wsp") == sName )
|
||||
else if ( L"wps:wsp" == sName )
|
||||
m_arrItems.push_back( new OOX::Logic::CShape( oReader ));
|
||||
else if ( _T("c:chart") == sName ) //???
|
||||
else if ( L"c:chart" == sName ) //???
|
||||
m_arrItems.push_back( new OOX::Drawing::CChart( oReader ));
|
||||
else if ( _T("pic:pic") == sName )
|
||||
else if ( L"pic:pic" == sName )
|
||||
m_arrItems.push_back( new OOX::Drawing::CPicture( oReader ));
|
||||
else if ( _T("wpg:grpSp") == sName )
|
||||
else if ( L"wpg:grpSp" == sName )
|
||||
m_arrItems.push_back( new OOX::Logic::CGroupShape( oReader ));
|
||||
}
|
||||
}
|
||||
@ -557,7 +563,7 @@ namespace OOX
|
||||
public:
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
return _T("");
|
||||
return L"";
|
||||
}
|
||||
virtual void toXML(XmlUtils::CStringWriter& writer) const
|
||||
{
|
||||
@ -577,20 +583,20 @@ namespace OOX
|
||||
{
|
||||
std::wstring sName = oReader.GetName();
|
||||
|
||||
//if ( _T("wpg:grpSpPr") == sName )
|
||||
//if ( L"wpg:grpSpPr" == sName )
|
||||
// m_oGroupSpPr = oReader;
|
||||
//else if ( _T("wpg:cNvPr") == sName )
|
||||
//else if ( L"wpg:cNvPr" == sName )
|
||||
// m_oCNvPr = oReader;
|
||||
//else if ( _T("wpg:cNvGrpSpPr") == sName )
|
||||
//else if ( L"wpg:cNvGrpSpPr" == sName )
|
||||
// m_oCNvGroupSpPr = oReader;
|
||||
|
||||
if ( _T("wps:wsp") == sName )
|
||||
if ( L"wps:wsp" == sName )
|
||||
m_arrItems.push_back( new OOX::Logic::CShape( oReader ));
|
||||
else if ( _T("c:chart") == sName ) //???
|
||||
else if ( L"c:chart" == sName ) //???
|
||||
m_arrItems.push_back( new OOX::Drawing::CChart( oReader ));
|
||||
else if ( _T("pic:pic") == sName )
|
||||
else if ( L"pic:pic" == sName )
|
||||
m_arrItems.push_back( new OOX::Drawing::CPicture( oReader ));
|
||||
else if ( _T("wpg:grpSp") == sName )
|
||||
else if ( L"wpg:grpSp" == sName )
|
||||
m_arrItems.push_back( new OOX::Logic::CGroupShape( oReader ));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1631,21 +1631,21 @@ namespace OOX
|
||||
public:
|
||||
|
||||
// Attributes
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oArrowOk;
|
||||
nullable<std::wstring> m_oConnectAngles;
|
||||
nullable<std::wstring> m_oConnectLocs;
|
||||
SimpleTypes::CConnectType<SimpleTypes::connecttypeNone> m_oConnectType;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oExtrusionOk;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oFillOk;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oGradientShapeOk;
|
||||
nullable<std::wstring> m_oId;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oInsetPenOk;
|
||||
SimpleTypes::Vml::CVml_Vector2D_Units m_oLimo;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oShadowOk;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oStrokeOk;
|
||||
nullable<SimpleTypes::Vml::CVml_Polygon2D> m_oTextBoxRect;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oTextPathOk;
|
||||
nullable<SimpleTypes::Vml::CVmlPath> m_oV;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oArrowOk;
|
||||
nullable<std::wstring> m_oConnectAngles;
|
||||
nullable<std::wstring> m_oConnectLocs;
|
||||
SimpleTypes::CConnectType<SimpleTypes::connecttypeNone> m_oConnectType;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oExtrusionOk;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oFillOk;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oGradientShapeOk;
|
||||
nullable<std::wstring> m_oId;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oInsetPenOk;
|
||||
SimpleTypes::Vml::CVml_Vector2D_Units m_oLimo;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oShadowOk;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanTrue> m_oStrokeOk;
|
||||
nullable<SimpleTypes::Vml::CVml_Polygon2D> m_oTextBoxRect;
|
||||
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oTextPathOk;
|
||||
nullable<SimpleTypes::Vml::CVmlPath> m_oV;
|
||||
};
|
||||
//--------------------------------------------------------------------------------
|
||||
// CPolyLine 14.1.2.15 (Part4)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user