/* * (c) Copyright Ascensio System SIA 2010-2023 * * This program is a free software product. You can redistribute it and/or * modify it under the terms of the GNU Affero General Public License (AGPL) * version 3 as published by the Free Software Foundation. In accordance with * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement * of any third-party rights. * * This program is distributed WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html * * You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish * street, Riga, Latvia, EU, LV-1050. * * The interactive user interfaces in modified source and object code versions * of the Program must display Appropriate Legal Notices, as required under * Section 5 of the GNU AGPL version 3. * * Pursuant to Section 7(b) of the License you must retain the original Product * logo when distributing the program. Pursuant to Section 7(e) we decline to * grant you any rights under trademark law for use of our trademarks. * * All the Product's GUI elements, including illustrations and icon sets, as * well as technical writing content are licensed under the terms of the * Creative Commons Attribution-ShareAlike 4.0 International. See the License * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ #pragma once #include "../../Base/Nullable.h" #include "../WritingElement.h" #include "../../PPTXFormat/Logic/GraphicFrame.h" namespace OOX { namespace Drawing { //----------------------------------------------------------------------- // EffectExtent 20.4.2.6 //----------------------------------------------------------------------- class CEffectExtent : public WritingElement { public: WritingElement_AdditionMethods(CEffectExtent) CEffectExtent(); virtual ~CEffectExtent(); virtual void fromXML(XmlUtils::CXmlNode& oNode); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); SimpleTypes::CCoordinate m_oB; SimpleTypes::CCoordinate m_oL; SimpleTypes::CCoordinate m_oR; SimpleTypes::CCoordinate m_oT; }; //-------------------------------------------------------------------------------- // CPosH 20.4.2.10 (Part 1) //-------------------------------------------------------------------------------- class CPosH : public WritingElement { public: WritingElement_AdditionMethods(CPosH) CPosH(); virtual ~CPosH(); virtual void fromXML(XmlUtils::CXmlNode& node); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); bool IsAlign() const; bool IsPosOffset() const; bool m_bAlign; // используем Align или (PosOffset или PctOffset) nullable m_oRelativeFrom; nullable m_oAlign; nullable m_oPosOffset; nullable m_oPctOffset; }; //-------------------------------------------------------------------------------- // CPosV 20.4.2.11 (Part 1) //-------------------------------------------------------------------------------- class CPosV : public WritingElement { public: WritingElement_AdditionMethods(CPosV) CPosV(); virtual ~CPosV(); virtual void fromXML(XmlUtils::CXmlNode& node); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); bool IsAlign() const; bool IsPosOffset() const; bool m_bAlign; // используем Align или PosOffset nullable m_oRelativeFrom; nullable m_oAlign; nullable m_oPosOffset; nullable m_oPctOffset; }; class CSizeRelH : public WritingElement { public: WritingElement_AdditionMethods(CSizeRelH) CSizeRelH(); virtual ~CSizeRelH(); virtual void fromXML(XmlUtils::CXmlNode& node); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: // Attributes nullable m_oRelativeFrom; // Childs nullable m_oPctWidth; }; class CSizeRelV : public WritingElement { public: WritingElement_AdditionMethods(CSizeRelV) CSizeRelV(); virtual ~CSizeRelV(); virtual void fromXML(XmlUtils::CXmlNode& node); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: // Attributes nullable m_oRelativeFrom; // Childs nullable m_oPctHeight; }; //-------------------------------------------------------------------------------- // CWrapNone 20.4.2.15 (Part 1) //-------------------------------------------------------------------------------- class CWrapNone : public WritingElement { public: WritingElement_AdditionMethods(CWrapNone) CWrapNone(); virtual ~CWrapNone(); public: virtual void fromXML(XmlUtils::CXmlNode& oNode); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; }; //-------------------------------------------------------------------------------- // CWrapSquare 20.4.2.17 (Part 1) //-------------------------------------------------------------------------------- class CWrapSquare : public WritingElement { public: WritingElement_AdditionMethods(CWrapSquare) CWrapSquare(); virtual ~CWrapSquare(); virtual void fromXML(XmlUtils::CXmlNode& node); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: nullable m_oDistB; nullable m_oDistL; nullable m_oDistR; nullable m_oDistT; nullable m_oWrapText; nullable m_oEffectExtent; }; //-------------------------------------------------------------------------------- // CWrapPath 20.4.2.16 (Part 1) //-------------------------------------------------------------------------------- class CWrapPath : public WritingElement { public: WritingElement_AdditionMethods(CWrapPath) CWrapPath(); virtual ~CWrapPath(); virtual void fromXML(XmlUtils::CXmlNode& node); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: nullable m_oEdited; nullable m_oStart; std::vector m_arrLineTo; }; //-------------------------------------------------------------------------------- // CWrapThrough 20.4.2.18 (Part 1) //-------------------------------------------------------------------------------- class CWrapThrough : public WritingElement { public: WritingElement_AdditionMethods(CWrapThrough) CWrapThrough(); virtual ~CWrapThrough(); virtual void fromXML(XmlUtils::CXmlNode& node); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: nullable m_oDistL; nullable m_oDistR; nullable m_oWrapText; nullable m_oWrapPolygon; }; //-------------------------------------------------------------------------------- // CWrapTight 20.4.2.19 (Part 1) //-------------------------------------------------------------------------------- class CWrapTight : public WritingElement { public: WritingElement_AdditionMethods(CWrapTight) CWrapTight(); virtual ~CWrapTight(); virtual void fromXML(XmlUtils::CXmlNode& node); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: nullable m_oDistL; nullable m_oDistR; nullable m_oWrapText; nullable m_oWrapPolygon; }; //-------------------------------------------------------------------------------- // CWrapTopBottom 20.4.2.20 (Part 1) //-------------------------------------------------------------------------------- class CWrapTopBottom : public WritingElement { public: WritingElement_AdditionMethods(CWrapTopBottom) CWrapTopBottom(); virtual ~CWrapTopBottom(); virtual void fromXML(XmlUtils::CXmlNode& node); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: nullable m_oDistB; nullable m_oDistT; nullable m_oEffectExtent; }; //-------------------------------------------------------------------------------- // CAnchor 20.4.2.3 (Part 1) //-------------------------------------------------------------------------------- enum EAnchorWrapType { anchorwrapUnknown = 0, anchorwrapNone = 1, anchorwrapSquare = 2, anchorwrapThrough = 3, anchorwrapTight = 4, anchorwrapTopAndBottom = 5 }; class CAnchor : public WritingElement { public: WritingElement_AdditionMethods(CAnchor) CAnchor(OOX::Document *pMain = NULL); virtual ~CAnchor(); virtual void fromXML(XmlUtils::CXmlNode& node); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); void ReadAttributes(XmlUtils::CXmlNode& oNode); public: nullable m_eWrapType; nullable m_oAllowOverlap; nullable m_oBehindDoc; nullable m_oDistB; nullable m_oDistL; nullable m_oDistR; nullable m_oDistT; nullable m_oHidden; nullable m_oLayoutInCell; nullable m_oLocked; nullable m_oRelativeHeight; nullable m_bSimplePos; nullable m_oDocPr; nullable m_oEffectExtent; nullable m_oExtent; nullable m_oPositionH; nullable m_oPositionV; nullable m_oSizeRelH; nullable m_oSizeRelV; nullable m_oSimplePos; nullable m_oWrapNone; nullable m_oWrapSquare; nullable m_oWrapThrough; nullable m_oWrapTight; nullable m_oWrapTopAndBottom; PPTX::Logic::GraphicFrame m_oGraphic; }; //-------------------------------------------------------------------------------- // CInline 20.4.2.8 (Part 1) //-------------------------------------------------------------------------------- class CInline : public WritingElement { public: WritingElement_AdditionMethods(CInline) CInline(OOX::Document *pMain = NULL); virtual ~CInline(); virtual void fromXML(XmlUtils::CXmlNode& node); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; private: void ReadAttributes(XmlUtils::CXmlNode& oNode); void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: // Attributes nullable m_oDistB; nullable m_oDistL; nullable m_oDistR; nullable m_oDistT; // Childs nullable m_oDocPr; nullable m_oEffectExtent; nullable m_oExtent; PPTX::Logic::GraphicFrame m_oGraphic; }; } // Drawing } // OOX namespace OOX { namespace Logic { //-------------------------------------------------------------------------------- // CDrawing 17.3.3.9 (Part 1) //-------------------------------------------------------------------------------- class CDrawing : public WritingElement { public: CDrawing(OOX::Document *pMain = NULL); CDrawing(XmlUtils::CXmlNode& oNode); CDrawing(XmlUtils::CXmlLiteReader& oReader); virtual ~CDrawing(); const CDrawing& operator =(const XmlUtils::CXmlNode& oNode); const CDrawing& operator =(const XmlUtils::CXmlLiteReader& oReader); virtual void fromXML(XmlUtils::CXmlNode& node); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; bool IsAnchor() const; bool IsInline() const; bool m_bAnchor; // используем Anchor или Inline // Childs nullable m_oAnchor; nullable m_oInline; }; } // namespace Logic } // namespace OOX