/* * (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 "../WritingElement.h" #include "../../Common/ComplexTypes.h" namespace ComplexTypes { namespace Word { //-------------------------------------------------------------------------------- // JcTable 17.4.29 (Part 1) //-------------------------------------------------------------------------------- class CJcTable : public ComplexType { public: ComplexTypes_AdditionConstructors(CJcTable) CJcTable(); virtual ~CJcTable(); virtual void FromXML(XmlUtils::CXmlNode& oNode); virtual void FromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring ToString() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: nullable m_oVal; }; //-------------------------------------------------------------------------------- // TblLayoutType 17.4.54 (Part 1) //-------------------------------------------------------------------------------- class CTblLayoutType : public ComplexType { public: ComplexTypes_AdditionConstructors(CTblLayoutType) CTblLayoutType(); virtual ~CTblLayoutType(); virtual void FromXML(XmlUtils::CXmlNode& oNode); virtual void FromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring ToString() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: nullable m_oType; }; //-------------------------------------------------------------------------------- // TblLook 17.4.56 (Part 1) + 9.3.11 (Part 4) //-------------------------------------------------------------------------------- class CTblLook : public ComplexType { public: ComplexTypes_AdditionConstructors(CTblLook) CTblLook(); virtual ~CTblLook(); virtual void FromXML(XmlUtils::CXmlNode& oNode); virtual void FromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring ToString() const; const bool IsFirstRow() const; const bool IsLastRow() const; const bool IsFirstColumn() const; const bool IsLastColumn () const; const bool IsNoHBand () const; const bool IsNoVBand () const; const int GetValue() const; void SetValue(int nVal); private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: nullable m_oFirstColumn; nullable m_oFirstRow; nullable m_oLastColumn; nullable m_oLastRow; nullable m_oNoHBand; nullable m_oNoVBand; nullable m_oVal; }; //-------------------------------------------------------------------------------- // TblOverlap 17.4.56 (Part 1) //-------------------------------------------------------------------------------- class CTblOverlap : public ComplexType { public: ComplexTypes_AdditionConstructors(CTblOverlap) CTblOverlap(); virtual ~CTblOverlap(); virtual void FromXML(XmlUtils::CXmlNode& oNode); virtual void FromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring ToString() const; public: nullable m_oVal; }; //-------------------------------------------------------------------------------- // TblPPr 17.4.58 (Part 1) //-------------------------------------------------------------------------------- class CTblPPr : public ComplexType { public: ComplexTypes_AdditionConstructors(CTblPPr) CTblPPr(); virtual ~CTblPPr(); void PrepareAfterRead(); virtual void FromXML(XmlUtils::CXmlNode& oNode); virtual void FromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring ToString() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: nullable m_oBottomFromText; nullable m_oHorzAnchor; nullable m_oLeftFromText; nullable m_oRightFromText; nullable m_oTblpX; nullable m_oTblpXSpec; nullable m_oTblpY; nullable m_oTblpYSpec; nullable m_oTopFromText; nullable m_oVertAnchor; }; } // Word } // ComplexTypes namespace OOX { namespace Logic { //-------------------------------------------------------------------------------- // TblBorders 17.4.39 (Part 1) + 9.3.2 (Part 4) + 9.3.6 (Part 4) //-------------------------------------------------------------------------------- class CTblBorders : public WritingElement { public: WritingElement_AdditionMethods(CTblBorders) CTblBorders(); virtual ~CTblBorders(); virtual void fromXML(XmlUtils::CXmlNode& oNode); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; static const CTblBorders Merge(const CTblBorders& oPrev, const CTblBorders& oCurrent); template static nullable Merge(const nullable &oPrev, const nullable &oCurrent) { nullable oResult; if ( oCurrent.IsInit() ) oResult = oCurrent; else if ( oPrev.IsInit() ) oResult = oPrev; return oResult; } nullable m_oBottom; nullable m_oEnd; nullable m_oInsideH; nullable m_oInsideV; nullable m_oStart; nullable m_oTop; }; //-------------------------------------------------------------------------------- // TblCellMar 17.4.43 (Part 1) + 9.3.4 (Part 4) + 9.3.8 (Part 4) //-------------------------------------------------------------------------------- class CTblCellMar : public WritingElement { public: WritingElement_AdditionMethods(CTblCellMar) CTblCellMar(); virtual ~CTblCellMar(); virtual void fromXML(XmlUtils::CXmlNode& oNode); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; static const CTblCellMar Merge(const CTblCellMar& oPrev, const CTblCellMar& oCurrent); template static nullable Merge(const nullable &oPrev, const nullable &oCurrent) { nullable oResult; if ( oCurrent.IsInit() ) oResult = oCurrent; else if ( oPrev.IsInit() ) oResult = oPrev; return oResult; } public: nullable m_oBottom; nullable m_oEnd; nullable m_oStart; nullable m_oTop; }; //-------------------------------------------------------------------------------- // TblPrChange 17.13.5.34 (Part 1) //-------------------------------------------------------------------------------- class CTableProperty; class CTblPrChange : public WritingElement { public: CTblPrChange(OOX::Document *pMain = NULL); virtual ~CTblPrChange(); const CTblPrChange& operator = (const XmlUtils::CXmlNode &oNode); const CTblPrChange& operator = (const XmlUtils::CXmlLiteReader& oReader); virtual void fromXML(XmlUtils::CXmlNode& oNode); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: nullable m_sAuthor; nullable m_oDate; nullable m_oId; nullable m_sUserId; nullable m_pTblPr; }; //-------------------------------------------------------------------------------- // TableProperty //-------------------------------------------------------------------------------- class CTableProperty : public WritingElement { public: CTableProperty(OOX::Document *pMain = NULL); virtual ~CTableProperty(); const CTableProperty& operator=(const XmlUtils::CXmlNode &oNode); const CTableProperty& operator=(const XmlUtils::CXmlLiteReader& oReader); virtual void fromXML(XmlUtils::CXmlNode& oNode); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; static const CTableProperty Merge(const CTableProperty& oPrev, const CTableProperty& oCurrent); template static nullable Merge(const nullable &oPrev, const nullable &oCurrent) { nullable oResult; if ( oCurrent.IsInit() ) oResult = oCurrent; else if ( oPrev.IsInit() ) oResult = oPrev; return oResult; } public: bool m_bTblPrChange = false; nullable m_oBidiVisual; nullable m_oJc; nullable m_oShade; nullable m_oTblBorders; nullable m_oTblCaption; nullable m_oTblCellMar; nullable m_oTblCellSpacing; nullable m_oTblDescription; nullable m_oTblInd; nullable m_oTblLayout; nullable m_oTblLook; nullable m_oTblOverlap; nullable m_oTblpPr; nullable m_oTblPrChange; nullable m_oTblStyle; nullable m_oTblStyleColBandSize; nullable m_oTblStyleRowBandSize; nullable m_oTblW; }; } // namespace Logic } // namespace OOX namespace ComplexTypes { namespace Word { //-------------------------------------------------------------------------------- // Height 17.4.81 (Part 1) //-------------------------------------------------------------------------------- class CHeight : public ComplexType { public: ComplexTypes_AdditionConstructors(CHeight) CHeight(); virtual ~CHeight(); virtual void FromXML(XmlUtils::CXmlNode& oNode); virtual void FromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring ToString() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: nullable m_oHRule; nullable m_oVal; }; } // Word } // ComplexTypes namespace OOX { namespace Logic { //-------------------------------------------------------------------------------- // TrPrChange 17.13.5.37 (Part 1) //-------------------------------------------------------------------------------- class CTableRowProperties; class CTrPrChange : public WritingElement { public: CTrPrChange(OOX::Document *pMain = NULL); virtual ~CTrPrChange(); const CTrPrChange& operator = (const XmlUtils::CXmlNode &oNode); const CTrPrChange& operator = (const XmlUtils::CXmlLiteReader& oReader); public: virtual void fromXML(XmlUtils::CXmlNode& oNode); 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_sAuthor; nullable m_oDate; nullable m_oId; nullable m_sUserId; // Childs nullable m_pTrPr; }; //-------------------------------------------------------------------------------- // TableRowProperties //-------------------------------------------------------------------------------- class CTableRowProperties : public WritingElement { public: CTableRowProperties(OOX::Document *pMain = NULL); virtual ~CTableRowProperties(); const CTableRowProperties& operator =(const XmlUtils::CXmlNode &oNode); const CTableRowProperties& operator =(const XmlUtils::CXmlLiteReader& oReader); public: virtual void fromXML(XmlUtils::CXmlNode& oNode); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; static const CTableRowProperties Merge(const CTableRowProperties& oPrev, const CTableRowProperties& oCurrent); template static nullable Merge(const nullable &oPrev, const nullable &oCurrent) { nullable oResult; if ( oCurrent.IsInit() ) oResult = oCurrent; else if ( oPrev.IsInit() ) oResult = oPrev; return oResult; } public: bool m_bTrPrChange; nullable m_oCantSplit; nullable m_oCnfStyle; nullable m_oDel; nullable m_oDivId; nullable m_oGridAfter; nullable m_oGridBefore; nullable m_oHidden; nullable m_oIns; nullable m_oJc; nullable m_oTblCellSpacing; nullable m_oTblHeader; nullable m_oTblHeight; nullable m_oTrPrChange; nullable m_oWAfter; nullable m_oWBefore; }; } // namespace Logic } // namespace OOX namespace ComplexTypes { namespace Word { //-------------------------------------------------------------------------------- // CellMergeTrackChange 17.13.5.3 (Part 1) //-------------------------------------------------------------------------------- class CCellMergeTrackChange : public ComplexType { public: ComplexTypes_AdditionConstructors(CCellMergeTrackChange) CCellMergeTrackChange(); virtual ~CCellMergeTrackChange(); virtual void FromXML(XmlUtils::CXmlNode& oNode); virtual void FromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring ToString() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: nullable m_sAuthor; nullable m_oDate; nullable m_oId; nullable m_oVMerge; nullable m_oVMergeOrig; nullable m_sUserId; }; //-------------------------------------------------------------------------------- // HMerge 17.4.22 (Part 1) //-------------------------------------------------------------------------------- class CHMerge : public ComplexType { public: ComplexTypes_AdditionConstructors(CHMerge) CHMerge(); virtual ~CHMerge(); virtual void FromXML(XmlUtils::CXmlNode& oNode); virtual void FromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring ToString() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: nullable m_oVal; }; //-------------------------------------------------------------------------------- // VMerge 17.4.85 (Part 1) //-------------------------------------------------------------------------------- class CVMerge : public ComplexType { public: ComplexTypes_AdditionConstructors(CVMerge) CVMerge(); virtual ~CVMerge(); virtual void FromXML(XmlUtils::CXmlNode& oNode); virtual void FromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring ToString() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: nullable m_oVal; }; } // Word } // ComplexTypes namespace OOX { namespace Logic { //-------------------------------------------------------------------------------- // Headers 17.13.1.19 (Part 1) //-------------------------------------------------------------------------------- class CHeaders : public WritingElement { public: WritingElement_AdditionMethods(CHeaders) CHeaders(OOX::Document *pMain = NULL); virtual ~CHeaders(); virtual void fromXML(XmlUtils::CXmlNode& oNode); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; std::vector m_arrHeaders; }; //-------------------------------------------------------------------------------- // TcBorders 17.4.67 (Part 1) + 9.3.1 (Part 4) + 9.3.5 (Part 4) //-------------------------------------------------------------------------------- class CTcBorders : public WritingElement { public: WritingElement_AdditionMethods(CTcBorders) CTcBorders(); virtual ~CTcBorders(); public: virtual void fromXML(XmlUtils::CXmlNode& oNode); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; static const CTcBorders Merge(const CTcBorders& oPrev, const CTcBorders& oCurrent); template static nullable Merge(const nullable &oPrev, const nullable &oCurrent) { nullable oResult; if ( oCurrent.IsInit() ) oResult = oCurrent; else if ( oPrev.IsInit() ) oResult = oPrev; return oResult; } public: nullable m_oBottom; nullable m_oEnd; nullable m_oInsideH; nullable m_oInsideV; nullable m_oStart; nullable m_oTL2BR; nullable m_oTop; nullable m_oTR2BL; }; //-------------------------------------------------------------------------------- // TcMar 17.4.69 (Part 1) + 9.3.3 (Part 4) + 9.3.7 (Part 4) //-------------------------------------------------------------------------------- class CTcMar : public WritingElement { public: WritingElement_AdditionMethods(CTcMar) CTcMar(); virtual ~CTcMar(); virtual void fromXML(XmlUtils::CXmlNode& oNode); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; static const CTcMar Merge(const CTcMar& oPrev, const CTcMar& oCurrent); template static nullable Merge(const nullable &oPrev, const nullable &oCurrent) { nullable oResult; if ( oCurrent.IsInit() ) oResult = oCurrent; else if ( oPrev.IsInit() ) oResult = oPrev; return oResult; } nullable m_oBottom; nullable m_oEnd; nullable m_oStart; nullable m_oTop; }; //-------------------------------------------------------------------------------- // TblPrChange 17.13.5.34 (Part 1) //-------------------------------------------------------------------------------- class CTableCellProperties; class CTcPrChange : public WritingElement { public: CTcPrChange(OOX::Document *pMain = NULL); virtual ~CTcPrChange(); const CTcPrChange& operator = (const XmlUtils::CXmlNode &oNode); const CTcPrChange& operator = (const XmlUtils::CXmlLiteReader& oReader); virtual void fromXML(XmlUtils::CXmlNode& oNode); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; private: void ReadAttributes(XmlUtils::CXmlLiteReader& oReader); public: nullable m_sAuthor; nullable m_oDate; nullable m_oId; nullable m_sUserId; nullable m_pTcPr; }; //-------------------------------------------------------------------------------- // TableCellProperties //-------------------------------------------------------------------------------- class CTableCellProperties : public WritingElement { public: CTableCellProperties(OOX::Document *pMain = NULL); virtual ~CTableCellProperties(); const CTableCellProperties& operator =(const XmlUtils::CXmlNode &oNode); const CTableCellProperties& operator =(const XmlUtils::CXmlLiteReader& oReader); virtual void fromXML(XmlUtils::CXmlNode& oNode); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; static const CTableCellProperties Merge(const CTableCellProperties& oPrev, const CTableCellProperties& oCurrent); template static nullable Merge(const nullable &oPrev, const nullable &oCurrent) { nullable oResult; if ( oCurrent.IsInit() ) oResult = oCurrent; else if ( oPrev.IsInit() ) oResult = oPrev; return oResult; } public: bool m_bTcPrChange; nullable m_oCellDel; nullable m_oCellIns; nullable m_oCellMerge; nullable m_oCnfStyle; nullable m_oGridSpan; nullable m_oHeaders; nullable m_oHideMark; nullable m_oHMerge; nullable m_oNoWrap; nullable m_oShd; nullable m_oTcBorders; nullable m_oTcFitText; nullable m_oTcMar; nullable m_oTcPrChange; nullable m_oTcW; nullable m_oTextDirection; nullable m_oVAlign; nullable m_oVMerge; }; } // namespace Logic } // namespace OOX