/* * (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" namespace SimpleTypes { class CDateTime; class CDecimalNumber; } namespace ComplexTypes { namespace Word { class CJc; class CInd; class CCnf; class COnOff2; class CFramePr; class CBorder; class String; class CSpacing; class CShading; class CTabStop; class CTrackChange; class CTextAlignment; class CDecimalNumber; class CTextDirection; class CTextboxTightWrap; } } namespace OOX { namespace Logic { class CRunProperty; class CSectionProperty; //-------------------------------------------------------------------------------- // NumPr 17.13.1.19 (Part 1) //-------------------------------------------------------------------------------- class CNumPr : public WritingElement { public: WritingElement_AdditionMethods(CNumPr) CNumPr(); virtual ~CNumPr(); public: virtual void fromXML(XmlUtils::CXmlNode& oNode); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; public: nullable m_oIlvl; nullable m_oIns; nullable m_oNumID; }; //-------------------------------------------------------------------------------- // PBdr 17.13.1.24 (Part 1) //-------------------------------------------------------------------------------- class CPBdr : public WritingElement { public: WritingElement_AdditionMethods(CPBdr) CPBdr(); virtual ~CPBdr(); virtual void fromXML(XmlUtils::CXmlNode& oNode); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; static const CPBdr Merge(const CPBdr& oPrev, const CPBdr& 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_oBar; nullable m_oBetween; nullable m_oBottom; nullable m_oLeft; nullable m_oRight; nullable m_oTop; }; //-------------------------------------------------------------------------------- // PPrChange 17.13.5.29 (Part 1) //-------------------------------------------------------------------------------- class CParagraphProperty; class CPPrChange : public WritingElement { public: CPPrChange(); CPPrChange(XmlUtils::CXmlNode& oNode); CPPrChange(XmlUtils::CXmlLiteReader& oReader); const CPPrChange& operator =(const XmlUtils::CXmlNode &oNode); const CPPrChange& operator =(const XmlUtils::CXmlLiteReader& oReader); virtual ~CPPrChange(); 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_pParPr; }; //-------------------------------------------------------------------------------- // Tabs 17.3.1.38 (Part 1) //-------------------------------------------------------------------------------- class CTabs : public WritingElement { public: WritingElement_AdditionMethods(CTabs) CTabs(OOX::Document *pMain = NULL); virtual ~CTabs(); CTabs(const CTabs& oSrc); const CTabs& operator =(const CTabs &oTabs); virtual void fromXML(XmlUtils::CXmlNode& oNode); virtual void fromXML(XmlUtils::CXmlLiteReader& oReader); virtual std::wstring toXML() const; virtual EElementType getType() const; std::vector m_arrTabs; }; //-------------------------------------------------------------------------------- // CParagraphProperty //-------------------------------------------------------------------------------- class CParagraphProperty : public WritingElement { public: CParagraphProperty(OOX::Document *pMain = NULL); CParagraphProperty(XmlUtils::CXmlNode& oNode); CParagraphProperty(XmlUtils::CXmlLiteReader& oReader); virtual ~CParagraphProperty(); bool IsNoEmpty(); void Clear(); const CParagraphProperty& operator =(const XmlUtils::CXmlNode &oNode); const CParagraphProperty& 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 CParagraphProperty Merge(const CParagraphProperty& oPrev, const CParagraphProperty& 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; } //-------------------------------------------------------------------------------------------------------- bool m_bPPrChange = false; nullable m_oAdjustRightInd; nullable m_oAutoSpaceDE; nullable m_oAutoSpaceDN; nullable m_oBidi; nullable m_oCnfStyle; nullable m_oContextualSpacing; nullable m_oDivID; nullable m_oFramePr; nullable m_oInd; nullable m_oJc; nullable m_oKeepLines; nullable m_oKeepNext; nullable m_oKinsoku; nullable m_oMirrorIndents; nullable m_oNumPr; nullable m_oOutlineLvl; nullable m_oOverflowPunct; nullable m_oPageBreakBefore; nullable m_oPBdr; nullable m_oPPrChange; nullable m_oPStyle; nullable m_oRPr; nullable m_oSectPr; nullable m_oShd; nullable m_oSnapToGrid; nullable m_oSpacing; nullable m_oSuppressAutoHyphens; nullable m_oSuppressLineNumbers; nullable m_oSuppressOverlap; nullable m_oTabs; nullable m_oTextAlignment; nullable m_oTextboxTightWrap; nullable m_oTextDirection; nullable m_oTopLinePunct; nullable m_oWidowControl; nullable m_oWordWrap; }; } // namespace Logic } // namespace OOX