init repo
This commit is contained in:
150
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/CSldViewPr.h
Normal file
150
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/CSldViewPr.h
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* 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
|
||||
#ifndef PPTX_VIEWPROPS_COMMON_SLIDE_VIEW_PROPERTIES_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_COMMON_SLIDE_VIEW_PROPERTIES_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "CViewPr.h"
|
||||
#include "Guide.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace nsViewProps
|
||||
{
|
||||
class CSldViewPr : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(CSldViewPr)
|
||||
|
||||
CSldViewPr& operator=(const CSldViewPr& oSrc)
|
||||
{
|
||||
parentFile = oSrc.parentFile;
|
||||
parentElement = oSrc.parentElement;
|
||||
|
||||
CViewPr = oSrc.CViewPr;
|
||||
attrShowGuides = oSrc.attrShowGuides;
|
||||
attrSnapToGrid = oSrc.attrSnapToGrid;
|
||||
attrSnapToObjects = oSrc.attrSnapToObjects;
|
||||
|
||||
GuideLst.Copy(oSrc.GuideLst);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
GuideLst.RemoveAll();
|
||||
|
||||
CViewPr = node.ReadNode(_T("p:cViewPr"));
|
||||
|
||||
node.ReadNode(_T("p:guideLst")).LoadArray(_T("p:guide"), GuideLst);
|
||||
|
||||
node.ReadAttributeBase(L"showGuides", attrShowGuides);
|
||||
node.ReadAttributeBase(L"snapToGrid", attrSnapToGrid);
|
||||
node.ReadAttributeBase(L"snapToObjects", attrSnapToObjects);
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("showGuides"), attrShowGuides);
|
||||
oAttr.Write(_T("snapToGrid"), attrSnapToGrid);
|
||||
oAttr.Write(_T("snapToObjects"), attrSnapToObjects);
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(CViewPr);
|
||||
oValue.WriteArray(_T("p:guideLst"), GuideLst);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:cSldViewPr"), oAttr, oValue);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteBool2(0, attrShowGuides);
|
||||
pWriter->WriteBool2(1, attrSnapToGrid);
|
||||
pWriter->WriteBool2(2, attrSnapToObjects);
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
|
||||
pWriter->WriteRecord1(0, CViewPr);
|
||||
|
||||
pWriter->StartRecord(1);
|
||||
ULONG len = (ULONG)GuideLst.GetCount();
|
||||
pWriter->WriteULONG(len);
|
||||
for (ULONG i = 0; i < len; i++)
|
||||
{
|
||||
pWriter->WriteRecord1(2, GuideLst[i]);
|
||||
}
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:cSldViewPr"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
|
||||
pWriter->WriteAttribute(_T("showGuides"), attrShowGuides);
|
||||
pWriter->WriteAttribute(_T("snapToGrid"), attrSnapToGrid);
|
||||
pWriter->WriteAttribute(_T("snapToObjects"), attrSnapToObjects);
|
||||
|
||||
pWriter->EndAttributes();
|
||||
|
||||
CViewPr.toXmlWriter(pWriter);
|
||||
pWriter->WriteArray(_T("p:guideLst"), GuideLst);
|
||||
|
||||
pWriter->EndNode(_T("p:cSldViewPr"));
|
||||
}
|
||||
|
||||
public:
|
||||
nsViewProps::CViewPr CViewPr;
|
||||
CAtlArray<Guide> GuideLst;
|
||||
|
||||
nullable_bool attrShowGuides;
|
||||
nullable_bool attrSnapToGrid;
|
||||
nullable_bool attrSnapToObjects;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds()
|
||||
{
|
||||
CViewPr.SetParentPointer(this);
|
||||
|
||||
size_t count = GuideLst.GetCount();
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
GuideLst[i].SetParentPointer(this);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_VIEWPROPS_COMMON_SLIDE_VIEW_PROPERTIES_INCLUDE_H_
|
||||
108
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/CViewPr.h
Normal file
108
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/CViewPr.h
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* 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
|
||||
#ifndef PPTX_VIEWPROPS_COMMON_VIEW_PROPERTIES_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_COMMON_VIEW_PROPERTIES_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "Origin.h"
|
||||
#include "Scale.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace nsViewProps
|
||||
{
|
||||
class CViewPr : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(CViewPr)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
node.ReadAttributeBase(L"varScale", attrVarScale);
|
||||
|
||||
Scale = node.ReadNode(_T("p:scale"));
|
||||
Origin = node.ReadNode(_T("p:origin"));
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("varScale"), attrVarScale);
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(Scale);
|
||||
oValue.Write(Origin);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:cViewPr"), oAttr, oValue);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteBool2(0, attrVarScale);
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
|
||||
pWriter->WriteRecord1(0, Origin);
|
||||
pWriter->WriteRecord1(1, Scale);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:cViewPr"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("varScale"), attrVarScale);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
Scale.toXmlWriter(pWriter);
|
||||
Origin.toXmlWriter(pWriter);
|
||||
|
||||
pWriter->EndNode(_T("p:cViewPr"));
|
||||
}
|
||||
|
||||
public:
|
||||
nullable_bool attrVarScale;
|
||||
nsViewProps::Origin Origin;
|
||||
nsViewProps::Scale Scale;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds()
|
||||
{
|
||||
Scale.SetParentPointer(this);
|
||||
Origin.SetParentPointer(this);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_VIEWPROPS_COMMON_VIEW_PROPERTIES_INCLUDE_H_
|
||||
102
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/GridSpacing.h
Normal file
102
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/GridSpacing.h
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* 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
|
||||
#ifndef PPTX_VIEWPROPS_GRIDSPACING_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_GRIDSPACING_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace nsViewProps
|
||||
{
|
||||
class GridSpacing : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(GridSpacing)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
cx = node.ReadAttributeInt(L"cx");
|
||||
cy = node.ReadAttributeInt(L"cy");
|
||||
|
||||
Normalize();
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("cx"), cx);
|
||||
oAttr.Write(_T("cy"), cy);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:gridSpacing"), oAttr);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteINT(cx);
|
||||
pWriter->WriteINT(cy);
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:gridSpacing"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
|
||||
pWriter->WriteAttribute(_T("cx"), cx);
|
||||
pWriter->WriteAttribute(_T("cy"), cy);
|
||||
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->EndNode(_T("p:gridSpacing"));
|
||||
}
|
||||
|
||||
public:
|
||||
int cx;
|
||||
int cy;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds(){};
|
||||
|
||||
AVSINLINE void Normalize()
|
||||
{
|
||||
if (cx < 0)
|
||||
cx = 0;
|
||||
if (cy < 0)
|
||||
cy = 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_VIEWPROPS_GRIDSPACING_INCLUDE_H_
|
||||
101
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/Guide.h
Normal file
101
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/Guide.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* 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
|
||||
#ifndef PPTX_VIEWPROPS_GUIDE_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_GUIDE_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "./../Limit/Orient.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace nsViewProps
|
||||
{
|
||||
class Guide : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(Guide)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
node.ReadAttributeBase(L"orient", orient);
|
||||
node.ReadAttributeBase(L"pos", pos);
|
||||
|
||||
Normalize();
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("pos"), pos);
|
||||
oAttr.WriteLimitNullable(_T("orient"), orient);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:guide"), oAttr);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(g_nodeAttributeStart);
|
||||
|
||||
pWriter->WriteInt2(0, pos);
|
||||
pWriter->WriteLimit2(1, orient);
|
||||
|
||||
pWriter->WriteBYTE(g_nodeAttributeEnd);
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:guide"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("pos"), pos);
|
||||
pWriter->WriteAttribute(_T("orient"), orient);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->EndNode(_T("p:guide"));
|
||||
}
|
||||
|
||||
public:
|
||||
nullable_int pos;
|
||||
nullable_limit<Limit::Orient> orient;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds(){};
|
||||
|
||||
AVSINLINE void Normalize()
|
||||
{
|
||||
pos.normalize_positive();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_VIEWPROPS_GUIDE_INCLUDE_H_
|
||||
144
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/NormalViewPr.h
Normal file
144
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/NormalViewPr.h
Normal file
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* 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
|
||||
#ifndef PPTX_VIEWPROPS_NORMAL_VIEW_PROPERTIES_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_NORMAL_VIEW_PROPERTIES_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "Restored.h"
|
||||
#include "./../Limit/SplitterBarState.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace nsViewProps
|
||||
{
|
||||
class NormalViewPr : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(NormalViewPr)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
node.ReadAttributeBase(L"horzBarState", attrHorzBarState);
|
||||
node.ReadAttributeBase(L"vertBarState", attrVertBarState);
|
||||
|
||||
node.ReadAttributeBase(L"preferSingleView", attrPreferSingleView);
|
||||
node.ReadAttributeBase(L"showOutlineIcons", attrShowOutlineIcons);
|
||||
node.ReadAttributeBase(L"snapVertSplitter", attrSnapVertSplitter);
|
||||
|
||||
restoredLeft = node.ReadNodeNoNS(_T("restoredLeft"));
|
||||
restoredTop = node.ReadNodeNoNS(_T("restoredTop"));
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("horzBarState"), attrHorzBarState->get());
|
||||
oAttr.Write(_T("vertBarState"), attrVertBarState->get());
|
||||
|
||||
oAttr.Write(_T("preferSingleView"), attrPreferSingleView);
|
||||
oAttr.Write(_T("showOutlineIcons"), attrShowOutlineIcons);
|
||||
oAttr.Write(_T("snapVertSplitter"), attrSnapVertSplitter);
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(restoredTop);
|
||||
oValue.Write(restoredLeft);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:normalViewPr"), oAttr, oValue);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:normalViewPr"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
|
||||
pWriter->WriteAttribute(_T("horzBarState"), attrHorzBarState);
|
||||
pWriter->WriteAttribute(_T("vertBarState"), attrVertBarState);
|
||||
pWriter->WriteAttribute(_T("preferSingleView"), attrPreferSingleView);
|
||||
pWriter->WriteAttribute(_T("showOutlineIcons"), attrShowOutlineIcons);
|
||||
pWriter->WriteAttribute(_T("snapVertSplitter"), attrSnapVertSplitter);
|
||||
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->StartNode(_T("p:restoredLeft"));
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("sz"), restoredLeft.sz);
|
||||
pWriter->WriteAttribute(_T("autoAdjust"), restoredLeft.autoAdjust);
|
||||
pWriter->EndAttributes();
|
||||
pWriter->EndNode(_T("p:restoredLeft"));
|
||||
|
||||
pWriter->StartNode(_T("p:restoredTop"));
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("sz"), restoredTop.sz);
|
||||
pWriter->WriteAttribute(_T("autoAdjust"), restoredTop.autoAdjust);
|
||||
pWriter->EndAttributes();
|
||||
pWriter->EndNode(_T("p:restoredTop"));
|
||||
|
||||
pWriter->EndNode(_T("p:normalViewPr"));
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteBool2(0, attrPreferSingleView);
|
||||
pWriter->WriteBool2(1, attrShowOutlineIcons);
|
||||
pWriter->WriteBool2(2, attrSnapVertSplitter);
|
||||
pWriter->WriteLimit2(3, attrHorzBarState);
|
||||
pWriter->WriteLimit2(4, attrVertBarState);
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
|
||||
pWriter->WriteRecord1(0, restoredLeft);
|
||||
pWriter->WriteRecord1(1, restoredTop);
|
||||
}
|
||||
|
||||
public:
|
||||
nsViewProps::Restored restoredLeft;
|
||||
nsViewProps::Restored restoredTop;
|
||||
|
||||
nullable_limit<Limit::SplitterBarState> attrHorzBarState;
|
||||
nullable_limit<Limit::SplitterBarState> attrVertBarState;
|
||||
nullable_bool attrPreferSingleView;
|
||||
nullable_bool attrShowOutlineIcons;
|
||||
nullable_bool attrSnapVertSplitter;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds()
|
||||
{
|
||||
restoredLeft.SetParentPointer(this);
|
||||
restoredTop.SetParentPointer(this);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_VIEWPROPS_NORMAL_VIEW_PROPERTIES_INCLUDE_H_
|
||||
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* 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
|
||||
#ifndef PPTX_VIEWPROPS_NOTES_TEXT_VIEW_PROPERTIES_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_NOTES_TEXT_VIEW_PROPERTIES_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "CViewPr.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace nsViewProps
|
||||
{
|
||||
class NotesTextViewPr : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(NotesTextViewPr)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
CViewPr = node.ReadNode(_T("p:cViewPr"));
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(CViewPr);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:notesTextViewPr"), oValue);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteRecord1(0, CViewPr);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:notesTextViewPr"));
|
||||
pWriter->EndAttributes();
|
||||
|
||||
CViewPr.toXmlWriter(pWriter);
|
||||
|
||||
pWriter->EndNode(_T("p:notesTextViewPr"));
|
||||
}
|
||||
|
||||
public:
|
||||
nsViewProps::CViewPr CViewPr;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds()
|
||||
{
|
||||
CViewPr.SetParentPointer(this);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_VIEWPROPS_NOTES_TEXT_VIEW_PROPERTIES_INCLUDE_H_
|
||||
88
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/NotesViewPr.h
Normal file
88
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/NotesViewPr.h
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* 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
|
||||
#ifndef PPTX_VIEWPROPS_NOTES_VIEW_PROPERTIES_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_NOTES_VIEW_PROPERTIES_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "CSldViewPr.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace nsViewProps
|
||||
{
|
||||
class NotesViewPr : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(NotesViewPr)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
CSldViewPr = node.ReadNode(_T("p:cSldViewPr"));
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(CSldViewPr);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:notesViewPr"), oValue);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteRecord1(0, CSldViewPr);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:notesViewPr"));
|
||||
pWriter->EndAttributes();
|
||||
|
||||
CSldViewPr.toXmlWriter(pWriter);
|
||||
|
||||
pWriter->EndNode(_T("p:notesViewPr"));
|
||||
}
|
||||
|
||||
public:
|
||||
nsViewProps::CSldViewPr CSldViewPr;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds()
|
||||
{
|
||||
CSldViewPr.SetParentPointer(this);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_VIEWPROPS_NOTES_VIEW_PROPERTIES_INCLUDE_H_
|
||||
90
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/Origin.h
Normal file
90
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/Origin.h
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* 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
|
||||
#ifndef PPTX_VIEWPROPS_ORIGIN_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_ORIGIN_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace nsViewProps
|
||||
{
|
||||
class Origin : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(Origin)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
x = node.ReadAttributeInt(L"x");
|
||||
y = node.ReadAttributeInt(L"y");
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("x"), x);
|
||||
oAttr.Write(_T("y"), y);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:origin"), oAttr);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteINT(x);
|
||||
pWriter->WriteINT(y);
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:origin"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("x"), x);
|
||||
pWriter->WriteAttribute(_T("y"), y);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->EndNode(_T("p:origin"));
|
||||
}
|
||||
|
||||
public:
|
||||
int x;
|
||||
int y;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds(){};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_VIEWPROPS_ORIGIN_INCLUDE_H_
|
||||
120
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/OutlineViewPr.h
Normal file
120
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/OutlineViewPr.h
Normal file
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* 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
|
||||
#ifndef PPTX_VIEWPROPS_OUTLINE_VIEW_PROPERTIES_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_OUTLINE_VIEW_PROPERTIES_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "CViewPr.h"
|
||||
#include "Sld.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace nsViewProps
|
||||
{
|
||||
class OutlineViewPr : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(OutlineViewPr)
|
||||
|
||||
OutlineViewPr& operator=(const OutlineViewPr& oSrc)
|
||||
{
|
||||
parentFile = oSrc.parentFile;
|
||||
parentElement = oSrc.parentElement;
|
||||
|
||||
CViewPr = oSrc.CViewPr;
|
||||
SldLst.Copy(oSrc.SldLst);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
CViewPr = node.ReadNode(_T("p:cViewPr"));
|
||||
SldLst.RemoveAll();
|
||||
|
||||
node.ReadNode(_T("p:sldLst")).LoadArray(_T("p:sld"), SldLst);
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(CViewPr);
|
||||
|
||||
if (0 < SldLst.GetCount())
|
||||
oValue.WriteArray(_T("p:sldLst"), SldLst);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:outlineViewPr"), oValue);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteRecord1(0, CViewPr);
|
||||
|
||||
pWriter->StartRecord(1);
|
||||
ULONG len = (ULONG)SldLst.GetCount();
|
||||
pWriter->WriteULONG(len);
|
||||
for (ULONG i = 0; i < len; i++)
|
||||
{
|
||||
pWriter->WriteRecord1(2, SldLst[i]);
|
||||
}
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:outlineViewPr"));
|
||||
pWriter->EndAttributes();
|
||||
|
||||
CViewPr.toXmlWriter(pWriter);
|
||||
pWriter->WriteArray(_T("p:sldLst"), SldLst);
|
||||
|
||||
pWriter->EndNode(_T("p:outlineViewPr"));
|
||||
}
|
||||
|
||||
public:
|
||||
nsViewProps::CViewPr CViewPr;
|
||||
CAtlArray<nsViewProps::Sld> SldLst;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds()
|
||||
{
|
||||
CViewPr.SetParentPointer(this);
|
||||
|
||||
size_t count = SldLst.GetCount();
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
SldLst[i].SetParentPointer(this);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_VIEWPROPS_OUTLINE_VIEW_PROPERTIES_INCLUDE_H_
|
||||
93
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/Ratio.h
Normal file
93
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/Ratio.h
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* 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
|
||||
#ifndef PPTX_VIEWPROPS_RATIO_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_RATIO_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace nsViewProps
|
||||
{
|
||||
class Ratio : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(Ratio)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
name = XmlUtils::GetNameNoNS(node.GetName());
|
||||
|
||||
n = node.ReadAttributeInt(L"n");
|
||||
d = node.ReadAttributeInt(L"d");
|
||||
|
||||
Normalize();
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("n"), n);
|
||||
oAttr.Write(_T("d"), d);
|
||||
|
||||
return XmlUtils::CreateNode(_T("a:") + name, oAttr);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteINT(d);
|
||||
pWriter->WriteINT(n);
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
}
|
||||
|
||||
public:
|
||||
int d;
|
||||
int n;
|
||||
public:
|
||||
CString name;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds(){};
|
||||
|
||||
AVSINLINE void Normalize()
|
||||
{
|
||||
if (d < 0)
|
||||
d = 0;
|
||||
if (n < 0)
|
||||
n = 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_VIEWPROPS_RATIO_INCLUDE_H_
|
||||
92
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/Restored.h
Normal file
92
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/Restored.h
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* 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
|
||||
#ifndef PPTX_VIEWPROPS_RESTORED_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_RESTORED_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace nsViewProps
|
||||
{
|
||||
class Restored : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(Restored)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
name = XmlUtils::GetNameNoNS(node.GetName());
|
||||
|
||||
sz = node.ReadAttributeInt(L"sz");
|
||||
node.ReadAttributeBase(L"autoAdjust", autoAdjust);
|
||||
|
||||
Normalize();
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("sz"), sz);
|
||||
oAttr.Write(_T("autoAdjust"), autoAdjust);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:") + name, oAttr);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteINT(sz);
|
||||
pWriter->WriteBool2(0, autoAdjust);
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
}
|
||||
|
||||
public:
|
||||
int sz;
|
||||
nullable_bool autoAdjust;
|
||||
|
||||
public:
|
||||
CString name;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds(){};
|
||||
|
||||
AVSINLINE void Normalize()
|
||||
{
|
||||
if (sz < 0)
|
||||
sz = 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_VIEWPROPS_RESTORED_INCLUDE_H_
|
||||
106
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/Scale.h
Normal file
106
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/Scale.h
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* 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
|
||||
#ifndef PPTX_VIEWPROPS_SCALE_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_SCALE_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "Ratio.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace nsViewProps
|
||||
{
|
||||
class Scale : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(Scale)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
sx = node.ReadNodeNoNS(_T("sx"));
|
||||
sy = node.ReadNodeNoNS(_T("sy"));
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(sx);
|
||||
oValue.Write(sy);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:scale"), oValue);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteRecord1(0, sx);
|
||||
pWriter->WriteRecord1(1, sy);
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:scale"));
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->StartNode(_T("a:sx"));
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("n"), sx.n);
|
||||
pWriter->WriteAttribute(_T("d"), sx.d);
|
||||
pWriter->EndAttributes();
|
||||
pWriter->EndNode(_T("a:sx"));
|
||||
|
||||
pWriter->StartNode(_T("a:sy"));
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("n"), sy.n);
|
||||
pWriter->WriteAttribute(_T("d"), sy.d);
|
||||
pWriter->EndAttributes();
|
||||
pWriter->EndNode(_T("a:sy"));
|
||||
|
||||
pWriter->EndNode(_T("p:scale"));
|
||||
}
|
||||
|
||||
public:
|
||||
nsViewProps::Ratio sx;
|
||||
nsViewProps::Ratio sy;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds()
|
||||
{
|
||||
sx.SetParentPointer(this);
|
||||
sy.SetParentPointer(this);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_VIEWPROPS_SCALE_INCLUDE_H_
|
||||
94
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/Sld.h
Normal file
94
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/Sld.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* 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
|
||||
#ifndef PPTX_VIEWPROPS_SLD_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_SLD_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "./../Limit/Orient.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace nsViewProps
|
||||
{
|
||||
class Sld : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(Sld)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
node.ReadAttributeBase(L"id", id);
|
||||
node.ReadAttributeBase(L"collapse", collapse);
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("id"), id);
|
||||
oAttr.Write(_T("collapse"), collapse);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:sld"), oAttr);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(g_nodeAttributeStart);
|
||||
|
||||
pWriter->WriteString2(0, id);
|
||||
pWriter->WriteBool2(1, collapse);
|
||||
|
||||
pWriter->WriteBYTE(g_nodeAttributeEnd);
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:sld"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("id"), id);
|
||||
pWriter->WriteAttribute(_T("collapse"), collapse);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->EndNode(_T("p:sld"));
|
||||
}
|
||||
|
||||
public:
|
||||
nullable_string id;
|
||||
nullable_bool collapse;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds(){};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_VIEWPROPS_SLD_INCLUDE_H_
|
||||
88
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/SlideViewPr.h
Normal file
88
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/SlideViewPr.h
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* 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
|
||||
#ifndef PPTX_VIEWPROPS_SLIDE_VIEW_PROPERTIES_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_SLIDE_VIEW_PROPERTIES_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "CSldViewPr.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace nsViewProps
|
||||
{
|
||||
class SlideViewPr : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(SlideViewPr)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
CSldViewPr = node.ReadNode(_T("p:cSldViewPr"));
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(CSldViewPr);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:slideViewPr"), oValue);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteRecord1(0, CSldViewPr);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:slideViewPr"));
|
||||
pWriter->EndAttributes();
|
||||
|
||||
CSldViewPr.toXmlWriter(pWriter);
|
||||
|
||||
pWriter->EndNode(_T("p:slideViewPr"));
|
||||
}
|
||||
|
||||
public:
|
||||
nsViewProps::CSldViewPr CSldViewPr;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds()
|
||||
{
|
||||
CSldViewPr.SetParentPointer(this);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_VIEWPROPS_SLIDE_VIEW_PROPERTIES_INCLUDE_H_
|
||||
100
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/SorterViewPr.h
Normal file
100
ActiveX/ASCOfficePPTXFile/PPTXFormat/ViewProps/SorterViewPr.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* 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 Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* 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
|
||||
#ifndef PPTX_VIEWPROPS_SORTER_VIEW_PROPERTIES_INCLUDE_H_
|
||||
#define PPTX_VIEWPROPS_SORTER_VIEW_PROPERTIES_INCLUDE_H_
|
||||
|
||||
#include "./../WrapperWritingElement.h"
|
||||
#include "CViewPr.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace nsViewProps
|
||||
{
|
||||
class SorterViewPr : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(SorterViewPr)
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
node.ReadAttributeBase(L"showFormatting", attrShowFormatting);
|
||||
CViewPr = node.ReadNode(_T("p:cViewPr"));
|
||||
|
||||
FillParentPointersForChilds();
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("showFormatting"), attrShowFormatting);
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(CViewPr);
|
||||
|
||||
return XmlUtils::CreateNode(_T("p:sorterViewPr"), oAttr, oValue);
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(g_nodeAttributeStart);
|
||||
pWriter->WriteBool2(0, attrShowFormatting);
|
||||
pWriter->WriteBYTE(g_nodeAttributeEnd);
|
||||
|
||||
pWriter->WriteRecord1(0, CViewPr);
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:sorterViewPr"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("showFormatting"), attrShowFormatting);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
CViewPr.toXmlWriter(pWriter);
|
||||
|
||||
pWriter->EndNode(_T("p:sorterViewPr"));
|
||||
}
|
||||
|
||||
public:
|
||||
nsViewProps::CViewPr CViewPr;
|
||||
nullable_bool attrShowFormatting;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds()
|
||||
{
|
||||
CViewPr.SetParentPointer(this);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_VIEWPROPS_SORTER_VIEW_PROPERTIES_INCLUDE_H_
|
||||
Reference in New Issue
Block a user