mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Compare commits
4 Commits
core/devel
...
core/devel
| Author | SHA1 | Date | |
|---|---|---|---|
| ccb47b0bda | |||
| 8aefacd411 | |||
| 6cd5fbcaca | |||
| 7c964b3f9c |
@ -780,28 +780,22 @@ namespace BinDocxRW
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBOOL(rPr.m_oVanish->m_oVal.ToBool());
|
||||
}
|
||||
if (false != rPr.m_sTextOutline.IsInit())
|
||||
if (false != rPr.m_oTextOutline.IsInit())
|
||||
{
|
||||
std::wstring sTextOutline = rPr.m_sTextOutline.get2();
|
||||
//делаем replace потому что читать имена node без namespace можем а атрибуты нет, потому что храним их в map
|
||||
XmlUtils::replace_all(sTextOutline, L"w14:", L"");
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::TextOutline);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::TextOutline);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
|
||||
int nCurPos = m_oBcw.WriteItemWithLengthStart();
|
||||
m_pOfficeDrawingConverter->GetRecordBinary(XMLWRITER_RECORD_TYPE_TEXT_OUTLINE, sTextOutline);
|
||||
|
||||
m_oBcw.m_oStream.WriteRecord2(0, rPr.m_oTextOutline);
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
if (false != rPr.m_sTextFill.IsInit())
|
||||
if (rPr.m_oTextFill.getType() != OOX::et_Unknown)
|
||||
{
|
||||
std::wstring sTextFill = rPr.m_sTextFill.get2();
|
||||
//делаем replace потому что читать имена node без namespace можем а атрибуты нет, потому что храним их в map
|
||||
XmlUtils::replace_all(sTextFill, L"w14:", L"");
|
||||
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rPrType::TextFill);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
|
||||
int nCurPos = m_oBcw.WriteItemWithLengthStart();
|
||||
m_pOfficeDrawingConverter->GetRecordBinary(XMLWRITER_RECORD_TYPE_TEXT_FILL, sTextFill);
|
||||
|
||||
m_oBcw.m_oStream.WriteRecord1(0, rPr.m_oTextFill);
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
if(rPr.m_oDel.IsInit())
|
||||
|
||||
@ -2074,8 +2074,9 @@ void DocxConverter::convert(OOX::Logic::CRunProperty *oox_run_pr, odf_writer::st
|
||||
}
|
||||
|
||||
bool set_color = false;
|
||||
if (oox_run_pr->m_oGradFill.IsInit())
|
||||
if (oox_run_pr->m_oTextFill.getType() == OOX::et_a_gradFill)
|
||||
{
|
||||
NSCommon::smart_ptr<PPTX::Logic::GradFill> gradFill = oox_run_pr->m_oTextFill.Fill.smart_dynamic_cast<PPTX::Logic::GradFill>();
|
||||
odf_writer::odf_drawing_context *drawing_context = odf_context()->drawing_context();
|
||||
if (drawing_context)
|
||||
{
|
||||
@ -2083,7 +2084,7 @@ void DocxConverter::convert(OOX::Logic::CRunProperty *oox_run_pr, odf_writer::st
|
||||
{
|
||||
odf_context()->drawing_context()->start_area_properties();
|
||||
{
|
||||
OoxConverter::convert(oox_run_pr->m_oGradFill.GetPointer(), NULL);
|
||||
OoxConverter::convert(gradFill.operator->());
|
||||
}
|
||||
odf_context()->drawing_context()->end_area_properties();
|
||||
|
||||
|
||||
@ -66,11 +66,11 @@ namespace PPTX
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
std::wstring sName = oReader.GetName();
|
||||
std::wstring sName = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
|
||||
if (sName == L"a:ahXY")
|
||||
if (sName == L"ahXY")
|
||||
ah.reset(new Logic::AhXY(oReader));
|
||||
else if(sName == L"a:ahPolar")
|
||||
else if(sName == L"ahPolar")
|
||||
ah.reset(new Logic::AhPolar(oReader));
|
||||
else ah.reset();
|
||||
}
|
||||
|
||||
@ -147,6 +147,8 @@ namespace PPTX
|
||||
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
if (m_namespace.empty()) m_namespace = L"a";
|
||||
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("rot"), rot);
|
||||
oAttr.Write(_T("spcFirstLastPara"), spcFirstLastPara);
|
||||
@ -186,6 +188,8 @@ namespace PPTX
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
if (m_namespace.empty()) m_namespace = L"a";
|
||||
|
||||
pWriter->StartNode(m_namespace + _T(":bodyPr"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
|
||||
@ -43,8 +43,13 @@ namespace PPTX
|
||||
class ClrMap : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(ClrMap)
|
||||
WritingElement_AdditionConstructors(ClrMap)
|
||||
PPTX_LOGIC_BASE2(ClrMap)
|
||||
|
||||
virtual OOX::EElementType getType() const
|
||||
{
|
||||
return OOX::et_a_clrMap;
|
||||
}
|
||||
ClrMap& operator=(const ClrMap& oSrc)
|
||||
{
|
||||
parentFile = oSrc.parentFile;
|
||||
@ -60,7 +65,57 @@ namespace PPTX
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
m_name = oReader.GetName();
|
||||
|
||||
ColorMap.clear();
|
||||
|
||||
ReadAttributes(oReader);
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
Limit::ColorSchemeIndex lColorIndex_accent1;
|
||||
Limit::ColorSchemeIndex lColorIndex_accent2;
|
||||
Limit::ColorSchemeIndex lColorIndex_accent3;
|
||||
Limit::ColorSchemeIndex lColorIndex_accent4;
|
||||
Limit::ColorSchemeIndex lColorIndex_accent5;
|
||||
Limit::ColorSchemeIndex lColorIndex_accent6;
|
||||
Limit::ColorSchemeIndex lColorIndex_bg1;
|
||||
Limit::ColorSchemeIndex lColorIndex_bg2;
|
||||
Limit::ColorSchemeIndex lColorIndex_tx1;
|
||||
Limit::ColorSchemeIndex lColorIndex_tx2;
|
||||
Limit::ColorSchemeIndex lColorIndex_folHlink;
|
||||
Limit::ColorSchemeIndex lColorIndex_hlink;
|
||||
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("accent1"), lColorIndex_accent1)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("accent2"), lColorIndex_accent2 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("accent3"), lColorIndex_accent3 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("accent4"), lColorIndex_accent4 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("accent5"), lColorIndex_accent5 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("accent6"), lColorIndex_accent6 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("bg1"), lColorIndex_bg1 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("bg2"), lColorIndex_bg2 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("tx1"), lColorIndex_tx1 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("tx1"), lColorIndex_tx2 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("folHlink"), lColorIndex_folHlink )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("hlink"), lColorIndex_hlink )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
|
||||
ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent1"), lColorIndex_accent1));
|
||||
ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent2"), lColorIndex_accent2));
|
||||
ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent3"), lColorIndex_accent3));
|
||||
ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent4"), lColorIndex_accent4));
|
||||
ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent5"), lColorIndex_accent5));
|
||||
ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent6"), lColorIndex_accent6));
|
||||
ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("bg1"), lColorIndex_bg1));
|
||||
ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("bg2"), lColorIndex_bg2));
|
||||
ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("tx1"), lColorIndex_tx1));
|
||||
ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("tx2"), lColorIndex_tx2));
|
||||
ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("folHlink"), lColorIndex_folHlink));
|
||||
ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("hlink"), lColorIndex_hlink));
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
m_name = node.GetName();
|
||||
|
||||
@ -43,9 +43,34 @@ namespace PPTX
|
||||
class ClrMapOvr : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(ClrMapOvr)
|
||||
WritingElement_AdditionConstructors(ClrMapOvr)
|
||||
PPTX_LOGIC_BASE2(ClrMapOvr)
|
||||
|
||||
public:
|
||||
virtual OOX::EElementType getType() const
|
||||
{
|
||||
return OOX::et_a_clrMapOvr;
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
if ( oReader.IsEmptyNode() )
|
||||
return;
|
||||
|
||||
int nParentDepth = oReader.GetDepth();
|
||||
while( oReader.ReadNextSiblingNode( nParentDepth ) )
|
||||
{
|
||||
std::wstring sName = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
|
||||
if ( L"overrideClrMapping" == sName)
|
||||
{
|
||||
overrideClrMapping = oReader;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (overrideClrMapping.is_init())
|
||||
overrideClrMapping->m_name = _T("a:overrideClrMapping");
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
overrideClrMapping = node.ReadNodeNoNS(_T("overrideClrMapping"));
|
||||
|
||||
@ -63,7 +63,7 @@ namespace PPTX
|
||||
void ReadAttributes2(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
nullable_string sTmp;
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle ( oReader, _T("val"), sTmp)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
|
||||
@ -72,7 +72,7 @@ namespace PPTX
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle ( oReader, _T("val"), val)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ namespace PPTX
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle ( oReader, _T("val"), val)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ namespace PPTX
|
||||
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("val"), val)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ namespace PPTX
|
||||
{
|
||||
std::wstring val;
|
||||
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("val"), val)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ namespace PPTX
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
std::wstring strName = oReader.GetName();
|
||||
std::wstring strName = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
|
||||
if (strName == _T("effectLst"))
|
||||
List.reset(new Logic::EffectLst(oReader));
|
||||
|
||||
@ -73,9 +73,9 @@ namespace PPTX
|
||||
std::wstring strName = oReader.GetName();
|
||||
|
||||
if (strName == L"a:clrTo")
|
||||
ClrTo.fromXML(oReader);
|
||||
ClrTo.fromXMLParent(oReader);
|
||||
else if (strName == L"a:clrFrom")
|
||||
ClrFrom.fromXML(oReader);
|
||||
ClrFrom.fromXMLParent(oReader);
|
||||
}
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
|
||||
@ -74,6 +74,8 @@ namespace PPTX
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
m_namespace = XmlUtils::GetNamespace(oReader.GetName());
|
||||
|
||||
ReadAttributes( oReader );
|
||||
|
||||
if ( oReader.IsEmptyNode() )
|
||||
@ -95,7 +97,6 @@ namespace PPTX
|
||||
int nCurDepth1 = oReader.GetDepth();
|
||||
while( oReader.ReadNextSiblingNode( nCurDepth1 ) )
|
||||
{
|
||||
std::wstring sName1 = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
Gs g; GsLst.push_back(g);
|
||||
GsLst.back().fromXML(oReader);
|
||||
}
|
||||
@ -104,7 +105,7 @@ namespace PPTX
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start ( oReader )
|
||||
WritingElement_ReadAttributes_Start_No_NS ( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("rotWithShape"), rotWithShape )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("flip"), flip )
|
||||
WritingElement_ReadAttributes_End ( oReader )
|
||||
@ -164,7 +165,7 @@ namespace PPTX
|
||||
oValue.WriteNullable(lin);
|
||||
oValue.WriteNullable(tileRect);
|
||||
|
||||
std::wstring strName = (_T("") == m_namespace) ? _T("gradFill") : (m_namespace + _T(":gradFill"));
|
||||
std::wstring strName = m_namespace.empty() ? _T("gradFill") : (m_namespace + _T(":gradFill"));
|
||||
return XmlUtils::CreateNode(strName, oAttr, oValue);
|
||||
}
|
||||
|
||||
@ -179,7 +180,7 @@ namespace PPTX
|
||||
}
|
||||
else
|
||||
{
|
||||
strName = (_T("") == m_namespace) ? _T("gradFill") : (m_namespace + _T(":gradFill"));
|
||||
strName = m_namespace.empty() ? _T("gradFill") : (m_namespace + _T(":gradFill"));
|
||||
}
|
||||
|
||||
pWriter->StartNode(strName);
|
||||
|
||||
@ -71,9 +71,9 @@ namespace PPTX
|
||||
{
|
||||
std::wstring sName = oReader.GetName();
|
||||
if (sName == L"a:fgClr")
|
||||
fgClr.fromXML(oReader);
|
||||
fgClr.fromXMLParent(oReader);
|
||||
if (sName == L"a:bgClr")
|
||||
bgClr.fromXML(oReader);
|
||||
bgClr.fromXMLParent(oReader);
|
||||
}
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
|
||||
@ -71,13 +71,14 @@ namespace PPTX
|
||||
while( oReader.ReadNextSiblingNode( nCurDepth ) )
|
||||
{
|
||||
color.fromXML(oReader);
|
||||
break;
|
||||
}
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
nullable_int tmp;
|
||||
WritingElement_ReadAttributes_Start ( oReader )
|
||||
WritingElement_ReadAttributes_Start_No_NS ( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle ( oReader, _T("pos"), tmp)
|
||||
WritingElement_ReadAttributes_End ( oReader )
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ namespace PPTX
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
std::wstring name = oReader.GetName();
|
||||
std::wstring name = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
|
||||
type = JoinEmpty;
|
||||
|
||||
@ -80,7 +80,7 @@ namespace PPTX
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start ( oReader )
|
||||
WritingElement_ReadAttributes_Start_No_NS ( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("lim"), lim )
|
||||
WritingElement_ReadAttributes_End ( oReader )
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ namespace PPTX
|
||||
{
|
||||
//m_eDashType = OOX::Drawing::linedashtypeUnknown;
|
||||
|
||||
std::wstring sName = oReader.GetName();
|
||||
m_name = oReader.GetName();
|
||||
|
||||
ReadAttributes( oReader );
|
||||
|
||||
@ -66,31 +66,31 @@ namespace PPTX
|
||||
int nCurDepth = oReader.GetDepth();
|
||||
while ( oReader.ReadNextSiblingNode( nCurDepth ) )
|
||||
{
|
||||
sName = oReader.GetName();
|
||||
if (_T("a:bevel") == sName ||
|
||||
_T("a:miter") == sName ||
|
||||
_T("a:round") == sName )
|
||||
std::wstring sName = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
if (_T("bevel") == sName ||
|
||||
_T("miter") == sName ||
|
||||
_T("round") == sName )
|
||||
{
|
||||
Join.fromXML(oReader);
|
||||
}
|
||||
else if ( _T("a:tailEnd") == sName )
|
||||
else if ( _T("tailEnd") == sName )
|
||||
tailEnd = oReader;
|
||||
else if ( _T("a:headEnd") == sName )
|
||||
else if ( _T("headEnd") == sName )
|
||||
headEnd = oReader;
|
||||
|
||||
else if ( _T("a:gradFill") == sName ||
|
||||
_T("a:noFill") == sName ||
|
||||
_T("a:pattFill") == sName ||
|
||||
_T("a:solidFill") == sName )
|
||||
else if ( _T("gradFill") == sName ||
|
||||
_T("noFill") == sName ||
|
||||
_T("pattFill") == sName ||
|
||||
_T("solidFill") == sName )
|
||||
{
|
||||
Fill.fromXML(oReader);
|
||||
}
|
||||
else if ( _T("a:custDash") == sName )
|
||||
else if ( _T("custDash") == sName )
|
||||
{
|
||||
//custDash = oReader;
|
||||
//m_eDashType = OOX::Drawing::linedashtypeCustom;
|
||||
}
|
||||
else if ( _T("a:prstDash") == sName )
|
||||
else if ( _T("prstDash") == sName )
|
||||
{
|
||||
prstDash = oReader;
|
||||
//m_eDashType = OOX::Drawing::linedashtypePreset;
|
||||
@ -102,7 +102,7 @@ namespace PPTX
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
m_name = _T("a:ln");
|
||||
m_name = node.GetName();
|
||||
|
||||
node.ReadAttributeBase(L"algn", algn);
|
||||
node.ReadAttributeBase(L"cap", cap);
|
||||
@ -120,7 +120,7 @@ namespace PPTX
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
// Читаем атрибуты
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("algn"), algn )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("cap"), cap )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("cmpd"), cmpd )
|
||||
@ -131,11 +131,20 @@ namespace PPTX
|
||||
}
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
std::wstring _name = m_name;
|
||||
if (_name.empty())
|
||||
_name = _T("a:ln");
|
||||
|
||||
std::wstring sAttrNamespace;
|
||||
|
||||
if (_name == L"w14:textOutline")
|
||||
sAttrNamespace = _T("w14:");
|
||||
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("w"), w);
|
||||
oAttr.WriteLimitNullable(_T("cap"), cap);
|
||||
oAttr.WriteLimitNullable(_T("cmpd"), cmpd);
|
||||
oAttr.WriteLimitNullable(_T("algn"), algn);
|
||||
oAttr.Write (sAttrNamespace + _T("w"), w);
|
||||
oAttr.WriteLimitNullable(sAttrNamespace + _T("cap"), cap);
|
||||
oAttr.WriteLimitNullable(sAttrNamespace + _T("cmpd"), cmpd);
|
||||
oAttr.WriteLimitNullable(sAttrNamespace + _T("algn"), algn);
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(Fill);
|
||||
@ -144,14 +153,15 @@ namespace PPTX
|
||||
oValue.WriteNullable(headEnd);
|
||||
oValue.WriteNullable(tailEnd);
|
||||
|
||||
return XmlUtils::CreateNode(_T("a:ln"), oAttr, oValue);
|
||||
return XmlUtils::CreateNode(_name, oAttr, oValue);
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
std::wstring _name = m_name;
|
||||
if (_name == _T(""))
|
||||
if (_name.empty())
|
||||
_name = _T("a:ln");
|
||||
|
||||
std::wstring sAttrNamespace;
|
||||
if (XMLWRITER_DOC_TYPE_WORDART == pWriter->m_lDocType)
|
||||
{
|
||||
|
||||
@ -127,7 +127,7 @@ namespace PPTX
|
||||
int nParentDepth = oReader.GetDepth();
|
||||
while( oReader.ReadNextSiblingNode( nParentDepth ) )
|
||||
{
|
||||
std::wstring strName = oReader.GetName();
|
||||
std::wstring strName = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
WritingElement *pItem = NULL;
|
||||
|
||||
if (_T("pPr") == strName)
|
||||
|
||||
@ -57,7 +57,7 @@ namespace PPTX
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("val"), val )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ namespace PPTX
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
std::wstring name = oReader.GetName();
|
||||
std::wstring name = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
|
||||
if(name == _T("r"))
|
||||
Elem.reset(new Logic::Run(oReader));
|
||||
|
||||
@ -98,14 +98,19 @@ namespace PPTX
|
||||
{
|
||||
public:
|
||||
WritingElement_AdditionConstructors(RunProperties)
|
||||
PPTX_LOGIC_BASE2(RunProperties)
|
||||
|
||||
RunProperties()
|
||||
{
|
||||
m_name = L"a:rPr";
|
||||
}
|
||||
virtual OOX::EElementType getType () const
|
||||
{
|
||||
return OOX::et_a_rPr;
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
m_name = oReader.GetName();
|
||||
|
||||
ReadAttributes( oReader );
|
||||
|
||||
if ( oReader.IsEmptyNode() )
|
||||
@ -114,34 +119,34 @@ namespace PPTX
|
||||
int nParentDepth = oReader.GetDepth();
|
||||
while( oReader.ReadNextSiblingNode( nParentDepth ) )
|
||||
{
|
||||
std::wstring sName = oReader.GetName();
|
||||
std::wstring sName = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
|
||||
if (L"a:blipFill" == sName ||
|
||||
L"a:gradFill" == sName ||
|
||||
L"a:grpFill" == sName ||
|
||||
L"a:noFill" == sName ||
|
||||
L"a:pattFill" == sName ||
|
||||
L"a:solidFill" == sName )
|
||||
if (L"blipFill" == sName ||
|
||||
L"gradFill" == sName ||
|
||||
L"grpFill" == sName ||
|
||||
L"noFill" == sName ||
|
||||
L"pattFill" == sName ||
|
||||
L"solidFill" == sName )
|
||||
{
|
||||
Fill.fromXML(oReader);
|
||||
}
|
||||
else if ( _T("a:ln") == sName )
|
||||
else if ( _T("ln") == sName )
|
||||
ln = oReader;
|
||||
else if ( _T("a:cs") == sName )
|
||||
else if ( _T("cs") == sName )
|
||||
cs = oReader;
|
||||
else if ( _T("a:ea") == sName )
|
||||
else if ( _T("ea") == sName )
|
||||
ea = oReader;
|
||||
else if ( _T("a:latin") == sName )
|
||||
else if ( _T("latin") == sName )
|
||||
latin = oReader;
|
||||
else if ( _T("a:sym") == sName )
|
||||
else if ( _T("sym") == sName )
|
||||
sym = oReader;
|
||||
else if ( _T("a:hlinkClick") == sName )
|
||||
else if ( _T("hlinkClick") == sName )
|
||||
hlinkClick = oReader;
|
||||
else if ( _T("a:rtl") == sName )
|
||||
else if ( _T("rtl") == sName )
|
||||
rtl = oReader;
|
||||
else if ( L"a:effectDag" == sName ||
|
||||
L"a:effectLst" == sName ||
|
||||
L"a:extLst" == sName )
|
||||
else if ( L"effectDag" == sName ||
|
||||
L"effectLst" == sName ||
|
||||
L"extLst" == sName )
|
||||
{
|
||||
EffectList.fromXML(oReader);
|
||||
}
|
||||
|
||||
@ -45,7 +45,11 @@ namespace PPTX
|
||||
{
|
||||
public:
|
||||
WritingElement_AdditionConstructors(TextListStyle)
|
||||
PPTX_LOGIC_BASE2(TextListStyle)
|
||||
|
||||
TextListStyle()
|
||||
{
|
||||
m_name = L"a:lstStyle";
|
||||
}
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -53,8 +53,11 @@ namespace PPTX
|
||||
{
|
||||
public:
|
||||
WritingElement_AdditionConstructors(TextParagraphPr)
|
||||
PPTX_LOGIC_BASE2(TextParagraphPr)
|
||||
|
||||
TextParagraphPr()
|
||||
{
|
||||
m_name = L"a:pPr";
|
||||
}
|
||||
TextParagraphPr& operator=(const TextParagraphPr& oSrc)
|
||||
{
|
||||
parentFile = oSrc.parentFile;
|
||||
@ -92,6 +95,7 @@ namespace PPTX
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
m_name = oReader.GetName();
|
||||
ReadAttributes( oReader );
|
||||
|
||||
if ( oReader.IsEmptyNode() )
|
||||
|
||||
@ -64,6 +64,18 @@ namespace PPTX
|
||||
fromXML(node);
|
||||
return *this;
|
||||
}
|
||||
void UniColor::fromXMLParent(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
if ( oReader.IsEmptyNode() )
|
||||
return;
|
||||
|
||||
int nCurDepth = oReader.GetDepth();
|
||||
while( oReader.ReadNextSiblingNode( nCurDepth ) )
|
||||
{
|
||||
fromXML(oReader);
|
||||
break;
|
||||
}
|
||||
}
|
||||
void UniColor::fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
std::wstring name = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
|
||||
@ -51,6 +51,8 @@ namespace PPTX
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node);
|
||||
|
||||
void fromXMLParent(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
virtual OOX::EElementType getType () const;
|
||||
|
||||
virtual void GetColorFrom(XmlUtils::CXmlNode& element);
|
||||
|
||||
@ -88,7 +88,7 @@ namespace PPTX
|
||||
}
|
||||
void UniEffect::fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
std::wstring name = oReader.GetName();
|
||||
std::wstring name = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
|
||||
switch ((int)name[0])
|
||||
{
|
||||
|
||||
@ -59,34 +59,34 @@ namespace PPTX
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
std::wstring name = oReader.GetName();
|
||||
std::wstring name = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
|
||||
if (name == _T("a:blipFill"))
|
||||
if (name == _T("blipFill"))
|
||||
{
|
||||
m_type = blipFill;
|
||||
Fill.reset(new Logic::BlipFill(oReader));
|
||||
}
|
||||
else if(name == _T("a:noFill"))
|
||||
else if(name == _T("noFill"))
|
||||
{
|
||||
m_type = noFill;
|
||||
Fill.reset(new Logic::NoFill(oReader));
|
||||
}
|
||||
else if(name == _T("a:solidFill"))
|
||||
else if(name == _T("solidFill"))
|
||||
{
|
||||
m_type = solidFill;
|
||||
Fill.reset(new Logic::SolidFill(oReader));
|
||||
}
|
||||
else if(name == _T("a:gradFill"))
|
||||
else if(name == _T("gradFill"))
|
||||
{
|
||||
m_type = gradFill;
|
||||
Fill.reset(new Logic::GradFill(oReader));
|
||||
}
|
||||
else if(name == _T("a:pattFill"))
|
||||
else if(name == _T("pattFill"))
|
||||
{
|
||||
m_type = pattFill;
|
||||
Fill.reset(new Logic::PattFill(oReader));
|
||||
}
|
||||
else if(name == _T("a:grpFill"))
|
||||
else if(name == _T("grpFill"))
|
||||
{
|
||||
m_type = grpFill;
|
||||
Fill.reset(new Logic::GrpFill(oReader));
|
||||
@ -197,7 +197,7 @@ namespace PPTX
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
if (Fill.IsInit())
|
||||
Fill->toXML();
|
||||
return Fill->toXML();
|
||||
return _T("");
|
||||
}
|
||||
|
||||
@ -723,6 +723,7 @@ namespace PPTX
|
||||
smart_ptr<WrapperWritingElement> Fill;
|
||||
enum Type {notInit, noFill, solidFill, gradFill, blipFill, pattFill, grpFill};
|
||||
Type m_type;
|
||||
std::wstring m_namespace;
|
||||
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds()
|
||||
|
||||
@ -24,8 +24,8 @@ DEFINES += UNICODE _UNICODE \
|
||||
_USE_XMLLITE_READER_ \
|
||||
USE_LITE_READER \
|
||||
LIBXML_READER_ENABLED \
|
||||
PPTX_DEF\
|
||||
PPT_DEF\
|
||||
PPTX_DEF \
|
||||
PPT_DEF \
|
||||
DONT_WRITE_EMBEDDED_FONTS \
|
||||
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML
|
||||
|
||||
|
||||
@ -250,27 +250,14 @@ namespace OOX
|
||||
else if ( _T("w:webHidden") == sName )
|
||||
m_oWebHidden = oReader;
|
||||
else if (_T("w14:textOutline") == sName)
|
||||
m_sTextOutline = oReader.GetOuterXml();
|
||||
m_oTextOutline = oReader;
|
||||
else if (_T("w14:textFill") == sName)
|
||||
{
|
||||
m_sTextFill = oReader.GetOuterXml();
|
||||
|
||||
std::wstring strXml = _T("<xml xmlns:wps=\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" >");
|
||||
strXml += m_sTextFill.get();
|
||||
strXml += _T("</xml>");
|
||||
|
||||
XmlUtils::CXmlLiteReader oSubReader;//нам нужны xml и сами объекты
|
||||
bool result = oSubReader.FromString(strXml);
|
||||
|
||||
result = oSubReader.ReadNextNode();//root
|
||||
result = oSubReader.ReadNextNode();//textFill
|
||||
result = oSubReader.ReadNextNode();//...Fill
|
||||
|
||||
std::wstring sName = XmlUtils::GetNameNoNS(oSubReader.GetName());
|
||||
|
||||
if (_T("gradFill") == sName)
|
||||
int nParentDepth1 = oReader.GetDepth();
|
||||
while( oReader.ReadNextSiblingNode( nParentDepth1 ) )
|
||||
{
|
||||
m_oGradFill = oSubReader;
|
||||
m_oTextFill.fromXML(oReader);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,6 +40,7 @@
|
||||
#include "../../Common/ComplexTypes.h"
|
||||
|
||||
#include "../Drawing/DrawingEffects.h"
|
||||
#include "../../../../../ASCOfficePPTXFile/PPTXFormat/Logic/Ln.h"
|
||||
|
||||
namespace ComplexTypes
|
||||
{
|
||||
@ -1403,7 +1404,7 @@ namespace OOX
|
||||
|
||||
public:
|
||||
|
||||
bool m_bRPRChange; // Является ли данный w:rPr дочерним по отношению к w:rPrChange
|
||||
bool m_bRPRChange; // Является ли данный w:rPr дочерним по отношению к w:rPrChange
|
||||
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oBold;
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oBoldCs;
|
||||
@ -1435,23 +1436,21 @@ namespace OOX
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oRtL;
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oShadow;
|
||||
nullable<ComplexTypes::Word::CShading > m_oShd;
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oSmallCaps;
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oSnapToGrid;
|
||||
nullable<ComplexTypes::Word::CSignedTwipsMeasure > m_oSpacing;
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oSpecVanish;
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oStrike;
|
||||
nullable<ComplexTypes::Word::CHpsMeasure > m_oSz;
|
||||
nullable<ComplexTypes::Word::CHpsMeasure > m_oSzCs;
|
||||
nullable<ComplexTypes::Word::CUnderline > m_oU;
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oVanish;
|
||||
nullable<ComplexTypes::Word::CVerticalAlignRun > m_oVertAlign;
|
||||
nullable<ComplexTypes::Word::CTextScale > m_oW;
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oWebHidden;
|
||||
|
||||
nullable<std::wstring> m_sTextOutline;
|
||||
nullable<std::wstring> m_sTextFill;
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oSmallCaps;
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oSnapToGrid;
|
||||
nullable<ComplexTypes::Word::CSignedTwipsMeasure > m_oSpacing;
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oSpecVanish;
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oStrike;
|
||||
nullable<ComplexTypes::Word::CHpsMeasure > m_oSz;
|
||||
nullable<ComplexTypes::Word::CHpsMeasure > m_oSzCs;
|
||||
nullable<ComplexTypes::Word::CUnderline > m_oU;
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oVanish;
|
||||
nullable<ComplexTypes::Word::CVerticalAlignRun > m_oVertAlign;
|
||||
nullable<ComplexTypes::Word::CTextScale > m_oW;
|
||||
nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue> > m_oWebHidden;
|
||||
PPTX::Logic::UniFill m_oTextFill;
|
||||
nullable<PPTX::Logic::Ln> m_oTextOutline;
|
||||
|
||||
nullable<OOX::Drawing::CGradientFillProperties> m_oGradFill;
|
||||
};
|
||||
|
||||
} // namespace Logic
|
||||
|
||||
@ -174,6 +174,7 @@ namespace OOX
|
||||
et_a_clrChange, // <a:clrChange>
|
||||
et_a_clrFrom, // <a:clrFrom>
|
||||
et_a_clrMap, // <a:clrMap>
|
||||
et_a_clrMapOvr, // <a:clrMapOvr>
|
||||
et_a_clrRepl, // <a:clrRepl>
|
||||
et_a_clrScheme, // <a:clrScheme>
|
||||
et_a_clrTo, // <a:clrTo>
|
||||
|
||||
@ -251,31 +251,42 @@ namespace XmlUtils
|
||||
|
||||
AVSINLINE std::wstring CreateNode(const std::wstring& strName, const CAttribute& oAttr)
|
||||
{
|
||||
return _T("<") + strName + _T(" ") + oAttr.m_strValue + _T(" />");
|
||||
if (strName.empty()) return L"";
|
||||
|
||||
return L"<" + strName + (oAttr.m_strValue.empty() ? L"" : L" " + oAttr.m_strValue) + L"/>";
|
||||
}
|
||||
AVSINLINE std::wstring CreateNode(const std::wstring& strName, const CNodeValue& oNode)
|
||||
{
|
||||
if (_T("") == oNode.m_strValue)
|
||||
return _T("<") + strName + _T("/>");
|
||||
if (strName.empty()) return L"";
|
||||
|
||||
return _T("<") + strName + _T(">") + oNode.m_strValue + _T("</") + strName + _T(">");
|
||||
if (oNode.m_strValue.empty())
|
||||
return L"<" + strName + L"/>";
|
||||
|
||||
return L"<" + strName + L">" + oNode.m_strValue + L"</" + strName + L">";
|
||||
}
|
||||
AVSINLINE std::wstring CreateNode(const std::wstring& strName, const CAttribute& oAttr, const CNodeValue& oNode)
|
||||
{
|
||||
if (_T("") == oNode.m_strValue)
|
||||
if (strName.empty()) return L"";
|
||||
|
||||
if ( oNode.m_strValue.empty())
|
||||
return CreateNode(strName, oAttr);
|
||||
|
||||
return _T("<") + strName + _T(" ") + oAttr.m_strValue + _T(">") + oNode.m_strValue + _T("</") + strName + _T(">");
|
||||
return L"<" + strName + (oAttr.m_strValue.empty() ? L"" : L" " + oAttr.m_strValue) + L">" + oNode.m_strValue + L"</" + strName + L">";
|
||||
}
|
||||
AVSINLINE std::wstring CreateNode(const std::wstring& strName, const CAttribute& oAttr, const std::wstring& strXml)
|
||||
{
|
||||
if (_T("") != strXml)
|
||||
return _T("<") + strName + _T(" ") + oAttr.m_strValue + _T(">") + strXml + _T("</") + strName + _T(">");
|
||||
return _T("<") + strName + _T(" ") + oAttr.m_strValue + _T("/>");
|
||||
if (strName.empty()) return L"";
|
||||
|
||||
if (!strXml.empty())
|
||||
return L"<" + strName + (oAttr.m_strValue.empty() ? L"" : L" " + oAttr.m_strValue) + L">" + strXml + L"</" + strName + L">";
|
||||
|
||||
return L"<" + strName + (oAttr.m_strValue.empty() ? L"" : L" " + oAttr.m_strValue) + L"/>";
|
||||
}
|
||||
AVSINLINE std::wstring CreateNode(const std::wstring& strName, const std::wstring& strXml)
|
||||
{
|
||||
return _T("<") + strName + _T(">") + strXml + _T("</") + strName + _T(">");
|
||||
if (strName.empty()) return L"";
|
||||
|
||||
return L"<" + strName + L">" + strXml + L"</" + strName + L">";
|
||||
}
|
||||
|
||||
AVSINLINE void SaveToFile(const std::wstring& strFile, const std::wstring& strXml)
|
||||
|
||||
@ -992,7 +992,6 @@ namespace OOX{
|
||||
m_roundedCorners = NULL;
|
||||
m_AlternateContent = NULL;
|
||||
m_style = NULL;
|
||||
m_clrMapOvr = NULL;
|
||||
m_pivotSource = NULL;
|
||||
m_protection = NULL;
|
||||
m_chart = NULL;
|
||||
@ -1013,8 +1012,6 @@ namespace OOX{
|
||||
delete m_AlternateContent;
|
||||
if(NULL != m_style)
|
||||
delete m_style;
|
||||
if(NULL != m_clrMapOvr)
|
||||
delete m_clrMapOvr;
|
||||
if(NULL != m_pivotSource)
|
||||
delete m_pivotSource;
|
||||
if(NULL != m_protection)
|
||||
@ -1069,10 +1066,12 @@ namespace OOX{
|
||||
}
|
||||
else if(_T("clrMapOvr") == sName)
|
||||
{
|
||||
std::wstring* pNewElem = new std::wstring;
|
||||
std::wstring sVal = oReader.GetOuterXml();
|
||||
*pNewElem = sVal;
|
||||
m_clrMapOvr = pNewElem;
|
||||
int nParentDepth1 = oReader.GetDepth();
|
||||
while( oReader.ReadNextSiblingNode( nParentDepth1 ) )
|
||||
{
|
||||
std::wstring sName1 = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
m_oClrMapOvr = oReader;
|
||||
}
|
||||
}
|
||||
else if(_T("pivotSource") == sName)
|
||||
{
|
||||
@ -1156,9 +1155,9 @@ namespace OOX{
|
||||
std::wstring sNodeName = _T("c:style");
|
||||
m_style->toXML(sNodeName, writer);
|
||||
}
|
||||
if(NULL != m_clrMapOvr)
|
||||
if(m_oClrMapOvr.IsInit())
|
||||
{
|
||||
writer.WriteString(*m_clrMapOvr);
|
||||
writer.WriteString(m_oClrMapOvr->toXML());
|
||||
}
|
||||
if(NULL != m_pivotSource)
|
||||
{
|
||||
|
||||
@ -474,11 +474,12 @@ namespace OOX{
|
||||
CT_Boolean* m_roundedCorners;
|
||||
AlternateContent* m_AlternateContent;
|
||||
CT_Style1* m_style;
|
||||
std::wstring* m_clrMapOvr;
|
||||
CT_PivotSource* m_pivotSource;
|
||||
CT_Protection* m_protection;
|
||||
CT_Chart* m_chart;
|
||||
|
||||
nullable<PPTX::Logic::ClrMap> m_oClrMapOvr;
|
||||
|
||||
nullable<PPTX::Logic::SpPr> m_oSpPr;
|
||||
nullable<PPTX::Logic::TxBody> m_oTxPr;
|
||||
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
|
||||
#include "../../../../ASCOfficePPTXFile/PPTXFormat/Logic/SpPr.h"
|
||||
#include "../../../../ASCOfficePPTXFile/PPTXFormat/Logic/TxBody.h"
|
||||
#include "../../../../ASCOfficePPTXFile/PPTXFormat/Logic/ClrMap.h"
|
||||
|
||||
#include "ComplexTypes_Spreadsheet.h"
|
||||
#include "FileTypes_Spreadsheet.h"
|
||||
|
||||
@ -666,6 +666,14 @@
|
||||
<File
|
||||
RelativePath="..\..\..\ASCOfficeDocxFile2\BinWriter\BinWriters.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/bigobj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\ASCOfficeDocxFile2\BinWriter\BinWriters.h"
|
||||
|
||||
@ -838,22 +838,6 @@ namespace BinXlsxRW
|
||||
BinaryChartReader::BinaryChartReader(NSBinPptxRW::CBinaryFileReader& oBufferedStream, SaveParams& oSaveParams, NSBinPptxRW::CDrawingConverter* pOfficeDrawingConverter):Binary_CommonReader(oBufferedStream),m_oSaveParams(oSaveParams),m_pOfficeDrawingConverter(pOfficeDrawingConverter)
|
||||
{}
|
||||
|
||||
std::wstring* BinaryChartReader::GetRecordXml(long length, int nRecordType)
|
||||
{
|
||||
std::wstring* pNewElem = new std::wstring;
|
||||
if(length > 0)
|
||||
{
|
||||
long nCurPos = m_oBufferedStream.GetPos();
|
||||
std::wstring sXml;
|
||||
HRESULT hRes = m_pOfficeDrawingConverter->GetRecordXml(nCurPos, length, nRecordType, XMLWRITER_DOC_TYPE_CHART, sXml);
|
||||
if (S_OK == hRes)
|
||||
{
|
||||
*pNewElem = sXml;
|
||||
}
|
||||
m_oBufferedStream.Seek(nCurPos + length);
|
||||
}
|
||||
return pNewElem;
|
||||
}
|
||||
int BinaryChartReader::ReadCT_extLst(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
@ -908,7 +892,8 @@ namespace BinXlsxRW
|
||||
}
|
||||
else if(c_oserct_chartspaceCLRMAPOVR == type)
|
||||
{
|
||||
poVal->m_clrMapOvr = GetRecordXml(length, XMLWRITER_RECORD_TYPE_CLRMAPOVR);
|
||||
poVal->m_oClrMapOvr = new PPTX::Logic::ClrMap();
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_ClrMapOvr, this, poVal->m_oClrMapOvr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_chartspacePIVOTSOURCE == type)
|
||||
{
|
||||
@ -931,12 +916,12 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_chartspaceSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
res = ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_chartspaceTXPR == type)
|
||||
{
|
||||
poVal->m_oTxPr = new PPTX::Logic::TxBody;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_TxPr, this, poVal->m_oTxPr.GetPointer());
|
||||
res = ReadCT_TxPr(0, length, poVal->m_oTxPr.GetPointer());
|
||||
}
|
||||
//else if(c_oserct_chartspaceEXTERNALDATA == type)
|
||||
//{
|
||||
@ -1040,6 +1025,22 @@ namespace BinXlsxRW
|
||||
}
|
||||
return res;
|
||||
}
|
||||
int BinaryChartReader::ReadCT_ClrMapOvr(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
PPTX::Logic::ClrMap* poVal = static_cast<PPTX::Logic::ClrMap*>(poResult);
|
||||
if(length > 0)
|
||||
{
|
||||
poVal->m_name = L"c:clrMapOvr";
|
||||
long nCurPos = m_oBufferedStream.GetPos();
|
||||
|
||||
BYTE typeRec1 = m_oBufferedStream.GetUChar();
|
||||
poVal->fromPPTY(&m_oBufferedStream);
|
||||
|
||||
m_oBufferedStream.Seek(nCurPos + length);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
int BinaryChartReader::ReadCT_RelId(long length, CT_RelId* poResult)
|
||||
{
|
||||
return Read1(length, &BinaryChartReader::ReadCT_RelId, this, poResult);
|
||||
@ -1321,7 +1322,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_legendentryTXPR == type)
|
||||
{
|
||||
poVal->m_oTxPr = new PPTX::Logic::TxBody;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_TxPr, this, poVal->m_oTxPr.GetPointer());
|
||||
res = ReadCT_TxPr(0, length, poVal->m_oTxPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_legendentryEXTLST == type)
|
||||
{
|
||||
@ -1413,12 +1414,12 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_legendSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_legendTXPR == type)
|
||||
{
|
||||
poVal->m_oTxPr = new PPTX::Logic::TxBody;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_TxPr, this, poVal->m_oTxPr.GetPointer());
|
||||
res = ReadCT_TxPr(0, length, poVal->m_oTxPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_legendEXTLST == type)
|
||||
{
|
||||
@ -1593,12 +1594,12 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_dtableSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_dtableTXPR == type)
|
||||
{
|
||||
poVal->m_oTxPr = new PPTX::Logic::TxBody;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_TxPr, this, poVal->m_oTxPr.GetPointer());
|
||||
res = ReadCT_TxPr(0, length, poVal->m_oTxPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_dtableEXTLST == type)
|
||||
{
|
||||
@ -1683,12 +1684,12 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_seraxSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_seraxTXPR == type)
|
||||
{
|
||||
poVal->m_oTxPr = new PPTX::Logic::TxBody;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_TxPr, this, poVal->m_oTxPr.GetPointer());
|
||||
res = ReadCT_TxPr(0, length, poVal->m_oTxPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_seraxCROSSAX == type)
|
||||
{
|
||||
@ -1819,7 +1820,7 @@ namespace BinXlsxRW
|
||||
if(c_oserct_chartlinesSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
@ -1850,12 +1851,12 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_titleSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_titleTXPR == type)
|
||||
{
|
||||
poVal->m_oTxPr = new PPTX::Logic::TxBody;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_TxPr, this, poVal->m_oTxPr.GetPointer());
|
||||
res = ReadCT_TxPr(0, length, poVal->m_oTxPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_titleEXTLST == type)
|
||||
{
|
||||
@ -1873,8 +1874,10 @@ namespace BinXlsxRW
|
||||
CT_Tx* poVal = static_cast<CT_Tx*>(poResult);
|
||||
if(c_oserct_txRICH == type)
|
||||
{
|
||||
BYTE typeRec1 = m_oBufferedStream.GetUChar();
|
||||
|
||||
poVal->m_oRich = new PPTX::Logic::TxBody;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_TxPr, this, poVal->m_oRich.GetPointer());
|
||||
poVal->m_oRich->fromPPTY(&m_oBufferedStream);
|
||||
|
||||
poVal->m_oRich->m_name = L"c:rich";
|
||||
}
|
||||
@ -2127,12 +2130,12 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_dateaxSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_dateaxTXPR == type)
|
||||
{
|
||||
poVal->m_oTxPr = new PPTX::Logic::TxBody;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_TxPr, this, poVal->m_oTxPr.GetPointer());
|
||||
res = ReadCT_TxPr(0, length, poVal->m_oTxPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_dateaxCROSSAX == type)
|
||||
{
|
||||
@ -2320,12 +2323,12 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_cataxSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_cataxTXPR == type)
|
||||
{
|
||||
poVal->m_oTxPr = new PPTX::Logic::TxBody;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_TxPr, this, poVal->m_oTxPr.GetPointer());
|
||||
res = ReadCT_TxPr(0, length, poVal->m_oTxPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_cataxCROSSAX == type)
|
||||
{
|
||||
@ -2410,12 +2413,12 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_dispunitslblSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_dispunitslblTXPR == type)
|
||||
{
|
||||
poVal->m_oTxPr = new PPTX::Logic::TxBody;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_TxPr, this, poVal->m_oTxPr.GetPointer());
|
||||
res = ReadCT_TxPr(0, length, poVal->m_oTxPr.GetPointer());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
@ -2556,12 +2559,12 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_valaxSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_valaxTXPR == type)
|
||||
{
|
||||
poVal->m_oTxPr = new PPTX::Logic::TxBody;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_TxPr, this, poVal->m_oTxPr.GetPointer());
|
||||
res = ReadCT_TxPr(0, length, poVal->m_oTxPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_valaxCROSSAX == type)
|
||||
{
|
||||
@ -2669,7 +2672,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_bubbleserSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_bubbleserINVERTIFNEGATIVE == type)
|
||||
{
|
||||
@ -2792,7 +2795,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_dptSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_dptPICTUREOPTIONS == type)
|
||||
{
|
||||
@ -2829,7 +2832,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_markerSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_markerEXTLST == type)
|
||||
{
|
||||
@ -3063,7 +3066,7 @@ namespace BinXlsxRW
|
||||
poVal->m_ItemsElementName0.push_back(eElemtype);
|
||||
|
||||
PPTX::Logic::SpPr * pNewElem = new PPTX::Logic::SpPr();
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, pNewElem);
|
||||
res = ReadCT_SpPr(0, length, pNewElem);
|
||||
poVal->m_Items.push_back(pNewElem);
|
||||
}
|
||||
else if(c_oserct_dlblsTXPR == type)
|
||||
@ -3202,7 +3205,7 @@ namespace BinXlsxRW
|
||||
poVal->m_ItemsElementName0.push_back(eElemtype);
|
||||
|
||||
PPTX::Logic::SpPr *pNewElem = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, pNewElem);
|
||||
res = ReadCT_SpPr(0, length, pNewElem);
|
||||
poVal->m_Items.push_back(pNewElem);
|
||||
}
|
||||
else if(c_oserct_dlblTX == type)
|
||||
@ -3221,7 +3224,7 @@ namespace BinXlsxRW
|
||||
poVal->m_ItemsElementName0.push_back(eElemtype);
|
||||
|
||||
PPTX::Logic::TxBody * pNewElem = new PPTX::Logic::TxBody();
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_TxPr, this, pNewElem);
|
||||
res = ReadCT_SpPr(0, length, pNewElem);
|
||||
poVal->m_Items.push_back(pNewElem);
|
||||
}
|
||||
else if(c_oserct_dlblEXTLST == type)
|
||||
@ -3262,7 +3265,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_trendlineSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_trendlineTRENDLINETYPE == type)
|
||||
{
|
||||
@ -3396,12 +3399,12 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_trendlinelblSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_trendlinelblTXPR == type)
|
||||
{
|
||||
poVal->m_oTxPr = new PPTX::Logic::TxBody;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_TxPr, this, poVal->m_oTxPr.GetPointer());
|
||||
res = ReadCT_TxPr(0, length, poVal->m_oTxPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_trendlinelblEXTLST == type)
|
||||
{
|
||||
@ -3462,7 +3465,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_errbarsSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_errbarsEXTLST == type)
|
||||
{
|
||||
@ -3866,7 +3869,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_surfaceserSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_surfaceserCAT == type)
|
||||
{
|
||||
@ -3903,7 +3906,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_bandfmtSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
@ -4104,7 +4107,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_pieserSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_pieserEXPLOSION == type)
|
||||
{
|
||||
@ -4283,7 +4286,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_barserSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_barserINVERTIFNEGATIVE == type)
|
||||
{
|
||||
@ -4613,7 +4616,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_scatterserSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_scatterserMARKER == type)
|
||||
{
|
||||
@ -4757,7 +4760,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_radarserSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_radarserMARKER == type)
|
||||
{
|
||||
@ -4933,7 +4936,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_lineserSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_lineserMARKER == type)
|
||||
{
|
||||
@ -5032,7 +5035,7 @@ namespace BinXlsxRW
|
||||
if(c_oserct_updownbarSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
@ -5264,7 +5267,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_areaserSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_areaserPICTUREOPTIONS == type)
|
||||
{
|
||||
@ -5567,7 +5570,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_plotareaSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_plotareaEXTLST == type)
|
||||
{
|
||||
@ -5606,7 +5609,7 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_surfaceSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_surfacePICTUREOPTIONS == type)
|
||||
{
|
||||
@ -5757,12 +5760,12 @@ namespace BinXlsxRW
|
||||
else if(c_oserct_pivotfmtSPPR == type)
|
||||
{
|
||||
poVal->m_oSpPr = new PPTX::Logic::SpPr;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_SpPr, this, poVal->m_oSpPr.GetPointer());
|
||||
ReadCT_SpPr(0, length, poVal->m_oSpPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_pivotfmtTXPR == type)
|
||||
{
|
||||
poVal->m_oTxPr = new PPTX::Logic::TxBody;
|
||||
res = Read1(length, &BinaryChartReader::ReadCT_TxPr, this, poVal->m_oTxPr.GetPointer());
|
||||
res = ReadCT_TxPr(0, length, poVal->m_oTxPr.GetPointer());
|
||||
}
|
||||
else if(c_oserct_pivotfmtMARKER == type)
|
||||
{
|
||||
@ -6048,12 +6051,7 @@ namespace BinXlsxRW
|
||||
}
|
||||
BinaryChartWriter::BinaryChartWriter(NSBinPptxRW::CBinaryFileWriter &oBufferedStream, NSBinPptxRW::CDrawingConverter* pOfficeDrawingConverter):m_oBcw(oBufferedStream),m_pOfficeDrawingConverter(pOfficeDrawingConverter)
|
||||
{}
|
||||
void BinaryChartWriter::GetRecordBinary(int nType, std::wstring& sXml, int nRecordType)
|
||||
{
|
||||
int nCurPos = m_oBcw.WriteItemStart(nType);
|
||||
HRESULT hRes = m_pOfficeDrawingConverter->GetRecordBinary(nRecordType, sXml);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
|
||||
void BinaryChartWriter::WriteCT_extLst(CT_extLst& oVal)
|
||||
{
|
||||
for(size_t i = 0, length = oVal.m_ext.size(); i < length; ++i)
|
||||
@ -6100,9 +6098,11 @@ namespace BinXlsxRW
|
||||
WriteCT_Style1(*oVal.m_style);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(NULL != oVal.m_clrMapOvr)
|
||||
if(oVal.m_oClrMapOvr.IsInit())
|
||||
{
|
||||
GetRecordBinary(c_oserct_chartspaceCLRMAPOVR, (*oVal.m_clrMapOvr), XMLWRITER_RECORD_TYPE_CLRMAPOVR);
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oserct_chartspaceCLRMAPOVR);
|
||||
m_oBcw.m_oStream.WriteRecord2(0, oVal.m_oClrMapOvr);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(NULL != oVal.m_pivotSource)
|
||||
{
|
||||
|
||||
@ -58,8 +58,6 @@ namespace BinXlsxRW {
|
||||
int ReadCT_ChartSpace (long length, CT_ChartSpace* poResult);
|
||||
int ReadCT_RelId (long length, CT_RelId* poResult);
|
||||
private:
|
||||
std::wstring* GetRecordXml (long length, int nRecordType);
|
||||
|
||||
int ReadCT_extLst (BYTE type, long length, void* poResult);
|
||||
int ReadCT_ChartSpace (BYTE type, long length, void* poResult);
|
||||
int ReadCT_Boolean (BYTE type, long length, void* poResult);
|
||||
@ -202,11 +200,12 @@ namespace BinXlsxRW {
|
||||
int ReadAlternateContentFallback(BYTE type, long length, void* poResult);
|
||||
int ReadCT_SpPr (BYTE type, long length, void* poResult);
|
||||
int ReadCT_TxPr (BYTE type, long length, void* poResult);
|
||||
int ReadCT_ClrMapOvr (BYTE type, long length, void* poResult);
|
||||
};
|
||||
class BinaryChartWriter
|
||||
{
|
||||
BinaryCommonWriter m_oBcw;
|
||||
NSBinPptxRW::CDrawingConverter* m_pOfficeDrawingConverter;
|
||||
BinaryCommonWriter m_oBcw;
|
||||
public:
|
||||
BinaryChartWriter (NSBinPptxRW::CBinaryFileWriter &oCBufferedStream, NSBinPptxRW::CDrawingConverter* pOfficeDrawingConverter);
|
||||
void WriteCT_extLst (CT_extLst& oVal);
|
||||
@ -355,8 +354,6 @@ namespace BinXlsxRW {
|
||||
void toBin(ItemsChoiceType6 eType, void* pVal);
|
||||
void toBin(ItemsChoiceType4 eType, void* pVal);
|
||||
void toBin(ItemsChoiceType3 eType, void* pVal);
|
||||
|
||||
void GetRecordBinary(int nType, std::wstring& sXml, int nRecordType);
|
||||
};
|
||||
}
|
||||
#endif // #ifndef CHART_FROM_TO_BINARY
|
||||
|
||||
Reference in New Issue
Block a user