init repo

This commit is contained in:
nikolay ivanov
2014-07-05 18:22:49 +00:00
commit a8be6b9e72
17348 changed files with 9229832 additions and 0 deletions

View 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_PRESENTATION_EMBEDDEDFONT_INCLUDE_H_
#define PPTX_PRESENTATION_EMBEDDEDFONT_INCLUDE_H_
#include "./../WrapperWritingElement.h"
#include "EmbeddedFontDataId.h"
#include "./../Logic/TextFont.h"
namespace PPTX
{
namespace nsPresentation
{
class EmbeddedFont : public WrapperWritingElement
{
public:
PPTX_LOGIC_BASE(EmbeddedFont)
public:
virtual void fromXML(XmlUtils::CXmlNode& node)
{
Bold = node.ReadNode(_T("p:bold"));
BoldItalic = node.ReadNode(_T("p:boldItalic"));
Italic = node.ReadNode(_T("p:italic"));
Regular = node.ReadNode(_T("p:regular"));
Font = node.ReadNode(_T("p:font"));
FillParentPointersForChilds();
}
virtual CString toXML() const
{
XmlUtils::CNodeValue oValue;
oValue.WriteNullable(Bold);
oValue.WriteNullable(BoldItalic);
oValue.WriteNullable(Italic);
oValue.WriteNullable(Regular);
oValue.Write(Font);
return XmlUtils::CreateNode(_T("p:embeddedFont"), oValue);
}
public:
nullable<EmbeddedFontDataId> Bold;
nullable<EmbeddedFontDataId> BoldItalic;
nullable<EmbeddedFontDataId> Italic;
nullable<EmbeddedFontDataId> Regular;
Logic::TextFont Font;
protected:
virtual void FillParentPointersForChilds()
{
if(Bold.is_init())
Bold->SetParentPointer(this);
if(BoldItalic.is_init())
BoldItalic->SetParentPointer(this);
if(Italic.is_init())
Italic->SetParentPointer(this);
if(Regular.is_init())
Regular->SetParentPointer(this);
Font.SetParentPointer(this);
}
};
}
}
#endif // PPTX_PRESENTATION_EMBEDDEDFONT_INCLUDE_H_

View File

@@ -0,0 +1,72 @@
/*
* (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_PRESENTATION_EMBEDDEDFONTDATAID_INCLUDE_H_
#define PPTX_PRESENTATION_EMBEDDEDFONTDATAID_INCLUDE_H_
#include "./../WrapperWritingElement.h"
namespace PPTX
{
namespace nsPresentation
{
class EmbeddedFontDataId : public WrapperWritingElement
{
public:
PPTX_LOGIC_BASE(EmbeddedFontDataId)
public:
virtual void fromXML(XmlUtils::CXmlNode& node)
{
m_name = XmlUtils::GetNameNoNS(node.GetName());
rid = node.GetAttribute(_T("r:id"));
}
virtual CString toXML() const
{
XmlUtils::CAttribute oAttr;
oAttr.Write(_T("r:id"), rid);
return XmlUtils::CreateNode(_T("p:") + m_name, oAttr);
}
public:
CString rid;
public:
CString m_name;
protected:
virtual void FillParentPointersForChilds(){};
};
}
}
#endif // PPTX_PRESENTATION_EMBEDDEDFONTDATAID_INCLUDE_H_

View File

@@ -0,0 +1,80 @@
/*
* (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_PRESENTATION_KINSOKU_INCLUDE_H_
#define PPTX_PRESENTATION_KINSOKU_INCLUDE_H_
#include "./../WrapperWritingElement.h"
namespace PPTX
{
namespace nsPresentation
{
class Kinsoku : public WrapperWritingElement
{
public:
PPTX_LOGIC_BASE(Kinsoku)
public:
virtual void fromXML(XmlUtils::CXmlNode& node)
{
invalEndChars = node.GetAttribute(_T("invalEndChars"));
invalStChars = node.GetAttribute(_T("invalStChars"));
node.ReadAttributeBase(L"lang", lang);
}
virtual CString toXML() const
{
XmlUtils::CAttribute oAttr;
oAttr.Write(_T("invalEndChars"), invalEndChars);
oAttr.Write(_T("invalStChars"), invalStChars);
oAttr.Write(_T("lang"), lang);
return XmlUtils::CreateNode(_T("p:kinsoku"), oAttr);
}
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
{
}
public:
CString invalEndChars;
CString invalStChars;
nullable_string lang;
protected:
virtual void FillParentPointersForChilds(){};
};
}
}
#endif // PPTX_PRESENTATION_KINSOKU_INCLUDE_H_

View 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_PRESENTATION_NOTESSZ_INCLUDE_H_
#define PPTX_PRESENTATION_NOTESSZ_INCLUDE_H_
#include "./../WrapperWritingElement.h"
namespace PPTX
{
namespace nsPresentation
{
class NotesSz : public WrapperWritingElement
{
public:
PPTX_LOGIC_BASE(NotesSz)
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:notesSz"), oAttr);
}
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
{
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
pWriter->WriteInt1(0, cx);
pWriter->WriteInt1(1, cy);
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
}
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
{
pWriter->StartNode(_T("p:notesSz"));
pWriter->StartAttributes();
pWriter->WriteAttribute(_T("cx"), cx);
pWriter->WriteAttribute(_T("cy"), cy);
pWriter->EndAttributes();
pWriter->EndNode(_T("p:notesSz"));
}
public:
int cx;
int cy;
protected:
virtual void FillParentPointersForChilds(){};
AVSINLINE void Normalize()
{
if (cx < 0)
cx = 0;
if (cy < 0)
cy = 0;
}
};
}
}
#endif // PPTX_PRESENTATION_NOTESSZ_INCLUDE_H_

View File

@@ -0,0 +1,84 @@
/*
* (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_PRESENTATION_PHOTOALBUM_INCLUDE_H_
#define PPTX_PRESENTATION_PHOTOALBUM_INCLUDE_H_
#include "./../WrapperWritingElement.h"
#include "./../Limit/FrameShape.h"
#include "./../Limit/AlbumLayout.h"
namespace PPTX
{
namespace nsPresentation
{
class PhotoAlbum : public WrapperWritingElement
{
public:
PPTX_LOGIC_BASE(PhotoAlbum)
public:
virtual void fromXML(XmlUtils::CXmlNode& node)
{
node.ReadAttributeBase(L"bw", bw);
node.ReadAttributeBase(L"frame", frame);
node.ReadAttributeBase(L"layout", layout);
node.ReadAttributeBase(L"showCaptions", showCaptions);
}
virtual CString toXML() const
{
XmlUtils::CAttribute oAttr;
oAttr.Write(_T("bw"), bw);
oAttr.WriteLimitNullable(_T("frame"), frame);
oAttr.WriteLimitNullable(_T("layout"), layout);
oAttr.Write(_T("showCaptions"), showCaptions);
return XmlUtils::CreateNode(_T("p:photoAlbum"), oAttr);
}
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
{
}
public:
nullable_bool bw;
nullable_limit<Limit::FrameShape> frame;
nullable_limit<Limit::AlbumLayout> layout;
nullable_bool showCaptions;
protected:
virtual void FillParentPointersForChilds(){};
};
}
}
#endif // PPTX_PRESENTATION_PHOTOALBUM_INCLUDE_H_

View File

@@ -0,0 +1,105 @@
/*
* (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_PRESENTATION_SLDSZ_INCLUDE_H_
#define PPTX_PRESENTATION_SLDSZ_INCLUDE_H_
#include "./../WrapperWritingElement.h"
#include "./../Limit/SlideSize.h"
namespace PPTX
{
namespace nsPresentation
{
class SldSz : public WrapperWritingElement
{
public:
PPTX_LOGIC_BASE(SldSz)
public:
virtual void fromXML(XmlUtils::CXmlNode& node)
{
cx = node.ReadAttributeInt(L"cx");
cy = node.ReadAttributeInt(L"cy");
node.ReadAttributeBase(L"type", type);
Normalize();
}
virtual CString toXML() const
{
XmlUtils::CAttribute oAttr;
oAttr.Write(_T("cx"), cx);
oAttr.Write(_T("cy"), cy);
oAttr.WriteLimitNullable(_T("type"), type);
return XmlUtils::CreateNode(_T("p:sldSz"), oAttr);
}
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
{
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
pWriter->WriteInt1(0, cx);
pWriter->WriteInt1(1, cy);
pWriter->WriteLimit2(2, type);
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
}
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
{
pWriter->StartNode(_T("p:sldSz"));
pWriter->StartAttributes();
pWriter->WriteAttribute(_T("cx"), cx);
pWriter->WriteAttribute(_T("cy"), cy);
pWriter->WriteAttribute(_T("type"), type);
pWriter->EndAttributes();
pWriter->EndNode(_T("p:sldSz"));
}
public:
int cx;
int cy;
nullable_limit<Limit::SlideSize> type;
protected:
virtual void FillParentPointersForChilds(){};
AVSINLINE void Normalize()
{
cx = min(max(cx, 914400), 51206400);
cy = min(max(cy, 914400), 51206400);
}
};
}
}
#endif // PPTX_PRESENTATION_SLDSZ_INCLUDE_H_