Commit 2ab819f4 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

в догонку

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58057 954022d7-b5bf-4e40-9824-e11837661b57
parent 2717045e
...@@ -539,11 +539,11 @@ void OoxConverter::convert(OOX::Drawing::CCustomGeometry2D *oox_cust_geom) ...@@ -539,11 +539,11 @@ void OoxConverter::convert(OOX::Drawing::CCustomGeometry2D *oox_cust_geom)
for (unsigned int i=0; i< oox_cust_geom->m_oPthLst.m_arrPath.size();i++) for (unsigned int i=0; i< oox_cust_geom->m_oPthLst.m_arrPath.size();i++)
{ {
convert(&oox_cust_geom->m_oPthLst.m_arrPath[i]); convert(oox_cust_geom->m_oPthLst.m_arrPath[i]);
} }
for (unsigned int i=0; i< oox_cust_geom->m_oPthLst.m_arrPath.size();i++) for (unsigned int i=0; i< oox_cust_geom->m_oPthLst.m_arrPath.size();i++)
{ {
convert(&oox_cust_geom->m_oPthLst.m_arrPath[i]); convert(oox_cust_geom->m_oPthLst.m_arrPath[i]);
} }
} }
void OoxConverter::convert(OOX::Drawing::CLineProperties *oox_line_prop, CString *change_sheme_color ) void OoxConverter::convert(OOX::Drawing::CLineProperties *oox_line_prop, CString *change_sheme_color )
...@@ -610,7 +610,8 @@ void OoxConverter::convert(OOX::Drawing::CPresetGeometry2D *oox_prst_geom) ...@@ -610,7 +610,8 @@ void OoxConverter::convert(OOX::Drawing::CPresetGeometry2D *oox_prst_geom)
{ {
for (unsigned int i=0; i<oox_prst_geom->m_oAvLst->m_arrGd.size(); i++) for (unsigned int i=0; i<oox_prst_geom->m_oAvLst->m_arrGd.size(); i++)
{ {
odf_context()->drawing_context()->add_modifier(string2std_string(oox_prst_geom->m_oAvLst->m_arrGd[i].m_oFmla.GetValue())); if (oox_prst_geom->m_oAvLst->m_arrGd[i] == NULL) continue;
odf_context()->drawing_context()->add_modifier(string2std_string(oox_prst_geom->m_oAvLst->m_arrGd[i]->m_oFmla.GetValue()));
} }
} }
} }
...@@ -799,18 +800,22 @@ void OoxConverter::convert(OOX::Drawing::CGradientFillProperties *oox_grad_fill, ...@@ -799,18 +800,22 @@ void OoxConverter::convert(OOX::Drawing::CGradientFillProperties *oox_grad_fill,
} }
odf_context()->drawing_context()->set_gradient_type(grad_style); odf_context()->drawing_context()->set_gradient_type(grad_style);
if (oox_grad_fill->m_oGsLst.IsInit() && oox_grad_fill->m_oGsLst->m_arrGs.size()>1) if (oox_grad_fill->m_oGsLst.IsInit() && oox_grad_fill->m_oGsLst->m_arrGs.size()>1 &&
change_sheme_color && oox_grad_fill->m_oGsLst->m_arrGs[0])
{ {
std::wstring hexColorStart, hexColorEnd; std::wstring hexColorStart, hexColorEnd;
_CP_OPT(double) opacityStart, opacityEnd; _CP_OPT(double) opacityStart, opacityEnd;
if (change_sheme_color && oox_grad_fill->m_oGsLst->m_arrGs[0].m_eType == OOX::Drawing::colorSheme) if (change_sheme_color && oox_grad_fill->m_oGsLst->m_arrGs[0]->m_eType == OOX::Drawing::colorSheme)
{ {
oox_grad_fill->m_oGsLst->m_arrGs[0].m_oShemeClr.m_oVal.FromString(*change_sheme_color); oox_grad_fill->m_oGsLst->m_arrGs[0]->m_oShemeClr.m_oVal.FromString(*change_sheme_color);
oox_grad_fill->m_oGsLst->m_arrGs[oox_grad_fill->m_oGsLst->m_arrGs.size()-1].m_oShemeClr.m_oVal.FromString(*change_sheme_color);
if (oox_grad_fill->m_oGsLst->m_arrGs[oox_grad_fill->m_oGsLst->m_arrGs.size()-1])
oox_grad_fill->m_oGsLst->m_arrGs[oox_grad_fill->m_oGsLst->m_arrGs.size()-1]->m_oShemeClr.m_oVal.FromString(*change_sheme_color);
} }
convert((OOX::Drawing::CColor*)(&oox_grad_fill->m_oGsLst->m_arrGs[oox_grad_fill->m_oGsLst->m_arrGs.size()-1]),hexColorStart, opacityStart); convert((OOX::Drawing::CColor*)(oox_grad_fill->m_oGsLst->m_arrGs[oox_grad_fill->m_oGsLst->m_arrGs.size()-1]),hexColorStart, opacityStart);
convert((OOX::Drawing::CColor*)(&oox_grad_fill->m_oGsLst->m_arrGs[0]),hexColorEnd, opacityEnd);
convert((OOX::Drawing::CColor*)(oox_grad_fill->m_oGsLst->m_arrGs[0]),hexColorEnd, opacityEnd);
odf_context()->drawing_context()->set_gradient_start(hexColorStart, opacityStart); odf_context()->drawing_context()->set_gradient_start(hexColorStart, opacityStart);
odf_context()->drawing_context()->set_gradient_end (hexColorEnd, opacityEnd); odf_context()->drawing_context()->set_gradient_end (hexColorEnd, opacityEnd);
...@@ -1073,7 +1078,8 @@ void OoxConverter::convert(OOX::Drawing::CTextBodyProperties *oox_bodyPr) ...@@ -1073,7 +1078,8 @@ void OoxConverter::convert(OOX::Drawing::CTextBodyProperties *oox_bodyPr)
{ {
for (unsigned int i=0; i< oox_bodyPr->m_oPrstTxWrap->m_oAvLst->m_arrGd.size(); i++) for (unsigned int i=0; i< oox_bodyPr->m_oPrstTxWrap->m_oAvLst->m_arrGd.size(); i++)
{ {
odf_context()->drawing_context()->add_modifier(string2std_string(oox_bodyPr->m_oPrstTxWrap->m_oAvLst->m_arrGd[i].m_oFmla.GetValue())); if (oox_bodyPr->m_oPrstTxWrap->m_oAvLst->m_arrGd[i] == NULL) continue;
odf_context()->drawing_context()->add_modifier(string2std_string(oox_bodyPr->m_oPrstTxWrap->m_oAvLst->m_arrGd[i]->m_oFmla.GetValue()));
} }
} }
} }
......
...@@ -629,53 +629,53 @@ ...@@ -629,53 +629,53 @@
<Filter <Filter
Name="Pict" Name="Pict"
> >
<File </Filter>
RelativePath="..\Source\DocxFormat\Logic\Pict.h" </Filter>
> </Filter>
</File>
<Filter <Filter
Name="Vml" Name="Annotations"
> >
<File <File
RelativePath="..\Source\DocxFormat\Logic\Vml.cpp" RelativePath="..\Source\DocxFormat\Logic\Annotations.cpp"
> >
</File> </File>
<File <File
RelativePath="..\Source\DocxFormat\Logic\Vml.h" RelativePath="..\Source\DocxFormat\Logic\Annotations.h"
> >
</File> </File>
</Filter>
<Filter
Name="Drawing"
>
<File <File
RelativePath="..\Source\DocxFormat\Logic\VmlOfficeDrawing.h" RelativePath="..\Source\DocxFormat\Logic\Pict.h"
> >
</File> </File>
<File <File
RelativePath="..\Source\DocxFormat\Logic\VmlWord.h" RelativePath="..\Source\DocxFormat\Logic\Shape.h"
> >
</File> </File>
</Filter>
</Filter>
</Filter>
</Filter>
<Filter <Filter
Name="Annotations" Name="Vml"
> >
<File <File
RelativePath="..\Source\DocxFormat\Logic\Annotations.cpp" RelativePath="..\Source\DocxFormat\Logic\Vml.cpp"
> >
</File> </File>
<File <File
RelativePath="..\Source\DocxFormat\Logic\Annotations.h" RelativePath="..\Source\DocxFormat\Logic\Vml.h"
> >
</File> </File>
</Filter> <File
<Filter RelativePath="..\Source\DocxFormat\Logic\VmlOfficeDrawing.h"
Name="Drawing"
> >
</File>
<File <File
RelativePath="..\Source\DocxFormat\Logic\Shape.h" RelativePath="..\Source\DocxFormat\Logic\VmlWord.h"
> >
</File> </File>
</Filter> </Filter>
</Filter>
<Filter <Filter
Name="Sections" Name="Sections"
> >
......
...@@ -1182,6 +1182,12 @@ namespace OOX ...@@ -1182,6 +1182,12 @@ namespace OOX
} }
virtual ~CDashStopList() virtual ~CDashStopList()
{ {
for ( unsigned int nIndex = 0; nIndex < m_arrDs.size(); nIndex++ )
{
if ( m_arrDs[nIndex] ) delete m_arrDs[nIndex];
m_arrDs[nIndex] = NULL;
}
m_arrDs.clear();
} }
public: public:
...@@ -1201,8 +1207,8 @@ namespace OOX ...@@ -1201,8 +1207,8 @@ namespace OOX
CString sName = oReader.GetName(); CString sName = oReader.GetName();
if ( _T("a:ds") == sName ) if ( _T("a:ds") == sName )
{ {
CDashStop oDs = oReader; CDashStop *oDs = new CDashStop (oReader);
m_arrDs.push_back( oDs ); if (oDs) m_arrDs.push_back( oDs );
} }
} }
} }
...@@ -1212,7 +1218,10 @@ namespace OOX ...@@ -1212,7 +1218,10 @@ namespace OOX
CString sResult = _T("<a:custDash>"); CString sResult = _T("<a:custDash>");
for ( unsigned int nIndex = 0; nIndex < m_arrDs.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrDs.size(); nIndex++ )
sResult += m_arrDs[nIndex].toXML(); {
if (m_arrDs[nIndex])
sResult += m_arrDs[nIndex]->toXML();
}
sResult += _T("</a:custDash>"); sResult += _T("</a:custDash>");
...@@ -1226,7 +1235,7 @@ namespace OOX ...@@ -1226,7 +1235,7 @@ namespace OOX
public: public:
// Childs // Childs
std::vector<CDashStop> m_arrDs; std::vector<CDashStop*> m_arrDs;
}; };
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
...@@ -1815,6 +1824,12 @@ namespace OOX ...@@ -1815,6 +1824,12 @@ namespace OOX
} }
virtual ~CGradientStopList() virtual ~CGradientStopList()
{ {
for ( unsigned int nIndex = 0; nIndex < m_arrGs.size(); nIndex++ )
{
if ( m_arrGs[nIndex] ) delete m_arrGs[nIndex];
m_arrGs[nIndex] = NULL;
}
m_arrGs.clear();
} }
public: public:
...@@ -1834,8 +1849,8 @@ namespace OOX ...@@ -1834,8 +1849,8 @@ namespace OOX
CString sName = oReader.GetName(); CString sName = oReader.GetName();
if ( _T("a:gs") == sName ) if ( _T("a:gs") == sName )
{ {
CGradientStop oGs = oReader; CGradientStop *oGs = new CGradientStop(oReader);
m_arrGs.push_back( oGs ); if (oGs) m_arrGs.push_back( oGs );
} }
} }
} }
...@@ -1845,7 +1860,10 @@ namespace OOX ...@@ -1845,7 +1860,10 @@ namespace OOX
CString sResult = _T("<a:gsLst>"); CString sResult = _T("<a:gsLst>");
for ( unsigned int nIndex = 0; nIndex < m_arrGs.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrGs.size(); nIndex++ )
sResult += m_arrGs[nIndex].toXML(); {
if (m_arrGs[nIndex])
sResult += m_arrGs[nIndex]->toXML();
}
sResult += _T("</a:gsLst>"); sResult += _T("</a:gsLst>");
...@@ -1859,7 +1877,7 @@ namespace OOX ...@@ -1859,7 +1877,7 @@ namespace OOX
public: public:
// Childs // Childs
std::vector<CGradientStop> m_arrGs; std::vector<CGradientStop*> m_arrGs;
}; };
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
......
...@@ -87,6 +87,12 @@ namespace OOX ...@@ -87,6 +87,12 @@ namespace OOX
} }
virtual ~COfficeArtExtensionList() virtual ~COfficeArtExtensionList()
{ {
for ( unsigned int nIndex = 0; nIndex < m_arrExt.size(); nIndex++ )
{
if ( m_arrExt[nIndex] ) delete m_arrExt[nIndex];
m_arrExt[nIndex] = NULL;
}
m_arrExt.clear();
} }
public: public:
...@@ -106,8 +112,8 @@ namespace OOX ...@@ -106,8 +112,8 @@ namespace OOX
CString sName = oReader.GetName(); CString sName = oReader.GetName();
if ( _T("a:ext") == sName ) if ( _T("a:ext") == sName )
{ {
OOX::Drawing::COfficeArtExtension oExt = oReader; OOX::Drawing::COfficeArtExtension *oExt = new OOX::Drawing::COfficeArtExtension(oReader);
m_arrExt.push_back( oExt ); if (oExt) m_arrExt.push_back( oExt );
} }
} }
} }
...@@ -116,7 +122,10 @@ namespace OOX ...@@ -116,7 +122,10 @@ namespace OOX
CString sResult = _T("<a:extLst>"); CString sResult = _T("<a:extLst>");
for ( unsigned int nIndex = 0; nIndex < m_arrExt.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrExt.size(); nIndex++ )
sResult += m_arrExt[nIndex].toXML(); {
if (m_arrExt[nIndex])
sResult += m_arrExt[nIndex]->toXML();
}
sResult += _T("</a:extLst>"); sResult += _T("</a:extLst>");
...@@ -130,8 +139,7 @@ namespace OOX ...@@ -130,8 +139,7 @@ namespace OOX
public: public:
// Childs // Childs
//std::vector<OOX::Drawing::COfficeArtExtension> m_arrExt; std::vector<OOX::Drawing::COfficeArtExtension*> m_arrExt;
std::vector<OOX::Drawing::COfficeArtExtension> m_arrExt;
}; };
} // namespace Drawing } // namespace Drawing
} // namespace OOX } // namespace OOX
......
...@@ -580,6 +580,12 @@ namespace OOX ...@@ -580,6 +580,12 @@ namespace OOX
} }
virtual ~CConnectionSiteList() virtual ~CConnectionSiteList()
{ {
for ( unsigned int nIndex = 0; nIndex < m_arrCxn.size(); nIndex++ )
{
if ( m_arrCxn[nIndex] ) delete m_arrCxn[nIndex];
m_arrCxn[nIndex] = NULL;
}
m_arrCxn.clear();
} }
public: public:
...@@ -600,8 +606,8 @@ namespace OOX ...@@ -600,8 +606,8 @@ namespace OOX
if ( _T("a:cxn") == sName ) if ( _T("a:cxn") == sName )
{ {
OOX::Drawing::CConnectionSite oCxn = oReader; OOX::Drawing::CConnectionSite *oCxn = new OOX::Drawing::CConnectionSite(oReader);
m_arrCxn.push_back( oCxn ); if (oCxn) m_arrCxn.push_back( oCxn );
} }
} }
} }
...@@ -610,7 +616,10 @@ namespace OOX ...@@ -610,7 +616,10 @@ namespace OOX
CString sResult = _T("<a:cxnLst>"); CString sResult = _T("<a:cxnLst>");
for ( unsigned int nIndex = 0; nIndex < m_arrCxn.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrCxn.size(); nIndex++ )
sResult += m_arrCxn[nIndex].toXML(); {
if (m_arrCxn[nIndex])
sResult += m_arrCxn[nIndex]->toXML();
}
sResult += _T("</a:cxnLst>"); sResult += _T("</a:cxnLst>");
...@@ -624,7 +633,7 @@ namespace OOX ...@@ -624,7 +633,7 @@ namespace OOX
public: public:
// Childs // Childs
std::vector<OOX::Drawing::CConnectionSite> m_arrCxn; std::vector<OOX::Drawing::CConnectionSite*> m_arrCxn;
}; };
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// CGeomGuide 20.1.9.11 (Part 1) // CGeomGuide 20.1.9.11 (Part 1)
...@@ -693,6 +702,12 @@ namespace OOX ...@@ -693,6 +702,12 @@ namespace OOX
} }
virtual ~CGeomGuideList() virtual ~CGeomGuideList()
{ {
for ( unsigned int nIndex = 0; nIndex < m_arrGd.size(); nIndex++ )
{
if ( m_arrGd[nIndex] ) delete m_arrGd[nIndex];
m_arrGd[nIndex] = NULL;
}
m_arrGd.clear();
} }
public: public:
...@@ -724,8 +739,8 @@ namespace OOX ...@@ -724,8 +739,8 @@ namespace OOX
if ( _T("a:gd") == sName ) if ( _T("a:gd") == sName )
{ {
OOX::Drawing::CGeomGuide oGd = oReader; OOX::Drawing::CGeomGuide *oGd = new OOX::Drawing::CGeomGuide(oReader);
m_arrGd.push_back( oGd ); if (oGd) m_arrGd.push_back( oGd );
} }
} }
} }
...@@ -742,7 +757,10 @@ namespace OOX ...@@ -742,7 +757,10 @@ namespace OOX
for ( unsigned int nIndex = 0; nIndex < m_arrGd.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrGd.size(); nIndex++ )
sResult += m_arrGd[nIndex].toXML(); {
if (m_arrGd[nIndex])
sResult += m_arrGd[nIndex]->toXML();
}
if ( et_a_avLst == m_eType ) if ( et_a_avLst == m_eType )
sResult += _T("</a:avLst>"); sResult += _T("</a:avLst>");
...@@ -761,7 +779,7 @@ namespace OOX ...@@ -761,7 +779,7 @@ namespace OOX
EElementType m_eType; EElementType m_eType;
// Childs // Childs
std::vector<OOX::Drawing::CGeomGuide> m_arrGd; std::vector<OOX::Drawing::CGeomGuide*> m_arrGd;
}; };
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// CPath2DLineTo 20.1.9.13 (Part 1) // CPath2DLineTo 20.1.9.13 (Part 1)
...@@ -1089,6 +1107,12 @@ namespace OOX ...@@ -1089,6 +1107,12 @@ namespace OOX
} }
virtual ~CPath2DList() virtual ~CPath2DList()
{ {
for ( unsigned int nIndex = 0; nIndex < m_arrPath.size(); nIndex++ )
{
if ( m_arrPath[nIndex] ) delete m_arrPath[nIndex];
m_arrPath[nIndex] = NULL;
}
m_arrPath.clear();
} }
public: public:
...@@ -1109,8 +1133,8 @@ namespace OOX ...@@ -1109,8 +1133,8 @@ namespace OOX
if ( _T("a:path") == sName ) if ( _T("a:path") == sName )
{ {
OOX::Drawing::CPath2D oPath = oReader; OOX::Drawing::CPath2D *oPath = new OOX::Drawing::CPath2D(oReader);
m_arrPath.push_back( oPath ); if (oPath) m_arrPath.push_back( oPath );
} }
} }
} }
...@@ -1119,7 +1143,10 @@ namespace OOX ...@@ -1119,7 +1143,10 @@ namespace OOX
CString sResult = _T("<a:pathLst>"); CString sResult = _T("<a:pathLst>");
for ( unsigned int nIndex = 0; nIndex < m_arrPath.size(); nIndex++ ) for ( unsigned int nIndex = 0; nIndex < m_arrPath.size(); nIndex++ )
sResult += m_arrPath[nIndex].toXML(); {
if (m_arrPath[nIndex])
sResult += m_arrPath[nIndex]->toXML();
}
sResult += _T("</a:pathLst>"); sResult += _T("</a:pathLst>");
...@@ -1133,7 +1160,7 @@ namespace OOX ...@@ -1133,7 +1160,7 @@ namespace OOX
public: public:
// Childs // Childs
std::vector<OOX::Drawing::CPath2D> m_arrPath; std::vector<OOX::Drawing::CPath2D*> m_arrPath;
}; };
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// CAdjustHandleList 20.1.9.1 (Part 1) // CAdjustHandleList 20.1.9.1 (Part 1)
......
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