Commit 897ad891 authored by konovalovsergey's avatar konovalovsergey Committed by Alexander Trofimov

grpFill open/save

parent e6ee6861
......@@ -66,6 +66,7 @@ namespace NSBinPptxRW
#define FILL_TYPE_SOLID 3
#define FILL_TYPE_GRAD 4
#define FILL_TYPE_PATT 5
#define FILL_TYPE_GRP 6
#define EFFECT_TYPE_NONE 0
#define EFFECT_TYPE_OUTERSHDW 1
......@@ -238,4 +239,4 @@ static CString SchemeClr_GetStringCode(const BYTE& val)
#define XMLWRITER_RECORD_TYPE_SPPR 0
#define XMLWRITER_RECORD_TYPE_CLRMAPOVR 1
#define XMLWRITER_RECORD_TYPE_TEXT_OUTLINE 2
#define XMLWRITER_RECORD_TYPE_TEXT_FILL 3
\ No newline at end of file
#define XMLWRITER_RECORD_TYPE_TEXT_FILL 3
......@@ -52,7 +52,51 @@ namespace PPTX
protected:
virtual void FillParentPointersForChilds(){};
};
class GrpFill : public WrapperWritingElement
{
public:
PPTX_LOGIC_BASE(GrpFill)
GrpFill& operator=(const GrpFill& oSrc)
{
parentFile = oSrc.parentFile;
parentElement = oSrc.parentElement;
m_namespace = oSrc.m_namespace;
return *this;
}
public:
virtual void fromXML(XmlUtils::CXmlNode& node)
{
m_namespace = XmlUtils::GetNamespace(node.GetName());
}
virtual CString toXML() const
{
if (_T("") == m_namespace)
return _T("<grpFill/>");
return _T("<") + m_namespace + _T(":grpFill/>");
}
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
{
if (XMLWRITER_DOC_TYPE_WORDART == pWriter->m_lDocType)
pWriter->WriteString(_T("<w14:grpFill/>"));
else
pWriter->WriteString(_T("<a:grpFill/>"));
}
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
{
pWriter->StartRecord(FILL_TYPE_GRP);
pWriter->EndRecord();
}
public:
CString m_namespace;
protected:
virtual void FillParentPointersForChilds(){};
};
} // namespace Logic
} // namespace PPTX
#endif // PPTX_LOGIC_NOFILL_INCLUDE_H_
\ No newline at end of file
#endif // PPTX_LOGIC_NOFILL_INCLUDE_H_
......@@ -48,6 +48,11 @@ namespace PPTX
m_type = pattFill;
Fill.reset(new Logic::PattFill(node));
}
else if(name == _T("grpFill"))
{
m_type = grpFill;
Fill.reset(new Logic::GrpFill(node));
}
else
{
m_type = notInit;
......@@ -98,7 +103,12 @@ namespace PPTX
Fill.reset(new Logic::PattFill(oNode));
return;
}
if (_T("grpFill") == strName)
{
m_type = grpFill;
Fill.reset(new Logic::GrpFill(oNode));
return;
}
}
}
......@@ -573,6 +583,12 @@ namespace PPTX
Fill = new PPTX::Logic::NoFill();
break;
}
case FILL_TYPE_GRP:
{
m_type = grpFill;
Fill = new PPTX::Logic::GrpFill();
break;
}
}
}
......@@ -628,7 +644,7 @@ namespace PPTX
smart_ptr<WrapperWritingElement> Fill;
enum Type {notInit, noFill, solidFill, gradFill, blipFill, pattFill, grpFill};
Type m_type;
//grpFill (Group Fill) §20.1.8.35
protected:
virtual void FillParentPointersForChilds()
{
......
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