Commit 504b6bd7 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

(1.2.0.142): ASCOfficeOdfFileW


git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58042 954022d7-b5bf-4e40-9824-e11837661b57
parent 93179b84
...@@ -419,10 +419,12 @@ void OoxConverter::convert(OOX::Drawing::CStyleMatrixReference *style_matrix_ref ...@@ -419,10 +419,12 @@ void OoxConverter::convert(OOX::Drawing::CStyleMatrixReference *style_matrix_ref
convert(&theme->m_oThemeElements.m_oFmtScheme.m_oLineStyleLst.m_arrLn[fmt_index], &color); convert(&theme->m_oThemeElements.m_oFmtScheme.m_oLineStyleLst.m_arrLn[fmt_index], &color);
} }
if (style_matrix_ref->getType() == OOX::et_a_effectRef && fmt_index < theme->m_oThemeElements.m_oFmtScheme.m_oEffectStyleLst.m_arrEffectStyle.GetSize()) if (style_matrix_ref->getType() == OOX::et_a_effectRef && fmt_index < theme->m_oThemeElements.m_oFmtScheme.m_oEffectStyleLst.m_arrEffectStyle.size())
{ {
convert(theme->m_oThemeElements.m_oFmtScheme.m_oEffectStyleLst.m_arrEffectStyle[fmt_index].m_oEffectList.GetPointer(), &color); if (theme->m_oThemeElements.m_oFmtScheme.m_oEffectStyleLst.m_arrEffectStyle[fmt_index])
{
convert(theme->m_oThemeElements.m_oFmtScheme.m_oEffectStyleLst.m_arrEffectStyle[fmt_index]->m_oEffectList.GetPointer(), &color);
}
//todooo //todooo
//convert(theme->m_oThemeElements.m_oFmtScheme.m_oEffectStyleLst.m_arrEffectStyle[fmt_index].m_oEffectDag.GetPointer(), &color); //convert(theme->m_oThemeElements.m_oFmtScheme.m_oEffectStyleLst.m_arrEffectStyle[fmt_index].m_oEffectDag.GetPointer(), &color);
//convert(theme->m_oThemeElements.m_oFmtScheme.m_oEffectStyleLst.m_arrEffectStyle[fmt_index].m_oScene3D.GetPointer(), &color); //convert(theme->m_oThemeElements.m_oFmtScheme.m_oEffectStyleLst.m_arrEffectStyle[fmt_index].m_oScene3D.GetPointer(), &color);
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//1 //1
//2 //2
//0 //0
//139 //143
#define INTVER 1,2,0,139 #define INTVER 1,2,0,143
#define STRVER "1,2,0,139\0" #define STRVER "1,2,0,143\0"
...@@ -1563,7 +1563,7 @@ namespace OOX ...@@ -1563,7 +1563,7 @@ namespace OOX
{ {
CString sResult; CString sResult;
for ( int nIndex = 0; nIndex < m_arrTransform.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrTransform.size(); nIndex++ )
sResult += m_arrTransform[nIndex]->toXML(); sResult += m_arrTransform[nIndex]->toXML();
return sResult; return sResult;
......
...@@ -16,7 +16,7 @@ namespace OOX ...@@ -16,7 +16,7 @@ namespace OOX
m_oLink = oOther.m_oLink; m_oLink = oOther.m_oLink;
m_oExtLst = oOther.m_oExtLst; m_oExtLst = oOther.m_oExtLst;
for ( int nIndex = 0; nIndex < oOther.m_arrEffects.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < oOther.m_arrEffects.size(); nIndex++ )
{ {
OOX::EElementType eType = oOther.m_arrEffects[nIndex]->getType(); OOX::EElementType eType = oOther.m_arrEffects[nIndex]->getType();
...@@ -172,7 +172,7 @@ namespace OOX ...@@ -172,7 +172,7 @@ namespace OOX
sResult += _T(">"); sResult += _T(">");
for ( int nIndex = 0; nIndex < m_arrEffects.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrEffects.size(); nIndex++ )
sResult += m_arrEffects[nIndex]->toXML(); sResult += m_arrEffects[nIndex]->toXML();
if ( m_oExtLst.IsInit() ) if ( m_oExtLst.IsInit() )
...@@ -284,7 +284,7 @@ namespace OOX ...@@ -284,7 +284,7 @@ namespace OOX
m_sName = oOther.m_sName; m_sName = oOther.m_sName;
m_oType = oOther.m_oType; m_oType = oOther.m_oType;
for ( int nIndex = 0; nIndex < oOther.m_arrEffects.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < oOther.m_arrEffects.size(); nIndex++ )
{ {
OOX::EElementType eType = oOther.m_arrEffects[nIndex]->getType(); OOX::EElementType eType = oOther.m_arrEffects[nIndex]->getType();
...@@ -528,7 +528,7 @@ namespace OOX ...@@ -528,7 +528,7 @@ namespace OOX
sResult += _T("type=\"") + m_oType.ToString() + _T("\">"); sResult += _T("type=\"") + m_oType.ToString() + _T("\">");
for ( int nIndex = 0; nIndex < m_arrEffects.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrEffects.size(); nIndex++ )
sResult += m_arrEffects[nIndex]->toXML(); sResult += m_arrEffects[nIndex]->toXML();
if ( et_a_cont == m_eType ) if ( et_a_cont == m_eType )
...@@ -546,7 +546,7 @@ namespace OOX ...@@ -546,7 +546,7 @@ namespace OOX
{ {
Clear(); Clear();
for ( int nIndex = 0; nIndex < oOther.m_arrEffects.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < oOther.m_arrEffects.size(); nIndex++ )
{ {
OOX::EElementType eType = oOther.m_arrEffects[nIndex]->getType(); OOX::EElementType eType = oOther.m_arrEffects[nIndex]->getType();
...@@ -652,7 +652,7 @@ namespace OOX ...@@ -652,7 +652,7 @@ namespace OOX
{ {
CString sResult = _T("<a:effectLst>"); CString sResult = _T("<a:effectLst>");
for ( int nIndex = 0; nIndex < m_arrEffects.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrEffects.size(); nIndex++ )
sResult += m_arrEffects[nIndex]->toXML(); sResult += m_arrEffects[nIndex]->toXML();
sResult += _T("</a:effectLst>"); sResult += _T("</a:effectLst>");
......
...@@ -80,7 +80,7 @@ namespace OOX ...@@ -80,7 +80,7 @@ namespace OOX
void Clear() void Clear()
{ {
for ( int nIndex = 0; nIndex < m_arrEffects.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrEffects.size(); nIndex++ )
{ {
if ( m_arrEffects[nIndex] ) if ( m_arrEffects[nIndex] )
delete m_arrEffects[nIndex]; delete m_arrEffects[nIndex];
...@@ -136,7 +136,7 @@ namespace OOX ...@@ -136,7 +136,7 @@ namespace OOX
void Clear() void Clear()
{ {
for ( int nIndex = 0; nIndex < m_arrEffects.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrEffects.size(); nIndex++ )
{ {
if ( m_arrEffects[nIndex] ) if ( m_arrEffects[nIndex] )
delete m_arrEffects[nIndex]; delete m_arrEffects[nIndex];
...@@ -784,7 +784,7 @@ namespace OOX ...@@ -784,7 +784,7 @@ namespace OOX
void Clear() void Clear()
{ {
for ( int nIndex = 0; nIndex < m_arrEffects.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrEffects.size(); nIndex++ )
{ {
if ( m_arrEffects[nIndex] ) if ( m_arrEffects[nIndex] )
delete m_arrEffects[nIndex]; delete m_arrEffects[nIndex];
...@@ -1211,7 +1211,7 @@ namespace OOX ...@@ -1211,7 +1211,7 @@ namespace OOX
{ {
CString sResult = _T("<a:custDash>"); CString sResult = _T("<a:custDash>");
for ( int nIndex = 0; nIndex < m_arrDs.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrDs.size(); nIndex++ )
sResult += m_arrDs[nIndex].toXML(); sResult += m_arrDs[nIndex].toXML();
sResult += _T("</a:custDash>"); sResult += _T("</a:custDash>");
...@@ -1844,7 +1844,7 @@ namespace OOX ...@@ -1844,7 +1844,7 @@ namespace OOX
{ {
CString sResult = _T("<a:gsLst>"); CString sResult = _T("<a:gsLst>");
for ( int nIndex = 0; nIndex < m_arrGs.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrGs.size(); nIndex++ )
sResult += m_arrGs[nIndex].toXML(); sResult += m_arrGs[nIndex].toXML();
sResult += _T("</a:gsLst>"); sResult += _T("</a:gsLst>");
......
...@@ -115,7 +115,7 @@ namespace OOX ...@@ -115,7 +115,7 @@ namespace OOX
{ {
CString sResult = _T("<a:extLst>"); CString sResult = _T("<a:extLst>");
for ( int nIndex = 0; nIndex < m_arrExt.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrExt.size(); nIndex++ )
sResult += m_arrExt[nIndex].toXML(); sResult += m_arrExt[nIndex].toXML();
sResult += _T("</a:extLst>"); sResult += _T("</a:extLst>");
......
...@@ -609,7 +609,7 @@ namespace OOX ...@@ -609,7 +609,7 @@ namespace OOX
{ {
CString sResult = _T("<a:cxnLst>"); CString sResult = _T("<a:cxnLst>");
for ( int nIndex = 0; nIndex < m_arrCxn.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrCxn.size(); nIndex++ )
sResult += m_arrCxn[nIndex].toXML(); sResult += m_arrCxn[nIndex].toXML();
sResult += _T("</a:cxnLst>"); sResult += _T("</a:cxnLst>");
...@@ -741,7 +741,7 @@ namespace OOX ...@@ -741,7 +741,7 @@ namespace OOX
return _T(""); return _T("");
for ( int nIndex = 0; nIndex < m_arrGd.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrGd.size(); nIndex++ )
sResult += m_arrGd[nIndex].toXML(); sResult += m_arrGd[nIndex].toXML();
if ( et_a_avLst == m_eType ) if ( et_a_avLst == m_eType )
...@@ -951,7 +951,7 @@ namespace OOX ...@@ -951,7 +951,7 @@ namespace OOX
m_oStroke = oOther.m_oStroke; m_oStroke = oOther.m_oStroke;
m_oW = oOther.m_oW; m_oW = oOther.m_oW;
for ( int nIndex = 0; nIndex < oOther.m_arrItems.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < oOther.m_arrItems.size(); nIndex++ )
{ {
OOX::EElementType eType = oOther.m_arrItems[nIndex]->getType(); OOX::EElementType eType = oOther.m_arrItems[nIndex]->getType();
...@@ -1020,7 +1020,7 @@ namespace OOX ...@@ -1020,7 +1020,7 @@ namespace OOX
+ _T("\" extrusionOk=\"") + m_oExtrusionOk.ToString() + _T("\" extrusionOk=\"") + m_oExtrusionOk.ToString()
+ _T("\">"); + _T("\">");
for ( int nIndex = 0; nIndex < m_arrItems.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrItems.size(); nIndex++ )
{ {
if ( m_arrItems[nIndex] ) if ( m_arrItems[nIndex] )
sResult += m_arrItems[nIndex]->toXML(); sResult += m_arrItems[nIndex]->toXML();
...@@ -1053,7 +1053,7 @@ namespace OOX ...@@ -1053,7 +1053,7 @@ namespace OOX
void Clear() void Clear()
{ {
for ( int nIndex = 0; nIndex < m_arrItems.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrItems.size(); nIndex++ )
{ {
if ( m_arrItems[nIndex] ) if ( m_arrItems[nIndex] )
delete m_arrItems[nIndex]; delete m_arrItems[nIndex];
...@@ -1118,7 +1118,7 @@ namespace OOX ...@@ -1118,7 +1118,7 @@ namespace OOX
{ {
CString sResult = _T("<a:pathLst>"); CString sResult = _T("<a:pathLst>");
for ( int nIndex = 0; nIndex < m_arrPath.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrPath.size(); nIndex++ )
sResult += m_arrPath[nIndex].toXML(); sResult += m_arrPath[nIndex].toXML();
sResult += _T("</a:pathLst>"); sResult += _T("</a:pathLst>");
...@@ -1147,7 +1147,7 @@ namespace OOX ...@@ -1147,7 +1147,7 @@ namespace OOX
} }
CAdjustHandleList(const CAdjustHandleList& oOther) CAdjustHandleList(const CAdjustHandleList& oOther)
{ {
for ( int nIndex = 0; nIndex < oOther.m_arrItems.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < oOther.m_arrItems.size(); nIndex++ )
{ {
OOX::EElementType eType = oOther.m_arrItems[nIndex]->getType(); OOX::EElementType eType = oOther.m_arrItems[nIndex]->getType();
...@@ -1199,7 +1199,7 @@ namespace OOX ...@@ -1199,7 +1199,7 @@ namespace OOX
{ {
CString sResult = _T("<a:ahLst>"); CString sResult = _T("<a:ahLst>");
for ( int nIndex = 0; nIndex < m_arrItems.size (); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrItems.size (); nIndex++ )
{ {
if ( m_arrItems[nIndex] ) if ( m_arrItems[nIndex] )
sResult += m_arrItems[nIndex]->toXML(); sResult += m_arrItems[nIndex]->toXML();
...@@ -1219,7 +1219,7 @@ namespace OOX ...@@ -1219,7 +1219,7 @@ namespace OOX
void Clear() void Clear()
{ {
for ( int nIndex = 0; nIndex < m_arrItems.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrItems.size(); nIndex++ )
{ {
if ( m_arrItems[nIndex] ) if ( m_arrItems[nIndex] )
delete m_arrItems[nIndex]; delete m_arrItems[nIndex];
......
...@@ -424,6 +424,15 @@ namespace OOX ...@@ -424,6 +424,15 @@ namespace OOX
} }
virtual ~CEffectStyleList() virtual ~CEffectStyleList()
{ {
for (unsigned int nIndex = 0; nIndex < m_arrEffectStyle.size(); nIndex++ )
{
if ( m_arrEffectStyle[nIndex] )
delete m_arrEffectStyle[nIndex];
m_arrEffectStyle[nIndex] = NULL;
}
m_arrEffectStyle.clear();
} }
public: public:
...@@ -443,8 +452,8 @@ namespace OOX ...@@ -443,8 +452,8 @@ namespace OOX
CWCharWrapper sName = oReader.GetName(); CWCharWrapper sName = oReader.GetName();
if ( _T("a:effectStyle") == sName ) if ( _T("a:effectStyle") == sName )
{ {
OOX::Drawing::CEffectStyleItem oEffectStyle = oReader; OOX::Drawing::CEffectStyleItem *oEffectStyle = new OOX::Drawing::CEffectStyleItem(oReader);
m_arrEffectStyle.Add( oEffectStyle ); if (oEffectStyle )m_arrEffectStyle.push_back( oEffectStyle );
} }
} }
} }
...@@ -452,8 +461,11 @@ namespace OOX ...@@ -452,8 +461,11 @@ namespace OOX
{ {
CString sResult = _T("<a:effectStyleLst>"); CString sResult = _T("<a:effectStyleLst>");
for ( int nIndex = 0; nIndex < m_arrEffectStyle.GetSize(); nIndex++ ) for (unsigned int nIndex = 0; nIndex < m_arrEffectStyle.size(); nIndex++ )
sResult += m_arrEffectStyle[nIndex].toXML(); {
if (m_arrEffectStyle[nIndex])
sResult += m_arrEffectStyle[nIndex]->toXML();
}
sResult += _T("</a:effectStyleLst>"); sResult += _T("</a:effectStyleLst>");
...@@ -467,7 +479,7 @@ namespace OOX ...@@ -467,7 +479,7 @@ namespace OOX
public: public:
// Childs // Childs
CSimpleArray<OOX::Drawing::CEffectStyleItem> m_arrEffectStyle; std::vector<OOX::Drawing::CEffectStyleItem*> m_arrEffectStyle;
}; };
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
......
...@@ -417,7 +417,7 @@ namespace OOX ...@@ -417,7 +417,7 @@ namespace OOX
{ {
CString sResult; CString sResult;
for ( int nIndex = 0; nIndex < m_arrItems.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrItems.size(); nIndex++ )
{ {
if ( m_arrItems[nIndex] ) if ( m_arrItems[nIndex] )
sResult += m_arrItems[nIndex]->toXML(); sResult += m_arrItems[nIndex]->toXML();
......
...@@ -734,7 +734,7 @@ namespace OOX ...@@ -734,7 +734,7 @@ namespace OOX
virtual ~WritingElementWithChilds() {ClearItems();} virtual ~WritingElementWithChilds() {ClearItems();}
virtual void ClearItems() virtual void ClearItems()
{ {
for ( int nIndex = 0; nIndex < m_arrItems.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrItems.size(); nIndex++ )
{ {
if ( m_arrItems[nIndex] ) if ( m_arrItems[nIndex] )
delete m_arrItems[nIndex]; delete m_arrItems[nIndex];
...@@ -745,6 +745,5 @@ namespace OOX ...@@ -745,6 +745,5 @@ namespace OOX
m_arrItems.clear(); m_arrItems.clear();
} }
std::vector<ElemType *> m_arrItems; std::vector<ElemType *> m_arrItems;
//CSimpleArray<ElemType *> m_arrItems;
}; };
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment