init repo
This commit is contained in:
328
ActiveX/ASCOfficePPTXFile/PPTXFormat/App.h
Normal file
328
ActiveX/ASCOfficePPTXFile/PPTXFormat/App.h
Normal file
@@ -0,0 +1,328 @@
|
||||
/*
|
||||
* (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_APP_FILE_INCLUDE_H_
|
||||
#define PPTX_APP_FILE_INCLUDE_H_
|
||||
|
||||
#include "WrapperFile.h"
|
||||
#include "Logic/PartTitle.h"
|
||||
#include "Logic/HeadingVariant.h"
|
||||
#include "DocxFormat/FileTypes.h"
|
||||
|
||||
using namespace NSBinPptxRW;
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class App : public WrapperFile
|
||||
{
|
||||
public:
|
||||
App()
|
||||
{
|
||||
}
|
||||
App(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
read(filename, map);
|
||||
}
|
||||
virtual ~App()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
HeadingPairs.RemoveAll();
|
||||
TitlesOfParts.RemoveAll();
|
||||
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNode.FromXmlFile2(filename.m_strFilename);
|
||||
|
||||
oNode.ReadNodeValueBase(L"Template", Template);
|
||||
oNode.ReadNodeValueBase(L"TotalTime", TotalTime);
|
||||
oNode.ReadNodeValueBase(L"Words", Words);
|
||||
oNode.ReadNodeValueBase(L"Application", Application);
|
||||
oNode.ReadNodeValueBase(L"PresentationFormat", PresentationFormat);
|
||||
oNode.ReadNodeValueBase(L"Paragraphs", Paragraphs);
|
||||
oNode.ReadNodeValueBase(L"Slides", Slides);
|
||||
oNode.ReadNodeValueBase(L"Notes", Notes);
|
||||
oNode.ReadNodeValueBase(L"HiddenSlides", HiddenSlides);
|
||||
oNode.ReadNodeValueBase(L"MMClips", MMClips);
|
||||
oNode.ReadNodeValueBase(L"ScaleCrop", ScaleCrop);
|
||||
|
||||
XmlUtils::CXmlNode oHP = oNode.ReadNode(_T("HeadingPairs"));
|
||||
XmlUtils::CXmlNode oNodeVector1;
|
||||
if (oHP.GetNode(_T("vt:vector"), oNodeVector1))
|
||||
{
|
||||
oNodeVector1.ReadAttributeBase(_T("size"), m_Headings);
|
||||
oNodeVector1.LoadArray(_T("vt:variant"), HeadingPairs);
|
||||
}
|
||||
|
||||
XmlUtils::CXmlNode oTP = oNode.ReadNode(_T("TitlesOfParts"));
|
||||
XmlUtils::CXmlNode oNodeVector2;
|
||||
if (oTP.GetNode(_T("vt:vector"), oNodeVector2))
|
||||
{
|
||||
oNodeVector2.ReadAttributeBase(_T("size"), m_VectorSize);
|
||||
oNodeVector2.LoadArray(_T("vt:variant"), TitlesOfParts);
|
||||
}
|
||||
|
||||
oNode.ReadNodeValueBase(L"Company", Company);
|
||||
oNode.ReadNodeValueBase(L"LinksUpToDate", LinksUpToDate);
|
||||
oNode.ReadNodeValueBase(L"SharedDoc", SharedDoc);
|
||||
oNode.ReadNodeValueBase(L"HyperlinksChanged", HyperlinksChanged);
|
||||
oNode.ReadNodeValueBase(L"AppVersion", AppVersion);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Normalize();
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, OOX::ContentTypes::File& content)const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("xmlns"), OOX::g_Namespaces.xmlns.m_strLink);
|
||||
oAttr.Write(_T("xmlns:vt"), OOX::g_Namespaces.vt.m_strLink);
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write2(_T("Template"), Template);
|
||||
oValue.Write2(_T("TotalTime"), TotalTime);
|
||||
oValue.Write2(_T("Words"), Words);
|
||||
oValue.Write2(_T("Application"), Application);
|
||||
oValue.Write2(_T("PresentationFormat"), PresentationFormat);
|
||||
oValue.Write2(_T("Paragraphs"), Paragraphs);
|
||||
oValue.Write2(_T("Slides"), Slides);
|
||||
oValue.Write2(_T("Notes"), Notes);
|
||||
oValue.Write2(_T("HiddenSlides"), HiddenSlides);
|
||||
oValue.Write2(_T("MMClips"), MMClips);
|
||||
oValue.Write2(_T("ScaleCrop"), ScaleCrop);
|
||||
|
||||
XmlUtils::CAttribute oAttr1;
|
||||
oAttr1.Write(_T("size"), m_Headings);
|
||||
oAttr1.Write(_T("baseType"), _T("variant"));
|
||||
|
||||
XmlUtils::CNodeValue oValue1;
|
||||
oValue1.WriteArray(HeadingPairs);
|
||||
|
||||
oValue.Write2(_T("HeadingPairs"), XmlUtils::CreateNode(_T("vt:vector"), oAttr1, oValue1));
|
||||
|
||||
XmlUtils::CAttribute oAttr2;
|
||||
oAttr2.Write(_T("size"), m_Headings);
|
||||
oAttr2.Write(_T("baseType"), _T("lpstr"));
|
||||
|
||||
XmlUtils::CNodeValue oValue2;
|
||||
oValue2.WriteArray(HeadingPairs);
|
||||
|
||||
oValue.Write2(_T("TitlesOfParts"), XmlUtils::CreateNode(_T("vt:vector"), oAttr2, oValue2));
|
||||
|
||||
oValue.Write2(_T("Company"), Company);
|
||||
oValue.Write2(_T("LinksUpToDate"), LinksUpToDate);
|
||||
oValue.Write2(_T("SharedDoc"), SharedDoc);
|
||||
oValue.Write2(_T("HyperlinksChanged"), HyperlinksChanged);
|
||||
oValue.Write2(_T("AppVersion"), AppVersion);
|
||||
|
||||
XmlUtils::SaveToFile(filename.m_strFilename, XmlUtils::CreateNode(_T("Properties"), oAttr, oValue));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
content.registration(type().OverrideType(), directory, filename);
|
||||
m_written = true;
|
||||
|
||||
m_WrittenFileName.m_strFilename = filename.GetFilename();
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const OOX::FileType type() const
|
||||
{
|
||||
return OOX::FileTypes::App;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartRecord(NSMainTables::App);
|
||||
|
||||
pWriter->WriteBYTE(g_nodeAttributeStart);
|
||||
|
||||
pWriter->WriteString2(0, Template);
|
||||
pWriter->WriteString2(1, Application);
|
||||
pWriter->WriteString2(2, PresentationFormat);
|
||||
pWriter->WriteString2(3, Company);
|
||||
pWriter->WriteString2(4, AppVersion);
|
||||
|
||||
pWriter->WriteInt2(5, TotalTime);
|
||||
pWriter->WriteInt2(6, Words);
|
||||
pWriter->WriteInt2(7, Paragraphs);
|
||||
pWriter->WriteInt2(8, Slides);
|
||||
pWriter->WriteInt2(9, Notes);
|
||||
pWriter->WriteInt2(10, HiddenSlides);
|
||||
pWriter->WriteInt2(11, MMClips);
|
||||
|
||||
pWriter->WriteBool2(12, ScaleCrop);
|
||||
pWriter->WriteBool2(13, LinksUpToDate);
|
||||
pWriter->WriteBool2(14, SharedDoc);
|
||||
pWriter->WriteBool2(15, HyperlinksChanged);
|
||||
|
||||
pWriter->WriteBYTE(g_nodeAttributeEnd);
|
||||
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("Properties"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
|
||||
pWriter->WriteAttribute(_T("xmlns"), OOX::g_Namespaces.xmlns.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:vt"), OOX::g_Namespaces.vt.m_strLink);
|
||||
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->WriteNodeValue(_T("Template"), Template);
|
||||
pWriter->WriteNodeValue(_T("TotalTime"), TotalTime);
|
||||
pWriter->WriteNodeValue(_T("Words"), Words);
|
||||
pWriter->WriteNodeValue(_T("Application"), Application);
|
||||
pWriter->WriteNodeValue(_T("PresentationFormat"), PresentationFormat);
|
||||
pWriter->WriteNodeValue(_T("Paragraphs"), Paragraphs);
|
||||
pWriter->WriteNodeValue(_T("Slides"), Slides);
|
||||
pWriter->WriteNodeValue(_T("Notes"), Notes);
|
||||
pWriter->WriteNodeValue(_T("HiddenSlides"), HiddenSlides);
|
||||
pWriter->WriteNodeValue(_T("MMClips"), MMClips);
|
||||
pWriter->WriteNodeValue(_T("ScaleCrop"), ScaleCrop);
|
||||
|
||||
pWriter->StartNode(_T("HeadingPairs"));
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->StartNode(_T("vt:vector"));
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("size"), (int)HeadingPairs.GetCount());
|
||||
pWriter->WriteAttribute(_T("baseType"), (CString)_T("variant"));
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->WriteArray2(HeadingPairs);
|
||||
|
||||
pWriter->EndNode(_T("vt:vector"));
|
||||
pWriter->EndNode(_T("HeadingPairs"));
|
||||
|
||||
pWriter->StartNode(_T("TitlesOfParts"));
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->StartNode(_T("vt:vector"));
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("size"), (int)TitlesOfParts.GetCount());
|
||||
pWriter->WriteAttribute(_T("baseType"), (CString)_T("lpstr"));
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->WriteArray2(TitlesOfParts);
|
||||
|
||||
pWriter->EndNode(_T("vt:vector"));
|
||||
pWriter->EndNode(_T("TitlesOfParts"));
|
||||
|
||||
pWriter->WriteNodeValue(_T("Company"), Company);
|
||||
pWriter->WriteNodeValue(_T("LinksUpToDate"), LinksUpToDate);
|
||||
pWriter->WriteNodeValue(_T("SharedDoc"), SharedDoc);
|
||||
pWriter->WriteNodeValue(_T("HyperlinksChanged"), HyperlinksChanged);
|
||||
pWriter->WriteNodeValue(_T("AppVersion"), AppVersion);
|
||||
|
||||
pWriter->EndNode(_T("Properties"));
|
||||
}
|
||||
|
||||
public:
|
||||
nullable_string Template;
|
||||
nullable_int TotalTime;
|
||||
nullable_int Words;
|
||||
nullable_string Application;
|
||||
nullable_string PresentationFormat;
|
||||
nullable_int Paragraphs;
|
||||
nullable_int Slides;
|
||||
nullable_int Notes;
|
||||
nullable_int HiddenSlides;
|
||||
nullable_int MMClips;
|
||||
nullable_bool ScaleCrop;
|
||||
CAtlArray<Logic::HeadingVariant> HeadingPairs;
|
||||
CAtlArray<Logic::PartTitle> TitlesOfParts;
|
||||
nullable_string Company;
|
||||
nullable_bool LinksUpToDate;
|
||||
nullable_bool SharedDoc;
|
||||
nullable_bool HyperlinksChanged;
|
||||
nullable_string AppVersion;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
nullable_int m_VectorSize;
|
||||
nullable_int m_Headings;
|
||||
|
||||
AVSINLINE void Normalize()
|
||||
{
|
||||
TotalTime.normalize_positive();
|
||||
Words.normalize_positive();
|
||||
Paragraphs.normalize_positive();
|
||||
Slides.normalize_positive();
|
||||
Notes.normalize_positive();
|
||||
HiddenSlides.normalize_positive();
|
||||
MMClips.normalize_positive();
|
||||
m_VectorSize.normalize_positive();
|
||||
m_Headings.normalize_positive();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // PPTX_APP_FILE_INCLUDE_H_
|
||||
250
ActiveX/ASCOfficePPTXFile/PPTXFormat/CommentAuthors.h
Normal file
250
ActiveX/ASCOfficePPTXFile/PPTXFormat/CommentAuthors.h
Normal file
@@ -0,0 +1,250 @@
|
||||
/*
|
||||
* (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_COMMENTS_COMMENTSAUTHORS_H_
|
||||
#define PPTX_COMMENTS_COMMENTSAUTHORS_H_
|
||||
|
||||
#include "WrapperFile.h"
|
||||
#include "FileContainer.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Logic
|
||||
{
|
||||
class CommentAuthor : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(CommentAuthor)
|
||||
private:
|
||||
nullable_int id;
|
||||
nullable_int last_idx;
|
||||
nullable_int clr_idx;
|
||||
|
||||
nullable_string name;
|
||||
nullable_string initials;
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
node.ReadAttributeBase(L"id", id);
|
||||
node.ReadAttributeBase(L"lastIdx", last_idx);
|
||||
node.ReadAttributeBase(L"clrIdx", clr_idx);
|
||||
node.ReadAttributeBase(L"name", name);
|
||||
node.ReadAttributeBase(L"initials", initials);
|
||||
}
|
||||
|
||||
virtual CString toXML() const
|
||||
{
|
||||
return _T("");
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:cmAuthor"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("id"), id);
|
||||
pWriter->WriteAttribute(_T("name"), name);
|
||||
pWriter->WriteAttribute(_T("initials"), initials);
|
||||
pWriter->WriteAttribute(_T("lastIdx"), last_idx);
|
||||
pWriter->WriteAttribute(_T("clrIdx"), clr_idx);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->EndNode(_T("p:cmAuthor"));
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteInt2(0, id);
|
||||
pWriter->WriteInt2(1, last_idx);
|
||||
pWriter->WriteInt2(2, clr_idx);
|
||||
pWriter->WriteString2(3, name);
|
||||
pWriter->WriteString2(4, initials);
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
}
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetLong() + 4;
|
||||
|
||||
pReader->Skip(1);
|
||||
|
||||
while (true)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar();
|
||||
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
|
||||
break;
|
||||
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
id = pReader->GetLong();
|
||||
break;
|
||||
case 1:
|
||||
last_idx = pReader->GetLong();
|
||||
break;
|
||||
case 2:
|
||||
clr_idx = pReader->GetLong();
|
||||
break;
|
||||
case 3:
|
||||
name = pReader->GetString2();
|
||||
break;
|
||||
case 4:
|
||||
initials = pReader->GetString2();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
|
||||
virtual void FillParentPointersForChilds()
|
||||
{
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
class Authors : public WrapperFile
|
||||
{
|
||||
private:
|
||||
CAtlArray<PPTX::Logic::CommentAuthor> m_arAuthors;
|
||||
|
||||
public:
|
||||
Authors()
|
||||
{
|
||||
}
|
||||
Authors(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
read(filename, map);
|
||||
}
|
||||
virtual ~Authors()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNode.FromXmlFile2(filename.m_strFilename);
|
||||
|
||||
XmlUtils::CXmlNodes oNodes;
|
||||
oNode.GetNodes(_T("p:cmAuthor"), oNodes);
|
||||
int nCount = oNodes.GetCount();
|
||||
for (int i = 0; i < nCount; ++i)
|
||||
{
|
||||
XmlUtils::CXmlNode oCm;
|
||||
oNodes.GetAt(i, oCm);
|
||||
|
||||
m_arAuthors.Add();
|
||||
m_arAuthors[m_arAuthors.GetCount() - 1].fromXML(oCm);
|
||||
}
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, OOX::ContentTypes::File& content)const
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const OOX::FileType type() const
|
||||
{
|
||||
return OOX::FileTypes::CommentAuthors;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteRecordArray(0, 0, m_arAuthors);
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:cmAuthorLst"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("xmlns:a"), OOX::g_Namespaces.a.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:r"), OOX::g_Namespaces.r.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:p"), OOX::g_Namespaces.p.m_strLink);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->WriteArray2(m_arAuthors);
|
||||
|
||||
pWriter->EndNode(_T("p:cmAuthorLst"));
|
||||
}
|
||||
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG end = pReader->GetPos() + pReader->GetLong() + 4;
|
||||
|
||||
while (pReader->GetPos() < end)
|
||||
{
|
||||
BYTE _rec = pReader->GetUChar();
|
||||
|
||||
switch (_rec)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
pReader->Skip(4);
|
||||
ULONG lCount = pReader->GetULong();
|
||||
|
||||
for (ULONG i = 0; i < lCount; ++i)
|
||||
{
|
||||
pReader->Skip(1);
|
||||
m_arAuthors.Add();
|
||||
m_arAuthors[m_arAuthors.GetCount() - 1].fromPPTY(pReader);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
pReader->SkipRecord();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pReader->Seek(end);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // PPTX_COMMENTS_COMMENTSAUTHORS_H_
|
||||
402
ActiveX/ASCOfficePPTXFile/PPTXFormat/Comments.h
Normal file
402
ActiveX/ASCOfficePPTXFile/PPTXFormat/Comments.h
Normal file
@@ -0,0 +1,402 @@
|
||||
/*
|
||||
* (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_COMMENTS_COMMENTS_H_
|
||||
#define PPTX_COMMENTS_COMMENTS_H_
|
||||
|
||||
#include "WrapperFile.h"
|
||||
#include "FileContainer.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Logic
|
||||
{
|
||||
class Comment : public WrapperWritingElement
|
||||
{
|
||||
public:
|
||||
PPTX_LOGIC_BASE(Comment)
|
||||
private:
|
||||
nullable_int authorId;
|
||||
nullable_int idx;
|
||||
nullable_string dt;
|
||||
|
||||
nullable_int pos_x;
|
||||
nullable_int pos_y;
|
||||
|
||||
nullable_string text;
|
||||
|
||||
nullable_int parentAuthorId;
|
||||
nullable_int parentCommentId;
|
||||
|
||||
nullable_string additional_data;
|
||||
|
||||
public:
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
node.ReadAttributeBase(L"authorId", authorId);
|
||||
node.ReadAttributeBase(L"dt", dt);
|
||||
node.ReadAttributeBase(L"idx", idx);
|
||||
|
||||
XmlUtils::CXmlNode oNodePos = node.ReadNode(_T("p:pos"));
|
||||
if (oNodePos.IsValid())
|
||||
{
|
||||
oNodePos.ReadAttributeBase(L"x", pos_x);
|
||||
oNodePos.ReadAttributeBase(L"y", pos_y);
|
||||
}
|
||||
|
||||
XmlUtils::CXmlNode oNodeText = node.ReadNode(_T("p:text"));
|
||||
if (oNodeText.IsValid())
|
||||
text = oNodeText.GetTextExt();
|
||||
|
||||
XmlUtils::CXmlNode oNodeExtLst = node.ReadNode(_T("p:extLst"));
|
||||
|
||||
bool bIsFound1 = false;
|
||||
bool bIsFound2 = false;
|
||||
if (oNodeExtLst.IsValid())
|
||||
{
|
||||
XmlUtils::CXmlNodes oNodesExt;
|
||||
if (oNodeExtLst.GetNodes(_T("p:ext"), oNodesExt))
|
||||
{
|
||||
int nCountExts = oNodesExt.GetCount();
|
||||
for (int nIndex = 0; nIndex < nCountExts; ++nIndex)
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeExt;
|
||||
oNodesExt.GetAt(nIndex, oNodeExt);
|
||||
|
||||
|
||||
if (!bIsFound1)
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeTI = oNodeExt.ReadNode(_T("p15:threadingInfo"));
|
||||
if (oNodeTI.IsValid())
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeParent = oNodeTI.ReadNode(_T("p15:parentCm"));
|
||||
|
||||
oNodeParent.ReadAttributeBase(L"authorId", parentAuthorId);
|
||||
oNodeParent.ReadAttributeBase(L"idx", parentCommentId);
|
||||
|
||||
bIsFound1 = true;
|
||||
}
|
||||
}
|
||||
if (!bIsFound2)
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeAU = oNodeExt.ReadNode(_T("p15:presenceInfo"));
|
||||
if (oNodeAU.IsValid())
|
||||
{
|
||||
CString strData = oNodeAU.GetAttribute(_T("userId"));
|
||||
|
||||
strData.Replace(_T("&"), _T("&"));
|
||||
strData.Replace(_T("'"), _T("'"));
|
||||
strData.Replace(_T("<"), _T("<"));
|
||||
strData.Replace(_T(">"), _T(">"));
|
||||
strData.Replace(_T("""), _T("\""));
|
||||
|
||||
if (_T("") != strData)
|
||||
additional_data = strData;
|
||||
|
||||
bIsFound2 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
XmlUtils::CXmlNode oNodeExt = oNodeExtLst.ReadNode(_T("p:ext"));
|
||||
if (oNodeExt.IsValid())
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeTI = oNodeExt.ReadNode(_T("p15:threadingInfo"));
|
||||
if (oNodeTI.IsValid())
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeParent = oNodeTI.ReadNode(_T("p15:parentCm"));
|
||||
|
||||
oNodeParent.ReadAttributeBase(L"authorId", parentAuthorId);
|
||||
oNodeParent.ReadAttributeBase(L"idx", parentCommentId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual CString toXML() const
|
||||
{
|
||||
return _T("");
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:cm"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("authorId"), authorId);
|
||||
pWriter->WriteAttribute(_T("dt"), dt);
|
||||
pWriter->WriteAttribute(_T("idx"), idx);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
if (pos_x.is_init() && pos_y.is_init())
|
||||
{
|
||||
CString sPos = _T("");
|
||||
sPos.Format(_T("<p:pos x=\"%d\" y=\"%d\"/>"), *pos_x, *pos_y);
|
||||
pWriter->WriteString(sPos);
|
||||
}
|
||||
if (text.is_init())
|
||||
{
|
||||
pWriter->WriteString(_T("<p:text>"));
|
||||
pWriter->WriteString(*text);
|
||||
pWriter->WriteString(_T("</p:text>"));
|
||||
}
|
||||
|
||||
bool bIsExtLst = false;
|
||||
if ((parentAuthorId.is_init() && parentCommentId.is_init()) || additional_data.is_init())
|
||||
bIsExtLst = true;
|
||||
|
||||
if (bIsExtLst)
|
||||
pWriter->WriteString(_T("<p:extLst>"));
|
||||
|
||||
if (parentAuthorId.is_init() && parentCommentId.is_init())
|
||||
{
|
||||
pWriter->WriteString(_T("<p:ext uri=\"{C676402C-5697-4E1C-873F-D02D1690AC5C}\">\
|
||||
<p15:threadingInfo xmlns:p15=\"http://schemas.microsoft.com/office/powerpoint/2012/main\" timeZoneBias=\"-240\">"));
|
||||
|
||||
CString sPos = _T("");
|
||||
sPos.Format(_T("<p15:parentCm authorId=\"%d\" idx=\"%d\"/>"), *parentAuthorId, *parentCommentId);
|
||||
pWriter->WriteString(sPos);
|
||||
|
||||
pWriter->WriteString(_T("</p15:threadingInfo></p:ext>"));
|
||||
}
|
||||
|
||||
if (additional_data.is_init())
|
||||
{
|
||||
pWriter->WriteString(_T("<p:ext uri=\"{19B8F6BF-5375-455C-9EA6-DF929625EA0E}\">\
|
||||
<p15:presenceInfo xmlns:p15=\"http://schemas.microsoft.com/office/powerpoint/2012/main\" userId=\""));
|
||||
|
||||
CString strData = additional_data.get();
|
||||
|
||||
strData.Replace ( _T("&"), _T("&") );
|
||||
strData.Replace ( _T("'"), _T("'") );
|
||||
strData.Replace ( _T("<"), _T("<") );
|
||||
strData.Replace ( _T(">"), _T(">") );
|
||||
strData.Replace ( _T("\""), _T(""") );
|
||||
|
||||
pWriter->WriteString(strData);
|
||||
|
||||
pWriter->WriteString(_T("\" providerId=\"AD\"/></p:ext>"));
|
||||
}
|
||||
|
||||
if (bIsExtLst)
|
||||
pWriter->WriteString(_T("</p:extLst>"));
|
||||
|
||||
pWriter->EndNode(_T("p:cm"));
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeStart);
|
||||
pWriter->WriteInt2(0, authorId);
|
||||
pWriter->WriteString2(1, dt);
|
||||
pWriter->WriteInt2(2, idx);
|
||||
|
||||
pWriter->WriteInt2(3, pos_x);
|
||||
pWriter->WriteInt2(4, pos_y);
|
||||
|
||||
pWriter->WriteString2(5, text);
|
||||
|
||||
pWriter->WriteInt2(6, parentAuthorId);
|
||||
pWriter->WriteInt2(7, parentCommentId);
|
||||
|
||||
pWriter->WriteString2(8, additional_data);
|
||||
|
||||
pWriter->WriteBYTE(NSBinPptxRW::g_nodeAttributeEnd);
|
||||
}
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG _end_rec = pReader->GetPos() + pReader->GetLong() + 4;
|
||||
|
||||
pReader->Skip(1);
|
||||
|
||||
while (true)
|
||||
{
|
||||
BYTE _at = pReader->GetUChar();
|
||||
if (_at == NSBinPptxRW::g_nodeAttributeEnd)
|
||||
break;
|
||||
|
||||
switch (_at)
|
||||
{
|
||||
case 0:
|
||||
authorId = pReader->GetLong();
|
||||
break;
|
||||
case 1:
|
||||
dt = pReader->GetString2();
|
||||
break;
|
||||
case 2:
|
||||
idx = pReader->GetLong();
|
||||
break;
|
||||
case 3:
|
||||
pos_x = pReader->GetLong();
|
||||
break;
|
||||
case 4:
|
||||
pos_y = pReader->GetLong();
|
||||
break;
|
||||
case 5:
|
||||
text = pReader->GetString2();
|
||||
break;
|
||||
case 6:
|
||||
parentAuthorId = pReader->GetLong();
|
||||
break;
|
||||
case 7:
|
||||
parentCommentId = pReader->GetLong();
|
||||
break;
|
||||
case 8:
|
||||
additional_data = pReader->GetString2();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
|
||||
virtual void FillParentPointersForChilds()
|
||||
{
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
class Comments : public WrapperFile
|
||||
{
|
||||
private:
|
||||
CAtlArray<PPTX::Logic::Comment> m_arComments;
|
||||
|
||||
public:
|
||||
Comments()
|
||||
{
|
||||
}
|
||||
Comments(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
read(filename, map);
|
||||
}
|
||||
virtual ~Comments()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNode.FromXmlFile2(filename.m_strFilename);
|
||||
|
||||
XmlUtils::CXmlNodes oNodes;
|
||||
oNode.GetNodes(_T("p:cm"), oNodes);
|
||||
int nCount = oNodes.GetCount();
|
||||
for (int i = 0; i < nCount; ++i)
|
||||
{
|
||||
XmlUtils::CXmlNode oCm;
|
||||
oNodes.GetAt(i, oCm);
|
||||
|
||||
m_arComments.Add();
|
||||
m_arComments[m_arComments.GetCount() - 1].fromXML(oCm);
|
||||
}
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, OOX::ContentTypes::File& content)const
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const OOX::FileType type() const
|
||||
{
|
||||
return OOX::FileTypes::SlideComments;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->WriteRecordArray(0, 0, m_arComments);
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("p:cmLst"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
pWriter->WriteAttribute(_T("xmlns:a"), OOX::g_Namespaces.a.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:r"), OOX::g_Namespaces.r.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:p"), OOX::g_Namespaces.p.m_strLink);
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->WriteArray2(m_arComments);
|
||||
|
||||
pWriter->EndNode(_T("p:cmLst"));
|
||||
}
|
||||
|
||||
virtual void fromPPTY(NSBinPptxRW::CBinaryFileReader* pReader)
|
||||
{
|
||||
LONG end = pReader->GetPos() + pReader->GetLong() + 4;
|
||||
|
||||
while (pReader->GetPos() < end)
|
||||
{
|
||||
BYTE _rec = pReader->GetUChar();
|
||||
|
||||
switch (_rec)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
pReader->Skip(4);
|
||||
ULONG lCount = pReader->GetULong();
|
||||
|
||||
for (ULONG i = 0; i < lCount; ++i)
|
||||
{
|
||||
pReader->Skip(1);
|
||||
m_arComments.Add();
|
||||
m_arComments[m_arComments.GetCount() - 1].fromPPTY(pReader);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
pReader->SkipRecord();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pReader->Seek(end);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // PPTX_COMMENTS_COMMENTS_H_
|
||||
179
ActiveX/ASCOfficePPTXFile/PPTXFormat/Core.h
Normal file
179
ActiveX/ASCOfficePPTXFile/PPTXFormat/Core.h
Normal file
@@ -0,0 +1,179 @@
|
||||
/*
|
||||
* (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_CORE_FILE_INCLUDE_H_
|
||||
#define PPTX_CORE_FILE_INCLUDE_H_
|
||||
|
||||
#include "WrapperFile.h"
|
||||
#include "DocxFormat/WritingElement.h"
|
||||
|
||||
#include "Limit/ContentStatus.h"
|
||||
#include "DocxFormat/FileTypes.h"
|
||||
|
||||
using namespace NSBinPptxRW;
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class Core : public WrapperFile
|
||||
{
|
||||
public:
|
||||
Core()
|
||||
{
|
||||
}
|
||||
Core(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
read(filename, map);
|
||||
}
|
||||
virtual ~Core()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNode.FromXmlFile2(filename.m_strFilename);
|
||||
|
||||
oNode.ReadNodeValueBase(_T("dc:title"), title);
|
||||
oNode.ReadNodeValueBase(_T("dc:creator"), creator);
|
||||
oNode.ReadNodeValueBase(_T("cp:lastModifiedBy"), lastModifiedBy);
|
||||
oNode.ReadNodeValueBase(_T("cp:revision"), revision);
|
||||
oNode.ReadNodeValueBase(_T("dcterms:modified"), modified);
|
||||
oNode.ReadNodeValueBase(_T("dcterms:created"), created);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, OOX::ContentTypes::File& content)const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("xmlns:dc"), OOX::g_Namespaces.dc.m_strLink);
|
||||
|
||||
oAttr.Write(_T("xmlns:dcterms"), OOX::g_Namespaces.dcterms.m_strLink);
|
||||
oAttr.Write(_T("xmlns:xsi"), OOX::g_Namespaces.xsi.m_strLink);
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write2(_T("dc:title"), title);
|
||||
oValue.Write2(_T("dc:creator"), creator);
|
||||
oValue.Write2(_T("cp:lastModifiedBy"), lastModifiedBy);
|
||||
oValue.Write2(_T("cp:revision"), revision);
|
||||
|
||||
if (created.IsInit())
|
||||
{
|
||||
oValue.m_strValue += _T("<dcterms:created xsi:type=\"dcterms:W3CDTF\">");
|
||||
oValue.m_strValue += *created;
|
||||
oValue.m_strValue += _T("</dcterms:created>");
|
||||
}
|
||||
|
||||
oValue.m_strValue += _T("<dcterms:modified xsi:type=\"dcterms:W3CDTF\">");
|
||||
if (modified.IsInit())
|
||||
oValue.m_strValue += *modified;
|
||||
oValue.m_strValue += _T("</dcterms:modified>");
|
||||
|
||||
XmlUtils::SaveToFile(filename.m_strFilename, XmlUtils::CreateNode(_T("cp:coreProperties"), oAttr, oValue));
|
||||
|
||||
|
||||
content.registration(type().OverrideType(), directory, filename);
|
||||
m_written = true;
|
||||
m_WrittenFileName = filename.GetFilename();
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const OOX::FileType type() const
|
||||
{
|
||||
return OOX::FileTypes::Core;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
|
||||
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartRecord(NSMainTables::Core);
|
||||
|
||||
pWriter->WriteBYTE(g_nodeAttributeStart);
|
||||
|
||||
pWriter->WriteString2(0, title);
|
||||
pWriter->WriteString2(1, creator);
|
||||
pWriter->WriteString2(2, lastModifiedBy);
|
||||
pWriter->WriteString2(3, revision);
|
||||
pWriter->WriteString2(4, created);
|
||||
pWriter->WriteString2(5, modified);
|
||||
|
||||
pWriter->WriteBYTE(g_nodeAttributeEnd);
|
||||
|
||||
pWriter->EndRecord();
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
pWriter->StartNode(_T("cp:coreProperties"));
|
||||
|
||||
pWriter->StartAttributes();
|
||||
|
||||
pWriter->WriteAttribute(_T("xmlns:cp"), OOX::g_Namespaces.cp.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:dc"), OOX::g_Namespaces.dc.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:dcterms"), OOX::g_Namespaces.dcterms.m_strLink);
|
||||
pWriter->WriteAttribute(_T("xmlns:xsi"), OOX::g_Namespaces.xsi.m_strLink);
|
||||
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->WriteNodeValue(_T("dc:title"), title);
|
||||
pWriter->WriteNodeValue(_T("dc:creator"), creator);
|
||||
pWriter->WriteNodeValue(_T("cp:lastModifiedBy"), lastModifiedBy);
|
||||
pWriter->WriteNodeValue(_T("cp:revision"), revision);
|
||||
|
||||
pWriter->WriteNodeValue(_T("dcterms:created xsi:type=\"dcterms:W3CDTF\""), created);
|
||||
pWriter->WriteNodeValue(_T("dcterms:modified xsi:type=\"dcterms:W3CDTF\""), modified);
|
||||
|
||||
pWriter->EndNode(_T("cp:coreProperties"));
|
||||
}
|
||||
|
||||
public:
|
||||
nullable_string title;
|
||||
nullable_string creator;
|
||||
nullable_string lastModifiedBy;
|
||||
nullable_string revision;
|
||||
|
||||
nullable_string created;
|
||||
|
||||
nullable_string modified;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif // PPTX_CORE_FILE_INCLUDE_H_
|
||||
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
* (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 OOX_CONTENT_TYPES_DEFAULT_INCLUDE_H_
|
||||
#define OOX_CONTENT_TYPES_DEFAULT_INCLUDE_H_
|
||||
|
||||
#include "./../WritingElement.h"
|
||||
#include "ExtensionTable.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
namespace ContentTypes
|
||||
{
|
||||
class Default : public WritingElement
|
||||
{
|
||||
public:
|
||||
Default()
|
||||
{
|
||||
m_extension = _T("");
|
||||
}
|
||||
Default(const CString& extension) : m_extension(extension)
|
||||
{
|
||||
}
|
||||
virtual ~Default()
|
||||
{
|
||||
}
|
||||
explicit Default(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
}
|
||||
const Default& operator =(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
m_extension = node.GetAttribute(_T("Extension"));
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
static const ExtensionTable table;
|
||||
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("Extension"), m_extension);
|
||||
oAttr.Write(_T("ContentType"), table[m_extension]);
|
||||
|
||||
return XmlUtils::CreateNode(_T("Default"), oAttr);
|
||||
}
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_Default;
|
||||
}
|
||||
|
||||
public:
|
||||
const bool operator ==(const CString& rhs) const
|
||||
{
|
||||
return m_extension == rhs;
|
||||
}
|
||||
|
||||
private:
|
||||
CString m_extension;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // OOX_CONTENT_TYPES_DEFAULT_INCLUDE_H_
|
||||
@@ -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 OOX_CONTENT_TYPES_DEFAULT_TABLE_INCLUDE_H_
|
||||
#define OOX_CONTENT_TYPES_DEFAULT_TABLE_INCLUDE_H_
|
||||
|
||||
#include "./../WritingVector.h"
|
||||
#include "Default.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
namespace ContentTypes
|
||||
{
|
||||
class DefaultTable : public WritingVector<Default>
|
||||
{
|
||||
public:
|
||||
DefaultTable()
|
||||
{
|
||||
m_items.Add(Default(_T("rels")));
|
||||
m_items.Add(Default(_T("xml")));
|
||||
}
|
||||
virtual ~DefaultTable()
|
||||
{
|
||||
}
|
||||
explicit DefaultTable(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
}
|
||||
const DefaultTable& operator =(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
node.LoadArray(_T("Default"), m_items);
|
||||
}
|
||||
|
||||
public:
|
||||
void add(const OOX::CPath& path)
|
||||
{
|
||||
CString ext = path.GetExtention();
|
||||
const CString extension = ext.Mid(1);
|
||||
|
||||
size_t nCount = m_items.GetCount();
|
||||
size_t nIndex = 0;
|
||||
|
||||
while (nIndex < nCount)
|
||||
{
|
||||
if (m_items[nIndex] == extension)
|
||||
break;
|
||||
++nIndex;
|
||||
}
|
||||
|
||||
if (nIndex == nCount)
|
||||
m_items.Add(Default(extension));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // OOX_CONTENT)TYPES_DEFAULT_TABLE_INCLUDE_H_
|
||||
@@ -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 OOX_CONTENT_TYPES_EXTENSION_TABLE_INCLUDE_H_
|
||||
#define OOX_CONTENT_TYPES_EXTENSION_TABLE_INCLUDE_H_
|
||||
|
||||
#include "../../../../Common/DocxFormat/Source/Base/Base.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
namespace ContentTypes
|
||||
{
|
||||
class ExtensionTable
|
||||
{
|
||||
public:
|
||||
ExtensionTable()
|
||||
{
|
||||
m_table.SetAt(_T("gif"), _T("image/gif"));
|
||||
m_table.SetAt(_T("png"), _T("image/png"));
|
||||
m_table.SetAt(_T("tif"), _T("image/tiff"));
|
||||
m_table.SetAt(_T("tiff"), _T("image/tiff"));
|
||||
m_table.SetAt(_T("jpeg"), _T("image/jpeg"));
|
||||
m_table.SetAt(_T("jpg"), _T("image/jpeg"));
|
||||
m_table.SetAt(_T("jpe"), _T("image/jpeg"));
|
||||
m_table.SetAt(_T("jfif"), _T("image/jpeg"));
|
||||
m_table.SetAt(_T("rels"), _T("application/vnd.openxmlformats-package.relationships+xml"));
|
||||
m_table.SetAt(_T("bin"), _T("application/vnd.openxmlformats-officedocument.oleObject"));
|
||||
m_table.SetAt(_T("xml"), _T("application/xml"));
|
||||
m_table.SetAt(_T("emf"), _T("image/x-emf"));
|
||||
m_table.SetAt(_T("emz"), _T("image/x-emz"));
|
||||
m_table.SetAt(_T("wmf"), _T("image/x-wmf"));
|
||||
m_table.SetAt(_T("svm"), _T("image/svm"));
|
||||
m_table.SetAt(_T("wav"), _T("audio/wav"));
|
||||
m_table.SetAt(_T("xls"), _T("application/vnd.ms-excel"));
|
||||
m_table.SetAt(_T("xlsm"), _T("application/vnd.ms-excel.sheet.macroEnabled.12"));
|
||||
m_table.SetAt(_T("xlsb"), _T("application/vnd.ms-excel.sheet.binary.macroEnabled.12"));
|
||||
m_table.SetAt(_T("xlsx"), _T("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"));
|
||||
m_table.SetAt(_T("ppt"), _T("application/vnd.ms-powerpoint"));
|
||||
m_table.SetAt(_T("pptm"), _T("application/vnd.ms-powerpoint.presentation.macroEnabled.12"));
|
||||
m_table.SetAt(_T("pptx"), _T("application/vnd.openxmlformats-officedocument.presentationml.presentation"));
|
||||
m_table.SetAt(_T("sldm"), _T("application/vnd.ms-powerpoint.slide.macroEnabled.12"));
|
||||
m_table.SetAt(_T("sldx"), _T("application/vnd.openxmlformats-officedocument.presentationml.slide"));
|
||||
m_table.SetAt(_T("doc"), _T("application/msword"));
|
||||
m_table.SetAt(_T("docm"), _T("aapplication/vnd.ms-word.document.macroEnabled.12"));
|
||||
m_table.SetAt(_T("docx"), _T("application/vnd.openxmlformats-officedocument.wordprocessingml.document"));
|
||||
m_table.SetAt(_T("vml"), _T("application/vnd.openxmlformats-officedocument.vmlDrawing"));
|
||||
}
|
||||
const CString operator[] (const CString& extension) const
|
||||
{
|
||||
const CAtlMap<CString, CString>::CPair* pPair = m_table.Lookup(extension);
|
||||
if (NULL == pPair)
|
||||
return _T("");
|
||||
return pPair->m_value;
|
||||
}
|
||||
|
||||
private:
|
||||
CAtlMap<CString, CString> m_table;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // OOX_CONTENT_TYPES_EXTENSION_TABLE_INCLUDE_H_
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* (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 OOX_CONTENT_TYPES_FILE_INCLUDE_H_
|
||||
#define OOX_CONTENT_TYPES_FILE_INCLUDE_H_
|
||||
|
||||
#include "OverrideTable.h"
|
||||
#include "DefaultTable.h"
|
||||
#include "./../FileType.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
namespace ContentTypes
|
||||
{
|
||||
static const CPath s_filename = L"[Content_Types].xml";
|
||||
|
||||
class File
|
||||
{
|
||||
public:
|
||||
File()
|
||||
{
|
||||
}
|
||||
File(const CPath& path)
|
||||
{
|
||||
read(path);
|
||||
}
|
||||
virtual ~File()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const CPath& path)
|
||||
{
|
||||
OOX::CPath oPath = path / s_filename;
|
||||
XmlUtils::CXmlNode oNode;
|
||||
if (oNode.FromXmlFile(oPath.m_strFilename))
|
||||
{
|
||||
Default = oNode;
|
||||
Override = oNode;
|
||||
}
|
||||
}
|
||||
virtual void write(const CPath& path) const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("xmlns"), _T("http://schemas.openxmlformats.org/package/2006/content-types"));
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(Default);
|
||||
oValue.Write(Override);
|
||||
|
||||
OOX::CPath savepath = path / s_filename;
|
||||
|
||||
XmlUtils::SaveToFile(savepath.m_strFilename, XmlUtils::CreateNode(_T("Types"), oAttr, oValue));
|
||||
}
|
||||
virtual const bool isValid() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public:
|
||||
void registration(const CString& type, const CPath& directory, const CPath& filename)
|
||||
{
|
||||
Override.add(type, directory / filename.m_strFilename);
|
||||
Default.add(directory / filename.m_strFilename);
|
||||
}
|
||||
|
||||
public:
|
||||
OverrideTable Override;
|
||||
DefaultTable Default;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // DOCX_CONTENT_TYPES_FILE_INCLUDE_H_
|
||||
@@ -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 OOX_CONTENT_TYPES_OVERRIDE_INCLUDE_H_
|
||||
#define OOX_CONTENT_TYPES_OVERRIDE_INCLUDE_H_
|
||||
|
||||
#include "./../WritingElement.h"
|
||||
#include "../../../../Common/DocxFormat/Source/SystemUtility/SystemUtility.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
namespace ContentTypes
|
||||
{
|
||||
class Override : public WritingElement
|
||||
{
|
||||
public:
|
||||
Override()
|
||||
{
|
||||
}
|
||||
Override(const CString& type, const CPath& path) : m_type(type), m_part(path)
|
||||
{
|
||||
}
|
||||
virtual ~Override()
|
||||
{
|
||||
}
|
||||
explicit Override(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
}
|
||||
const Override& operator =(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
m_part = node.GetAttribute(_T("PartName"));
|
||||
m_type = node.GetAttribute(_T("ContentType"));
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("PartName"), _T("/") + m_part.m_strFilename);
|
||||
oAttr.Write(_T("ContentType"), m_type);
|
||||
|
||||
return XmlUtils::CreateNode(_T("Override"), oAttr);
|
||||
}
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_Override;
|
||||
}
|
||||
|
||||
public:
|
||||
AVSINLINE const CString type() const
|
||||
{
|
||||
return m_type;
|
||||
}
|
||||
AVSINLINE const OOX::CPath filename() const
|
||||
{
|
||||
return m_part;
|
||||
}
|
||||
|
||||
private:
|
||||
CString m_type;
|
||||
OOX::CPath m_part;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // OOX_CONTENT_TYPES_OVERRIDE_INCLUDE_H_
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* (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 OOX_CONTENT_TYPES_OVERRIDE_TABLE_INCLUDE_H_
|
||||
#define OOX_CONTENT_TYPES_OVERRIDE_TABLE_INCLUDE_H_
|
||||
|
||||
#include "./../WritingVector.h"
|
||||
#include "Override.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
namespace ContentTypes
|
||||
{
|
||||
class OverrideTable : public WritingVector<Override>
|
||||
{
|
||||
public:
|
||||
OverrideTable()
|
||||
{
|
||||
}
|
||||
virtual ~OverrideTable()
|
||||
{
|
||||
}
|
||||
explicit OverrideTable(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
}
|
||||
const OverrideTable& operator =(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
node.LoadArray(_T("Override"), m_items);
|
||||
}
|
||||
|
||||
public:
|
||||
void add(const CString& type, const OOX::CPath& path)
|
||||
{
|
||||
m_items.Add(Override(type, path));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // OOX_CONTENT_TYPES_OVERRIDE_TABLE_INCLUDE_H_
|
||||
82
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/DateTime.h
Normal file
82
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/DateTime.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* (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 OOX_DATE_TIME_INCLUDE_H_
|
||||
#define OOX_DATE_TIME_INCLUDE_H_
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/Utility/Utility.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class DateTime
|
||||
{
|
||||
public:
|
||||
DateTime()
|
||||
{
|
||||
}
|
||||
explicit DateTime(const CString& value) : m_datetime(value, s_pattern)
|
||||
{
|
||||
}
|
||||
explicit DateTime(const ::DateTime& dt) : m_datetime(dt)
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
CString ToString() const
|
||||
{
|
||||
return m_datetime.ToString(s_pattern);
|
||||
}
|
||||
static DateTime Parse(const CString& value)
|
||||
{
|
||||
return DateTime(value);
|
||||
}
|
||||
|
||||
public:
|
||||
::DateTime& datetime()
|
||||
{
|
||||
return m_datetime;
|
||||
}
|
||||
const ::DateTime& datetime() const
|
||||
{
|
||||
return m_datetime;
|
||||
}
|
||||
|
||||
private:
|
||||
static const CString s_pattern;
|
||||
::DateTime m_datetime;
|
||||
};
|
||||
|
||||
const CString DateTime::s_pattern = _T("%YYYY-%MM-%DDT%hh:%mm:%ssZ");
|
||||
}
|
||||
|
||||
#endif // OOX_DATE_TIME_INCLUDE_H_
|
||||
76
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/External.h
vendored
Normal file
76
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/External.h
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* (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 OOX_EXTERNAL_INCLUDE_H_
|
||||
#define OOX_EXTERNAL_INCLUDE_H_
|
||||
|
||||
#include "../File.h"
|
||||
#include "../FileTypes.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class External : public File
|
||||
{
|
||||
public:
|
||||
External()
|
||||
{
|
||||
}
|
||||
External(const CPath& uri)
|
||||
{
|
||||
read(uri);
|
||||
}
|
||||
~External()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const CPath& uri)
|
||||
{
|
||||
m_uri = uri;
|
||||
}
|
||||
virtual void write(const CPath& filename, const CPath& directory, ContentTypes::File& content) const
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
AVSINLINE CPath Uri() const
|
||||
{
|
||||
return m_uri;
|
||||
}
|
||||
|
||||
protected:
|
||||
CPath m_uri;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_EXTERNAL_INCLUDE_H_
|
||||
71
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/ExternalAudio.h
vendored
Normal file
71
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/ExternalAudio.h
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* (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 OOX_EXTERNALAUDIO_INCLUDE_H_
|
||||
#define OOX_EXTERNALAUDIO_INCLUDE_H_
|
||||
|
||||
#include "External.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class ExternalAudio : public External
|
||||
{
|
||||
public:
|
||||
ExternalAudio()
|
||||
{
|
||||
}
|
||||
ExternalAudio(const CPath& uri)
|
||||
{
|
||||
read(uri);
|
||||
}
|
||||
~ExternalAudio()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::ExternalAudio;
|
||||
}
|
||||
virtual const CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_EXTERNALAUDIO_INCLUDE_H_
|
||||
71
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/ExternalImage.h
vendored
Normal file
71
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/ExternalImage.h
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* (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 OOX_EXTERNALIMAGE_INCLUDE_H_
|
||||
#define OOX_EXTERNALIMAGE_INCLUDE_H_
|
||||
|
||||
#include "External.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class ExternalImage : public External
|
||||
{
|
||||
public:
|
||||
ExternalImage()
|
||||
{
|
||||
}
|
||||
ExternalImage(const CPath& uri)
|
||||
{
|
||||
read(uri);
|
||||
}
|
||||
~ExternalImage()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::ExternalImage;
|
||||
}
|
||||
virtual const CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_EXTERNALIMAGE_INCLUDE_H_
|
||||
71
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/ExternalVideo.h
vendored
Normal file
71
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/ExternalVideo.h
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* (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 OOX_EXTERNALVIDEO_INCLUDE_H_
|
||||
#define OOX_EXTERNALVIDEO_INCLUDE_H_
|
||||
|
||||
#include "External.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class ExternalVideo : public External
|
||||
{
|
||||
public:
|
||||
ExternalVideo()
|
||||
{
|
||||
}
|
||||
ExternalVideo(const CPath& uri)
|
||||
{
|
||||
read(uri);
|
||||
}
|
||||
~ExternalVideo()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::ExternalVideo;
|
||||
}
|
||||
virtual const CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_EXTERNALVIDEO_INCLUDE_H_
|
||||
71
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/HyperLink.h
vendored
Normal file
71
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/External/HyperLink.h
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* (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 OOX_HYPERLINK_INCLUDE_H_
|
||||
#define OOX_HYPERLINK_INCLUDE_H_
|
||||
|
||||
#include "External.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class HyperLink : public External
|
||||
{
|
||||
public:
|
||||
HyperLink()
|
||||
{
|
||||
}
|
||||
HyperLink(const CPath& uri)
|
||||
{
|
||||
read(uri);
|
||||
}
|
||||
~HyperLink()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::HyperLink;
|
||||
}
|
||||
virtual const CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_HYPERLINK_INCLUDE_H_
|
||||
61
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/File.h
Normal file
61
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/File.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* (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 OOX_FILE_INCLUDE_H_
|
||||
#define OOX_FILE_INCLUDE_H_
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/XML/XmlSimple.h"
|
||||
#include "../../../Common/DocxFormat/Source/SystemUtility/SystemUtility.h"
|
||||
|
||||
#include "FileType.h"
|
||||
#include "ContentTypes/File.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class File
|
||||
{
|
||||
public:
|
||||
File(){}
|
||||
virtual ~File(){}
|
||||
|
||||
public:
|
||||
virtual void read(const CPath& filename) = 0;
|
||||
virtual void write(const CPath& filename, const CPath& directory, ContentTypes::File& content) const = 0;
|
||||
|
||||
public:
|
||||
virtual const OOX::FileType type() const = 0;
|
||||
virtual const CPath DefaultDirectory() const = 0;
|
||||
virtual const CPath DefaultFileName() const = 0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_FILE_INCLUDE_H_
|
||||
106
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/FileType.h
Normal file
106
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/FileType.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 OOX_FILE_TYPE_INCLUDE_H_
|
||||
#define OOX_FILE_TYPE_INCLUDE_H_
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/SystemUtility/SystemUtility.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class FileType
|
||||
{
|
||||
public:
|
||||
FileType(const CPath& defaultDirectory, const CPath& defaultFileName,
|
||||
const CString& overrideType,
|
||||
const CString& relationType) : m_defaultDirectory(defaultDirectory),
|
||||
m_defaultFileName(defaultFileName),
|
||||
m_overrideType(overrideType),
|
||||
m_relationType(relationType)
|
||||
{
|
||||
}
|
||||
|
||||
FileType(const WCHAR* defaultDirectory, const WCHAR* defaultFileName,
|
||||
const CString& overrideType,
|
||||
const CString& relationType) : m_defaultDirectory(defaultDirectory, false),
|
||||
m_defaultFileName(defaultFileName, false),
|
||||
m_overrideType(overrideType),
|
||||
m_relationType(relationType)
|
||||
{
|
||||
}
|
||||
|
||||
~FileType()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
const bool operator ==(const FileType& rhs) const
|
||||
{
|
||||
return (m_relationType == rhs.m_relationType);
|
||||
}
|
||||
|
||||
public:
|
||||
inline const CString OverrideType() const
|
||||
{
|
||||
return m_overrideType;
|
||||
}
|
||||
inline const CString RelationType() const
|
||||
{
|
||||
return m_relationType;
|
||||
}
|
||||
inline const CPath DefaultDirectory() const
|
||||
{
|
||||
return m_defaultDirectory;
|
||||
}
|
||||
inline const CPath DefaultFileName() const
|
||||
{
|
||||
return m_defaultFileName;
|
||||
}
|
||||
|
||||
private:
|
||||
CString m_overrideType;
|
||||
CString m_relationType;
|
||||
CPath m_defaultDirectory;
|
||||
CPath m_defaultFileName;
|
||||
};
|
||||
|
||||
static const bool operator ==(const CString& type, const FileType& file)
|
||||
{
|
||||
return (type == file.RelationType());
|
||||
}
|
||||
static const bool operator ==(const FileType& file, const CString& type)
|
||||
{
|
||||
return (file.RelationType() == type);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // OOX_FILE_TYPE_INCLUDE_H_
|
||||
284
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/FileTypes.h
Normal file
284
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/FileTypes.h
Normal file
@@ -0,0 +1,284 @@
|
||||
/*
|
||||
* (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 OOX_FILE_TYPES_INCLUDE_H_
|
||||
#define OOX_FILE_TYPES_INCLUDE_H_
|
||||
|
||||
#include "FileType.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
namespace FileTypes
|
||||
{
|
||||
const FileType App(L"docProps", L"app.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.extended-properties+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"));
|
||||
|
||||
const FileType Core(L"docProps", L"core.xml",
|
||||
_T("application/vnd.openxmlformats-package.core-properties+xml"),
|
||||
_T("http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"));
|
||||
|
||||
const FileType Document(L"word", L"document.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"));
|
||||
|
||||
const FileType Theme(L"theme", L"theme.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.theme+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"));
|
||||
|
||||
const FileType Setting(L"", L"settings.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings"));
|
||||
|
||||
const FileType FontTable(L"", L"fontTable.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable"));
|
||||
|
||||
const FileType Style(L"", L"styles.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"));
|
||||
|
||||
const FileType Item(L"customXml", L"item.xml",
|
||||
_T("WARNING not implement"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml"));
|
||||
|
||||
const FileType FootNote(L"", L"footnotes.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes"));
|
||||
|
||||
const FileType EndNote(L"", L"endnotes.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes"));
|
||||
|
||||
const FileType WebSetting(L"", L"webSettings.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings"));
|
||||
|
||||
const FileType Header(L"", L"header.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/header"));
|
||||
|
||||
const FileType Footer(L"", L"footer.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer"));
|
||||
|
||||
const FileType Numbering(L"", L"numbering.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering"));
|
||||
|
||||
const FileType CustomXml(L"customXml", L"itemProps.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.customXmlProperties+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps"));
|
||||
|
||||
const FileType HyperLink(L"", L"",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"));
|
||||
|
||||
const FileType ExternalImage(L"", L"",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"));
|
||||
|
||||
const FileType ExternalAudio(L"", L"",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio"));
|
||||
|
||||
const FileType ExternalVideo(L"", L"",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/video"));
|
||||
|
||||
const FileType Image(L"media", L"image",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"));
|
||||
|
||||
const FileType Audio(L"media", L"audio",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio"));
|
||||
|
||||
const FileType Video(L"media", L"video",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/video"));
|
||||
|
||||
const FileType Data(L"diagrams", L"data.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData"));
|
||||
|
||||
const FileType DrawingDiag(L"diagrams", L"drawing.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.drawingml.diagramDrawing+xml"),
|
||||
_T("http://schemas.microsoft.com/office/2007/relationships/diagramDrawing"));
|
||||
|
||||
const FileType Layout(L"diagrams", L"layout.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramLayout"));
|
||||
|
||||
const FileType Colors(L"diagrams", L"colors.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramColors"));
|
||||
|
||||
const FileType QuickStyle(L"diagrams", L"quickStyle.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramQuickStyle"));
|
||||
|
||||
const FileType Chart(L"charts", L"chart.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.drawingml.chart+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"));
|
||||
|
||||
|
||||
const FileType MicrosoftOfficeExcelWorksheet(L"embeddings", L"Microsoft_Office_Excel_Worksheet.xlsx",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
const FileType MicrosoftOfficeExcel_97_2003_Worksheet(L"embeddings", L"Microsoft_Office_Excel_97-2003_Worksheet.xls",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"));
|
||||
|
||||
const FileType MicrosoftOfficeExcelBinaryWorksheet(L"embeddings", L"Microsoft_Office_Excel_Binary_Worksheet.xlsb",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
const FileType MicrosoftOfficeExcelMacro_EnabledWorksheet(L"embeddings", L"Microsoft_Office_Excel_Macro-Enabled_Worksheet.xlsm",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
const FileType MicrosoftOfficeExcelChart(L"embeddings", L"Microsoft_Office_Excel_Chart.xlsx",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"));
|
||||
|
||||
|
||||
const FileType MicrosoftOfficeWordDocument(L"embeddings", L"Microsoft_Office_Word_Document.docx",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
const FileType MicrosoftOfficeWord_97_2003_Document(L"embeddings", L"Microsoft_Office_Word_97_-_2003_Document.doc",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"));
|
||||
|
||||
const FileType MicrosoftOfficeWordMacro_EnabledDocument(L"embeddings", L"Microsoft_Office_Word_Macro-Enabled_Document.docm",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
|
||||
const FileType MicrosoftOfficePowerPointPresentation(L"embeddings", L"Microsoft_Office_PowerPoint_Presentation.pptx",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
const FileType MicrosoftOfficePowerPoint_97_2003_Presentation(L"embeddings", L"Microsoft_Office_PowerPoint_97-2003_Presentation.xlsx",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"));
|
||||
|
||||
const FileType MicrosoftOfficePowerPointMacro_EnabledPresentation(L"embeddings", L"Microsoft_Office_PowerPoint_Macro-Enabled_Presentation.pptm",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
|
||||
const FileType MicrosoftOfficePowerPointSlide(L"embeddings", L"Microsoft_Office_PowerPoint_Slide.sldx",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
const FileType MicrosoftOfficePowerPointMacro_EnabledSlide(L"embeddings", L"Microsoft_Office_PowerPoint_Macro-Enabled_Slide.sldm",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"));
|
||||
|
||||
|
||||
const FileType OleObject(L"embeddings", L"oleObject.bin",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"));
|
||||
|
||||
const FileType Glossary(L"glossary", L"document.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument"));
|
||||
|
||||
const FileType Slide(L"ppt/slides", L"slide.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.slide+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide"));
|
||||
|
||||
const FileType SlideLayout(L"ppt/slideLayouts", L"slideLayout.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout"));
|
||||
|
||||
const FileType SlideComments(L"ppt/comments", L"comment.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.comment+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"));
|
||||
|
||||
const FileType CommentAuthors(L"ppt", L"commentAuthors.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.commentAuthors.main+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors"));
|
||||
|
||||
const FileType SlideMaster(L"ppt/slideMasters", L"slideMaster.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster"));
|
||||
|
||||
const FileType NotesSlide(L"ppt/notesSlides", L"notesSlide.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide"));
|
||||
|
||||
const FileType NotesMaster(L"ppt/notesMasters", L"notesMaster.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster"));
|
||||
|
||||
const FileType HandoutMaster(L"ppt/handoutMasters", L"handoutMaster.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.handoutMaster+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/handoutMaster"));
|
||||
|
||||
const FileType Presentation(L"ppt", L"presentation.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"));
|
||||
|
||||
const FileType PresProps(L"ppt", L"presProps.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.presProps+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps"));
|
||||
|
||||
const FileType TableStyles(L"ppt", L"tableStyles.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles"));
|
||||
|
||||
const FileType ViewProps(L"ppt", L"viewProps.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps"));
|
||||
|
||||
const FileType ThemePPTX(L"ppt/theme", L"theme.xml",
|
||||
_T("application/vnd.openxmlformats-officedocument.theme+xml"),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"));
|
||||
|
||||
const FileType VmlDrawing(L"ppt", L"vmlDrawing.vml",
|
||||
_T(""),
|
||||
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing"));
|
||||
|
||||
const FileType Media(L"ppt/media", L"", _T(""), _T("http://schemas.microsoft.com/office/2007/relationships/media"));
|
||||
|
||||
|
||||
const FileType Unknow(L"", L"", _T(""), _T(""));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // OOX_FILE_TYPES_INCLUDE_H_
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* (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 OOX_FILE_BUILDER_INCLUDE_H_
|
||||
#define OOX_FILE_BUILDER_INCLUDE_H_
|
||||
|
||||
#include "ContentTypes/File.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class IFileBuilder
|
||||
{
|
||||
public:
|
||||
IFileBuilder();
|
||||
virtual ~IFileBuilder();
|
||||
|
||||
public:
|
||||
virtual void Commit(const CPath& path) = 0;
|
||||
virtual void Finalize(const CPath& path, const CPath& directory, ContentTypes::File& content) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_FILE_BUILDER_INCLUDE_H_
|
||||
@@ -0,0 +1,365 @@
|
||||
/*
|
||||
* (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
|
||||
*
|
||||
*/
|
||||
#include "./stdafx.h"
|
||||
|
||||
#include "IFileContainer.h"
|
||||
#include "Rels/File.h"
|
||||
|
||||
#ifndef NODOCX
|
||||
|
||||
#endif
|
||||
|
||||
#include "ContentTypes/File.h"
|
||||
#include "FileType.h"
|
||||
#include "External\External.h"
|
||||
#include "External\HyperLink.h"
|
||||
#include "Media\Image.h"
|
||||
#include "Media\OleObject.h"
|
||||
#include "FileTypes.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
UnknowTypeFile IFileContainer::unknow;
|
||||
|
||||
void IFileContainer::read(const CPath& filename)
|
||||
{
|
||||
OOX::Rels::File rels(filename);
|
||||
read(rels, filename.GetDirectory());
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::read(const Rels::File& rels, const CPath& path)
|
||||
{
|
||||
#ifndef NODOCX
|
||||
|
||||
|
||||
size_t nCount = rels.Relations.m_items.GetCount();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
add(rels.Relations.m_items[i].rId(), OOX::CreateFile(path, rels.Relations.m_items[i]));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::write(const CPath& filename, const CPath& directory, ContentTypes::File& content) const
|
||||
{
|
||||
OOX::Rels::File rels;
|
||||
CPath current = filename.GetDirectory();
|
||||
write(rels, current, directory, content);
|
||||
rels.write(filename);
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::write(Rels::File& rels, const CPath& curdir, const CPath& directory, ContentTypes::File& content) const
|
||||
{
|
||||
CAtlMap<CString, size_t> namepair;
|
||||
|
||||
POSITION pos = m_container.GetStartPosition();
|
||||
while (NULL != pos)
|
||||
{
|
||||
const CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_container.GetNext(pos);
|
||||
|
||||
smart_ptr<OOX::File> pFile = pPair->m_value;
|
||||
smart_ptr<OOX::External> pExt = pFile.smart_dynamic_cast<OOX::External>();
|
||||
|
||||
if (!pExt.IsInit())
|
||||
{
|
||||
OOX::CPath defdir = pFile->DefaultDirectory();
|
||||
OOX::CPath name = pFile->DefaultFileName();
|
||||
|
||||
CAtlMap<CString, size_t>::CPair* pNamePair = namepair.Lookup(name.m_strFilename);
|
||||
if (NULL == pNamePair)
|
||||
namepair.SetAt(name.m_strFilename, 1);
|
||||
else
|
||||
name = name + pNamePair->m_key;
|
||||
|
||||
OOX::CSystemUtility::CreateDirectories(curdir / defdir);
|
||||
pFile->write(curdir / defdir / name, directory / defdir, content);
|
||||
rels.registration(pPair->m_key, pFile->type(), defdir / name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
rels.registration(pPair->m_key, pExt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::Commit(const CPath& path)
|
||||
{
|
||||
CAtlMap<CString, size_t> namepair;
|
||||
|
||||
POSITION pos = m_container.GetStartPosition();
|
||||
while (NULL != pos)
|
||||
{
|
||||
CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_container.GetNext(pos);
|
||||
|
||||
smart_ptr<OOX::File> pFile = pPair->m_value;
|
||||
smart_ptr<OOX::External> pExt = pFile.smart_dynamic_cast<OOX::External>();
|
||||
|
||||
if (!pExt.IsInit())
|
||||
{
|
||||
OOX::CPath defdir = pFile->DefaultDirectory();
|
||||
OOX::CPath name = pFile->DefaultFileName();
|
||||
|
||||
CAtlMap<CString, size_t>::CPair* pNamePair = namepair.Lookup(name.m_strFilename);
|
||||
if (NULL == pNamePair)
|
||||
namepair.SetAt(name.m_strFilename, 1);
|
||||
else
|
||||
name = name + pNamePair->m_key;
|
||||
|
||||
OOX::CSystemUtility::CreateDirectories(path / defdir);
|
||||
|
||||
smart_ptr<OOX::IFileBuilder> fileBuilder = pPair->m_value.smart_dynamic_cast<OOX::IFileBuilder>();
|
||||
if (fileBuilder.is_init())
|
||||
fileBuilder->Commit(path / defdir / name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::Finalize(const CPath& filename, const CPath& directory, ContentTypes::File& content)
|
||||
{
|
||||
OOX::Rels::File rels;
|
||||
CPath current = filename.GetDirectory();
|
||||
Finalize(rels, current, directory, content);
|
||||
rels.write(filename);
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::Finalize(Rels::File& rels, const OOX::CPath& curdir, const OOX::CPath& directory, ContentTypes::File& content)
|
||||
{
|
||||
CAtlMap<CString, size_t> namepair;
|
||||
|
||||
POSITION pos = m_container.GetStartPosition();
|
||||
while (NULL != pos)
|
||||
{
|
||||
CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_container.GetNext(pos);
|
||||
|
||||
smart_ptr<OOX::File> pFile = pPair->m_value;
|
||||
smart_ptr<OOX::External> pExt = pFile.smart_dynamic_cast<OOX::External>();
|
||||
|
||||
if (!pExt.IsInit())
|
||||
{
|
||||
OOX::CPath defdir = pFile->DefaultDirectory();
|
||||
OOX::CPath name = pFile->DefaultFileName();
|
||||
|
||||
CAtlMap<CString, size_t>::CPair* pNamePair = namepair.Lookup(name.m_strFilename);
|
||||
if (NULL == pNamePair)
|
||||
namepair.SetAt(name.m_strFilename, 1);
|
||||
else
|
||||
name = name + pNamePair->m_key;
|
||||
|
||||
OOX::CSystemUtility::CreateDirectories(curdir / defdir);
|
||||
|
||||
smart_ptr<OOX::IFileBuilder> fileBuilder = pFile.smart_dynamic_cast<OOX::IFileBuilder>();
|
||||
|
||||
if ( fileBuilder.is_init() )
|
||||
{
|
||||
fileBuilder->Finalize(curdir / defdir / name, directory / defdir, content);
|
||||
}
|
||||
else
|
||||
{
|
||||
pFile->write(curdir / defdir / name, directory / defdir, content);
|
||||
}
|
||||
|
||||
rels.registration(pPair->m_key, pFile->type(), defdir / name);
|
||||
}
|
||||
else
|
||||
{
|
||||
rels.registration(pPair->m_key, pExt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::extractPictures(const OOX::CPath& path) const
|
||||
{
|
||||
POSITION pos = m_container.GetStartPosition();
|
||||
while (NULL != pos)
|
||||
{
|
||||
smart_ptr<OOX::File> pFile = m_container.GetNextValue(pos);
|
||||
|
||||
smart_ptr<Image> pImage = pFile.smart_dynamic_cast<Image>();
|
||||
if (pImage.is_init())
|
||||
{
|
||||
pImage->copy_to(path);
|
||||
continue;
|
||||
}
|
||||
smart_ptr<IFileContainer> pExt = pFile.smart_dynamic_cast<IFileContainer>();
|
||||
if (pExt.is_init())
|
||||
{
|
||||
pExt->extractPictures(path);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
smart_ptr<Image> IFileContainer::image(const RId& rId) const
|
||||
{
|
||||
const CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_container.Lookup(rId.get());
|
||||
if (NULL == pPair)
|
||||
return smart_ptr<Image>();
|
||||
return pPair->m_value.smart_dynamic_cast<Image>();
|
||||
}
|
||||
|
||||
smart_ptr<HyperLink> IFileContainer::hyperlink(const RId& rId) const
|
||||
{
|
||||
const CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_container.Lookup(rId.get());
|
||||
if (NULL == pPair)
|
||||
return smart_ptr<HyperLink>();
|
||||
return pPair->m_value.smart_dynamic_cast<HyperLink>();
|
||||
}
|
||||
|
||||
smart_ptr<OleObject> IFileContainer::oleObject(const RId& rId) const
|
||||
{
|
||||
const CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_container.Lookup(rId.get());
|
||||
if (NULL == pPair)
|
||||
return smart_ptr<OleObject>();
|
||||
return pPair->m_value.smart_dynamic_cast<OleObject>();
|
||||
}
|
||||
|
||||
const bool IFileContainer::exist(const FileType& type) const
|
||||
{
|
||||
POSITION pos = m_container.GetStartPosition();
|
||||
while (NULL != pos)
|
||||
{
|
||||
const CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_container.GetNext(pos);
|
||||
if (type == pPair->m_value->type())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
const bool IFileContainer::exist(const RId& rId) const
|
||||
{
|
||||
const CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_container.Lookup(rId.get());
|
||||
return (NULL != pPair);
|
||||
}
|
||||
|
||||
|
||||
const bool IFileContainer::isExternal(const OOX::RId& rId) const
|
||||
{
|
||||
const CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_container.Lookup(rId.get());
|
||||
|
||||
if (NULL != pPair)
|
||||
{
|
||||
CString type = pPair->m_value->type().RelationType();
|
||||
CString name = pPair->m_value->type().DefaultFileName().m_strFilename;
|
||||
|
||||
return (((type == OOX::FileTypes::ExternalAudio.RelationType()) || (type == OOX::FileTypes::ExternalImage.RelationType())
|
||||
|| (type == OOX::FileTypes::ExternalVideo.RelationType())) && (name == _T("")));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
smart_ptr<OOX::File> IFileContainer::get(const FileType& type)
|
||||
{
|
||||
POSITION pos = m_container.GetStartPosition();
|
||||
while (NULL != pos)
|
||||
{
|
||||
CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_container.GetNext(pos);
|
||||
if (type == pPair->m_value->type())
|
||||
return pPair->m_value;
|
||||
}
|
||||
return smart_ptr<OOX::File>(new UnknowTypeFile(unknow));
|
||||
}
|
||||
|
||||
|
||||
const RId IFileContainer::add(const smart_ptr<OOX::File>& file)
|
||||
{
|
||||
const RId rId = maxRId().next();
|
||||
add(rId, file);
|
||||
return rId;
|
||||
}
|
||||
|
||||
|
||||
void IFileContainer::add(const OOX::RId rId, const smart_ptr<OOX::File>& file)
|
||||
{
|
||||
|
||||
m_container.SetAt(rId.get(), file);
|
||||
}
|
||||
|
||||
|
||||
smart_ptr<OOX::File> IFileContainer::find(const FileType& type) const
|
||||
{
|
||||
POSITION pos = m_container.GetStartPosition();
|
||||
while (NULL != pos)
|
||||
{
|
||||
const CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_container.GetNext(pos);
|
||||
if (type == pPair->m_value->type())
|
||||
return pPair->m_value;
|
||||
}
|
||||
return smart_ptr<OOX::File>((OOX::File*)new UnknowTypeFile());
|
||||
}
|
||||
|
||||
smart_ptr<OOX::File> IFileContainer::find(const OOX::RId& rId) const
|
||||
{
|
||||
const CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_container.Lookup(rId.get());
|
||||
if (NULL != pPair)
|
||||
return pPair->m_value;
|
||||
|
||||
smart_ptr<OOX::File> pointer;
|
||||
return pointer;
|
||||
}
|
||||
|
||||
|
||||
smart_ptr<OOX::File> IFileContainer::operator [](const OOX::RId rId)
|
||||
{
|
||||
CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_container.Lookup(rId.get());
|
||||
if (NULL != pPair)
|
||||
return pPair->m_value;
|
||||
|
||||
smart_ptr<OOX::File> pointer;
|
||||
return pointer;
|
||||
}
|
||||
|
||||
|
||||
smart_ptr<OOX::File> IFileContainer::operator [](const FileType& type)
|
||||
{
|
||||
return find(type);
|
||||
}
|
||||
|
||||
const RId IFileContainer::maxRId()
|
||||
{
|
||||
++m_lMaxRid;
|
||||
return RId(m_lMaxRid);
|
||||
}
|
||||
|
||||
} // namespace OOX
|
||||
129
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/IFileContainer.h
Normal file
129
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/IFileContainer.h
Normal file
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* (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 OOX_IFILE_CONTAINER_INCLUDE_H_
|
||||
#define OOX_IFILE_CONTAINER_INCLUDE_H_
|
||||
|
||||
#include "RId.h"
|
||||
#include "UnknowTypeFile.h"
|
||||
#include "IFileBuilder.h"
|
||||
|
||||
namespace OOX {class File;}
|
||||
namespace OOX {class FileType;}
|
||||
namespace OOX {namespace Rels {class File;}}
|
||||
namespace OOX {namespace ContentTypes {class File;}}
|
||||
namespace OOX {class Image;}
|
||||
namespace OOX {class HyperLink;}
|
||||
namespace OOX {class OleObject;}
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class IFileContainer
|
||||
{
|
||||
public:
|
||||
IFileContainer()
|
||||
{
|
||||
m_lMaxRid = 0;
|
||||
}
|
||||
virtual ~IFileContainer()
|
||||
{
|
||||
}
|
||||
protected:
|
||||
CAtlMap<CString, smart_ptr<OOX::File>> m_container;
|
||||
size_t m_lMaxRid;
|
||||
|
||||
protected:
|
||||
void read(const OOX::CPath& filename);
|
||||
void read(const Rels::File& rels, const CPath& path);
|
||||
void write(const CPath& filename, const CPath& directory, ContentTypes::File& content) const;
|
||||
void write(Rels::File& rels, const CPath& current, const CPath& directory, ContentTypes::File& content) const;
|
||||
|
||||
protected:
|
||||
void Commit(const CPath& path);
|
||||
void Finalize(const CPath& filename, const CPath& directory, ContentTypes::File& content);
|
||||
void Finalize(Rels::File& rels, const CPath& current, const CPath& directory, ContentTypes::File& content);
|
||||
|
||||
public:
|
||||
void extractPictures(const CPath& path) const;
|
||||
|
||||
public:
|
||||
virtual smart_ptr<Image> image(const RId& rId) const;
|
||||
|
||||
virtual smart_ptr<HyperLink> hyperlink(const RId& rId) const;
|
||||
|
||||
virtual smart_ptr<OleObject> oleObject(const RId& rId) const;
|
||||
public:
|
||||
template<typename T> const bool exist() const;
|
||||
const bool exist(const FileType& type) const;
|
||||
const bool exist(const OOX::RId& rId) const;
|
||||
const bool isExternal(const OOX::RId& rId) const;
|
||||
|
||||
smart_ptr<OOX::File> get(const FileType& type);
|
||||
const RId add(const smart_ptr<OOX::File>& file);
|
||||
void add(const OOX::RId rId, const smart_ptr<OOX::File>& file);
|
||||
|
||||
smart_ptr<OOX::File> find(const FileType& type) const;
|
||||
|
||||
smart_ptr<OOX::File> find(const OOX::RId& type) const;
|
||||
|
||||
smart_ptr<OOX::File> operator [](const OOX::RId rId);
|
||||
|
||||
smart_ptr<OOX::File> operator [](const FileType& type);
|
||||
|
||||
template<typename T> T& find();
|
||||
|
||||
protected:
|
||||
static UnknowTypeFile unknow;
|
||||
|
||||
private:
|
||||
const RId maxRId();
|
||||
};
|
||||
|
||||
|
||||
template<typename T>
|
||||
const bool IFileContainer::exist() const
|
||||
{
|
||||
T file;
|
||||
return exist(file.type());
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T& IFileContainer::find()
|
||||
{
|
||||
T file;
|
||||
return dynamic_cast<T&>(find(file.type()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // OOX_IFILE_CONTAINER_INCLUDE_H_
|
||||
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* (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 OOX_AUDIO_INCLUDE_H_
|
||||
#define OOX_AUDIO_INCLUDE_H_
|
||||
|
||||
#include "Media.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class Audio : public Media
|
||||
{
|
||||
public:
|
||||
Audio()
|
||||
{
|
||||
}
|
||||
Audio(const CPath& filename)
|
||||
{
|
||||
read(filename);
|
||||
}
|
||||
virtual ~Audio()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::Audio;
|
||||
}
|
||||
virtual const CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const CPath DefaultFileName() const
|
||||
{
|
||||
return m_filename.GetFilename();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_AUDIO_INCLUDE_H_
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* (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 OOX_IMAGE_INCLUDE_H_
|
||||
#define OOX_IMAGE_INCLUDE_H_
|
||||
|
||||
#include "Media.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class Image : public Media
|
||||
{
|
||||
public:
|
||||
Image()
|
||||
{
|
||||
}
|
||||
Image(const CPath& filename)
|
||||
{
|
||||
read(filename);
|
||||
}
|
||||
virtual ~Image()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void write(const CPath& filename, const CPath& directory, ContentTypes::File& content) const
|
||||
{
|
||||
CString newFilename = filename.GetFilename();
|
||||
CPath newFilePath = filename.GetDirectory();
|
||||
|
||||
newFilename.Replace((TCHAR)' ', (TCHAR)'_');
|
||||
if (CSystemUtility::IsFileExist(m_filename) && !CSystemUtility::IsFileExist(newFilePath/newFilename))
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::Image;
|
||||
}
|
||||
virtual const CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const CPath DefaultFileName() const
|
||||
{
|
||||
return m_filename.GetFilename();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_IMAGE_INCLUDE_H_
|
||||
103
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/Media/Media.h
Normal file
103
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/Media/Media.h
Normal file
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* (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 OOX_MEDIA_INCLUDE_H_
|
||||
#define OOX_MEDIA_INCLUDE_H_
|
||||
|
||||
#include "..\File.h"
|
||||
#include "..\FileTypes.h"
|
||||
|
||||
#ifdef AVS_OFFICE_SVM_FILE
|
||||
#include "OfficeSvmFile.h"
|
||||
#include "SvmConverter.h"
|
||||
#endif
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class Media : public File
|
||||
{
|
||||
public:
|
||||
Media()
|
||||
{
|
||||
}
|
||||
Media(const CPath& filename)
|
||||
{
|
||||
read(filename);
|
||||
}
|
||||
virtual ~Media()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const CPath& filename)
|
||||
{
|
||||
m_filename = filename;
|
||||
}
|
||||
virtual void write(const CPath& filename, const CPath& directory, ContentTypes::File& content) const
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public:
|
||||
const CPath filename() const
|
||||
{
|
||||
return m_filename;
|
||||
}
|
||||
void copy_to(const CPath& path) const
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected:
|
||||
CPath m_filename;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_MEDIA_INCLUDE_H_
|
||||
@@ -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 OOX_OLE_OBJECT_INCLUDE_H_
|
||||
#define OOX_OLE_OBJECT_INCLUDE_H_
|
||||
|
||||
#include "Media.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class OleObject : public Media
|
||||
{
|
||||
public:
|
||||
OleObject()
|
||||
{
|
||||
}
|
||||
OleObject(const OOX::CPath& filename)
|
||||
{
|
||||
read(filename);
|
||||
}
|
||||
virtual ~OleObject()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::OleObject;
|
||||
}
|
||||
virtual const CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const CPath DefaultFileName() const
|
||||
{
|
||||
return m_filename.GetFilename();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_OLE_OBJECT_INCLUDE_H_
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* (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 OOX_VIDEO_INCLUDE_H_
|
||||
#define OOX_VIDEO_INCLUDE_H_
|
||||
|
||||
#include "Media.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class Video : public Media
|
||||
{
|
||||
public:
|
||||
Video()
|
||||
{
|
||||
}
|
||||
Video(const CPath& filename)
|
||||
{
|
||||
read(filename);
|
||||
}
|
||||
virtual ~Video()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::Video;
|
||||
}
|
||||
virtual const CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const CPath DefaultFileName() const
|
||||
{
|
||||
return m_filename.GetFilename();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_VIDEO_INCLUDE_H_
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* (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 OOX_NAMESPACE_OWN_INCLUDE_H_
|
||||
#define OOX_NAMESPACE_OWN_INCLUDE_H_
|
||||
|
||||
#include "Namespaces.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class NamespaceOwn
|
||||
{
|
||||
protected:
|
||||
|
||||
};
|
||||
|
||||
|
||||
static Namespaces g_Namespaces;
|
||||
}
|
||||
|
||||
#endif // OOX_NAMESPACE_OWN_INCLUDE_H_
|
||||
134
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/Namespaces.h
Normal file
134
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/Namespaces.h
Normal file
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* (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 OOX_NAMESPACES_INCLUDE_H_
|
||||
#define OOX_NAMESPACES_INCLUDE_H_
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/Base/Base.h"
|
||||
#include <atlstr.h>
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class Namespace
|
||||
{
|
||||
public:
|
||||
CString m_strName;
|
||||
CString m_strLink;
|
||||
|
||||
public:
|
||||
Namespace(LPCSTR sName, LPCSTR sLink) : m_strName(sName), m_strLink(sLink)
|
||||
{
|
||||
}
|
||||
Namespace(LPCWSTR sName, LPCWSTR sLink) : m_strName(sName), m_strLink(sLink)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class Namespaces
|
||||
{
|
||||
public:
|
||||
Namespaces() : a("a", "http://schemas.openxmlformats.org/drawingml/2006/main"),
|
||||
b("b", "http://schemas.openxmlformats.org/officeDocument/2006/bibliography"),
|
||||
cdr("cdr", "http://schemas.openxmlformats.org/drawingml/2006/chartDrawing"),
|
||||
cp("cp", "http://schemas.openxmlformats.org/package/2006/metadata/core-properties"),
|
||||
dc("dc", "http://purl.org/dc/elements/1.1/"),
|
||||
dchrt("dchrt", "http://schemas.openxmlformats.org/drawingml/2006/chart"),
|
||||
dcmitype("dcmitype", "http://purl.org/dc/dcmitype/"),
|
||||
dcterms("dcterms", "http://purl.org/dc/terms/"),
|
||||
ddgrm("ddgrm", "http://schemas.openxmlformats.org/drawingml/2006/diagram"),
|
||||
dgm("dgm", "http://schemas.openxmlformats.org/drawingml/2006/diagram"),
|
||||
dlckcnv("dlckcnv", "http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas"),
|
||||
dpct("dpct", "http://schemas.openxmlformats.org/drawingml/2006/picture"),
|
||||
ds("ds", "http://schemas.openxmlformats.org/officeDocument/2006/customXml"),
|
||||
m("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"),
|
||||
o("o", "urn:schemas-microsoft-com:office:office"),
|
||||
p("p", "http://schemas.openxmlformats.org/presentationml/2006/main"),
|
||||
pic("pic", "http://schemas.openxmlformats.org/drawingml/2006/picture"),
|
||||
pvml("pvml", "urn:schemas-microsoft-com:office:powerpoint"),
|
||||
r("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"),
|
||||
s("s", "http://schemas.openxmlformats.org/officeDocument/2006/sharedTypes"),
|
||||
sl("sl", "http://schemas.openxmlformats.org/schemaLibrary/2006/main"),
|
||||
v("v", "urn:schemas-microsoft-com:vml"),
|
||||
ve("ve", "http://schemas.openxmlformats.org/markup-compatibility/2006"),
|
||||
vp("vp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"),
|
||||
vt("vt", "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"),
|
||||
w("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"),
|
||||
w10("w10", "urn:schemas-microsoft-com:office:word"),
|
||||
wne("wne", "http://schemas.microsoft.com/office/word/2006/wordml"),
|
||||
wp("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"),
|
||||
x("x", "urn:schemas-microsoft-com:office:excel"),
|
||||
xdr("xdr", "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"),
|
||||
xmlns("xmlns", "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"),
|
||||
xsd("xsd", "http://www.w3.org/2001/XMLSchema"),
|
||||
xsi("xsi", "http://www.w3.org/2001/XMLSchema-instance")
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
const Namespace a;
|
||||
const Namespace b;
|
||||
const Namespace cdr;
|
||||
const Namespace cp;
|
||||
const Namespace dc;
|
||||
const Namespace dchrt;
|
||||
const Namespace dcmitype;
|
||||
const Namespace dcterms;
|
||||
const Namespace ddgrm;
|
||||
const Namespace dgm;
|
||||
const Namespace dlckcnv;
|
||||
const Namespace dpct;
|
||||
const Namespace ds;
|
||||
const Namespace m;
|
||||
const Namespace o;
|
||||
const Namespace p;
|
||||
const Namespace pic;
|
||||
const Namespace pvml;
|
||||
const Namespace r;
|
||||
const Namespace s;
|
||||
const Namespace sl;
|
||||
const Namespace v;
|
||||
const Namespace ve;
|
||||
const Namespace vp;
|
||||
const Namespace vt;
|
||||
const Namespace w;
|
||||
const Namespace w10;
|
||||
const Namespace wne;
|
||||
const Namespace wp;
|
||||
const Namespace x;
|
||||
const Namespace xdr;
|
||||
const Namespace xmlns;
|
||||
const Namespace xsd;
|
||||
const Namespace xsi;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_NAMESPACES_INCLUDE_H_
|
||||
134
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/RId.h
Normal file
134
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/RId.h
Normal file
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* (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 OOX_RID_INCLUDE_H_
|
||||
#define OOX_RID_INCLUDE_H_
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/Base/Base.h"
|
||||
#include "../../../Common/DocxFormat/Source/XML/XmlUtils.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class RId
|
||||
{
|
||||
public:
|
||||
RId() : m_id(_T("rId0"))
|
||||
{
|
||||
}
|
||||
RId(const size_t id)
|
||||
{
|
||||
m_id = _T("rId") + XmlUtils::UIntToString(id);
|
||||
}
|
||||
RId(const CString& rid)
|
||||
{
|
||||
m_id = rid;
|
||||
}
|
||||
RId(const RId& oSrc)
|
||||
{
|
||||
m_id = oSrc.m_id;
|
||||
}
|
||||
|
||||
public:
|
||||
const RId& operator= (const size_t id)
|
||||
{
|
||||
m_id = _T("rId") + XmlUtils::UIntToString(id);
|
||||
return *this;
|
||||
}
|
||||
const RId& operator= (const CString& rid)
|
||||
{
|
||||
m_id = rid;
|
||||
return *this;
|
||||
}
|
||||
const RId& operator= (const BSTR& rid)
|
||||
{
|
||||
m_id = (CString)rid;
|
||||
return *this;
|
||||
}
|
||||
const RId& operator= (const RId& oSrc)
|
||||
{
|
||||
m_id = oSrc.m_id;
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
const bool operator ==(const RId& lhs) const
|
||||
{
|
||||
return m_id == lhs.m_id;
|
||||
}
|
||||
const bool operator !=(const RId& lhs) const
|
||||
{
|
||||
return m_id != lhs.m_id;
|
||||
}
|
||||
const bool operator < (const RId& lhs) const
|
||||
{
|
||||
return m_id < lhs.m_id;
|
||||
}
|
||||
const bool operator <=(const RId& lhs) const
|
||||
{
|
||||
return m_id <= lhs.m_id;
|
||||
}
|
||||
const bool operator >(const RId& lhs) const
|
||||
{
|
||||
return m_id > lhs.m_id;
|
||||
}
|
||||
const bool operator >=(const RId& lhs) const
|
||||
{
|
||||
return m_id >= lhs.m_id;
|
||||
}
|
||||
|
||||
AVSINLINE CString get() const { return m_id; }
|
||||
|
||||
public:
|
||||
const RId next() const
|
||||
{
|
||||
return RId(m_id + _T("1"));
|
||||
}
|
||||
|
||||
public:
|
||||
const CString ToString() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void toPPTY(BYTE type, T pWriter) const
|
||||
{
|
||||
pWriter->WriteBYTE(type);
|
||||
pWriter->WriteStringW(m_id);
|
||||
}
|
||||
|
||||
private:
|
||||
CString m_id;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_RID_INCLUDE_H_
|
||||
159
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/Rels/File.h
Normal file
159
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/Rels/File.h
Normal file
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
* (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 OOX_RELS_FILE_INCLUDE_H_
|
||||
#define OOX_RELS_FILE_INCLUDE_H_
|
||||
|
||||
#include "RelationTable.h"
|
||||
#include "./../FileType.h"
|
||||
#include "./../FileTypes.h"
|
||||
#include "./../RId.h"
|
||||
#include "./../External/External.h"
|
||||
|
||||
#include "../../../../Common/DocxFormat/Source/Base/SmartPtr.h"
|
||||
#include "../../../../Common/DocxFormat/Source/SystemUtility/SystemUtility.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
namespace Rels
|
||||
{
|
||||
class File
|
||||
{
|
||||
public:
|
||||
File()
|
||||
{
|
||||
}
|
||||
File(const CPath& filename)
|
||||
{
|
||||
read(filename);
|
||||
}
|
||||
~File()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
void read(const CPath& filename)
|
||||
{
|
||||
CPath strFile = createFileName(filename);
|
||||
|
||||
if (CSystemUtility::IsFileExist(strFile))
|
||||
{
|
||||
XmlUtils::CXmlNode oNode;
|
||||
if (oNode.FromXmlFile2(strFile.GetPath()))
|
||||
Relations = oNode;
|
||||
}
|
||||
}
|
||||
void read2(const CPath& filename)
|
||||
{
|
||||
CPath strFile = filename;
|
||||
|
||||
if (CSystemUtility::IsFileExist(strFile))
|
||||
{
|
||||
XmlUtils::CXmlNode oNode;
|
||||
if (oNode.FromXmlFile2(strFile.GetPath()))
|
||||
Relations = oNode;
|
||||
}
|
||||
}
|
||||
void write(const CPath& filename) const
|
||||
{
|
||||
if (0 < Relations.m_items.GetCount())
|
||||
{
|
||||
CPath file = createFileName(filename);
|
||||
CSystemUtility::CreateDirectories(file.GetDirectory());
|
||||
|
||||
XmlUtils::CXmlWriter oWriter;
|
||||
oWriter.WriteNodeBegin(_T("Relationship"), TRUE);
|
||||
oWriter.WriteAttribute(_T("xmlns"), _T("http://schemas.openxmlformats.org/package/2006/relationships"));
|
||||
oWriter.WriteNodeEnd(_T("Relationship"), FALSE, TRUE);
|
||||
|
||||
oWriter.WriteString(Relations.toXML());
|
||||
|
||||
oWriter.WriteNodeEnd(_T("Relationship"));
|
||||
|
||||
CDirectory::SaveToFile(file.GetPath(), oWriter.GetXmlString());
|
||||
}
|
||||
}
|
||||
const bool isValid() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public:
|
||||
void registration(const RId& rId, const FileType& type, const CPath& filename)
|
||||
{
|
||||
if(!(type == FileTypes::Unknow))
|
||||
{
|
||||
CString strFileName = filename.m_strFilename;
|
||||
CString strDir = filename.GetDirectory() + _T("");
|
||||
if (_T("") == filename.GetExtention())
|
||||
{
|
||||
if (type.RelationType() == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject")
|
||||
{
|
||||
strFileName += L".bin";
|
||||
Relations.registration(rId, type.RelationType(), strDir + strFileName);
|
||||
}
|
||||
else if (type.RelationType() =="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image")
|
||||
{
|
||||
strFileName += L".wmf" ;
|
||||
Relations.registration(rId, type.RelationType(), strDir + strFileName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
void registration(const RId& rId, const smart_ptr<External> external)
|
||||
{
|
||||
Relations.registration(rId, external);
|
||||
}
|
||||
|
||||
private:
|
||||
const CPath createFileName(const CPath& filename) const
|
||||
{
|
||||
CString strTemp = filename.GetDirectory() + _T("\\_rels\\");
|
||||
if (filename.GetFilename() == _T(""))
|
||||
strTemp += _T(".rels");
|
||||
else
|
||||
strTemp += (filename.GetFilename() + _T(".rels"));
|
||||
return strTemp;
|
||||
}
|
||||
|
||||
public:
|
||||
RelationTable Relations;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // OOX_RELS_FILE_INCLUDE_H_
|
||||
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* (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 OOX_RELS_RELATION_SHIP_INCLUDE_H_
|
||||
#define OOX_RELS_RELATION_SHIP_INCLUDE_H_
|
||||
|
||||
#include "./../WritingElement.h"
|
||||
#include "./../RId.h"
|
||||
#include "./../External/External.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
namespace Rels
|
||||
{
|
||||
class RelationShip : public WritingElement
|
||||
{
|
||||
public:
|
||||
RelationShip(const OOX::RId& rId, const CString& type, const OOX::CPath& filename) : m_rId(rId), m_target(filename), m_type(type)
|
||||
{
|
||||
m_target.m_strFilename.Replace(_T(" "), _T("_"));
|
||||
}
|
||||
RelationShip(const OOX::RId& rId, const smart_ptr<External> external): m_rId(rId), m_target(external->Uri()),
|
||||
m_type(external->type().RelationType())
|
||||
{
|
||||
m_mode = new CString(_T("External"));
|
||||
}
|
||||
virtual ~RelationShip()
|
||||
{
|
||||
}
|
||||
explicit RelationShip(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
}
|
||||
const RelationShip& operator =(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
m_rId = node.GetAttribute(_T("Id"));
|
||||
m_target = node.GetAttribute(_T("Target"));
|
||||
m_type = node.GetAttribute(_T("Type"));
|
||||
m_mode = node.GetAttribute(_T("TargetMode"), _T("Internal"));
|
||||
}
|
||||
virtual CString toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("Id"), m_rId.ToString());
|
||||
oAttr.Write(_T("Type"), m_type);
|
||||
oAttr.Write(_T("Target"), m_target.m_strFilename);
|
||||
oAttr.Write(_T("TargetMode"), m_mode);
|
||||
|
||||
return XmlUtils::CreateNode(_T("Relationship"), oAttr);
|
||||
}
|
||||
|
||||
public:
|
||||
const bool operator <(const RelationShip& rhs) const
|
||||
{
|
||||
return m_rId < rhs.m_rId;
|
||||
}
|
||||
|
||||
public:
|
||||
const CString type() const
|
||||
{
|
||||
return m_type;
|
||||
}
|
||||
const CPath filename() const
|
||||
{
|
||||
return m_target;
|
||||
}
|
||||
const CPath target() const
|
||||
{
|
||||
return m_target;
|
||||
}
|
||||
const bool isExternal()const
|
||||
{
|
||||
if (!m_mode.IsInit())
|
||||
return false;
|
||||
return (*m_mode == "External");
|
||||
}
|
||||
const RId rId() const
|
||||
{
|
||||
return m_rId;
|
||||
}
|
||||
|
||||
private:
|
||||
RId m_rId;
|
||||
CPath m_target;
|
||||
CString m_type;
|
||||
nullable_string m_mode;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // OOX_RELS_RELATION_SHIP_INCLUDE_H_
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* (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 OOX_RELS_RELATION_TABLE_INCLUDE_H_
|
||||
#define OOX_RELS_RELATION_TABLE_INCLUDE_H_
|
||||
|
||||
#include "./../WritingVector.h"
|
||||
#include "RelationShip.h"
|
||||
#include "./../RId.h"
|
||||
|
||||
namespace OOX {class External;}
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
namespace Rels
|
||||
{
|
||||
class RelationTable : public WritingVector<RelationShip>
|
||||
{
|
||||
public:
|
||||
RelationTable()
|
||||
{
|
||||
}
|
||||
virtual ~RelationTable()
|
||||
{
|
||||
}
|
||||
explicit RelationTable(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
}
|
||||
const RelationTable& operator =(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
void registration(const RId& rId, const CString& type, const CPath& filename)
|
||||
{
|
||||
m_items.Add(RelationShip(rId, type, filename));
|
||||
}
|
||||
void registration(const RId& rId, const smart_ptr<OOX::External> external)
|
||||
{
|
||||
m_items.Add(RelationShip(rId, external));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // OOX_RELS_RELATION_TABLE_INCLUDE_H_
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* (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 OOX_UNKNOW_TYPE_FILE_INCLUDE_H_
|
||||
#define OOX_UNKNOW_TYPE_FILE_INCLUDE_H_
|
||||
|
||||
#include "File.h"
|
||||
#include "FileTypes.h"
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
class UnknowTypeFile : public File
|
||||
{
|
||||
public:
|
||||
UnknowTypeFile()
|
||||
{
|
||||
}
|
||||
virtual ~UnknowTypeFile()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const CPath& filename)
|
||||
{
|
||||
}
|
||||
virtual void write(const CPath& filename, const CPath& directory, ContentTypes::File& content) const
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const FileType type() const
|
||||
{
|
||||
return FileTypes::Unknow;
|
||||
}
|
||||
virtual const CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_UNKNOW_TYPE_FILE_INCLUDE_H_
|
||||
214
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/WritingElement.h
Normal file
214
ActiveX/ASCOfficePPTXFile/PPTXFormat/DocxFormat/WritingElement.h
Normal file
@@ -0,0 +1,214 @@
|
||||
/*
|
||||
* (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
|
||||
|
||||
#include "NamespaceOwn.h"
|
||||
#include "../../../Common/DocxFormat/Source/XML/XmlUtils.h"
|
||||
#include "atlstr.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
#define WritingElement_AdditionConstructors(Class) \
|
||||
Class(XmlUtils::CXmlNode& oNode)\
|
||||
{\
|
||||
fromXML( oNode );\
|
||||
}\
|
||||
const Class& operator =(const XmlUtils::CXmlNode &oNode)\
|
||||
{\
|
||||
fromXML( (XmlUtils::CXmlNode &)oNode );\
|
||||
return *this;\
|
||||
}
|
||||
|
||||
#define WritingElement_ReadNode( oRootNode, oChildNode, sNodeName, oValue ) \
|
||||
if ( oRootNode.GetNode( sNodeName, oChildNode ) )\
|
||||
oValue = oChildNode;
|
||||
|
||||
#define WritingElement_WriteNode_1( sStartNodeString, oValue ) \
|
||||
if ( oValue.IsInit() )\
|
||||
{\
|
||||
sResult += sStartNodeString;\
|
||||
sResult += oValue->ToString();\
|
||||
sResult += _T("/>");\
|
||||
}
|
||||
|
||||
#define WritingElement_WriteNode_2( oValue ) \
|
||||
if ( oValue.IsInit() )\
|
||||
sResult += oValue->toXML();
|
||||
|
||||
enum EElementType
|
||||
{
|
||||
et_Unknown,
|
||||
|
||||
et_Default,
|
||||
et_Override,
|
||||
|
||||
et_a_graphic,
|
||||
|
||||
et_ds_schemaRef,
|
||||
et_ds_schemaRefs,
|
||||
|
||||
et_p_pic,
|
||||
|
||||
et_w_abstractNum,
|
||||
et_w_annotationRef,
|
||||
et_w_background,
|
||||
et_w_bdo,
|
||||
et_w_bookmarkEnd,
|
||||
et_w_bookmarkStart,
|
||||
et_w_br,
|
||||
et_w_checkBox,
|
||||
et_w_cols,
|
||||
et_w_comboBox,
|
||||
et_w_commentRangeEnd,
|
||||
et_w_commentRangeStart,
|
||||
et_w_commentReference,
|
||||
et_w_contentPart,
|
||||
et_w_continuationSeparator,
|
||||
et_w_customXmlDelRangeEnd,
|
||||
et_w_customXmlDelRangeStart,
|
||||
et_w_customXmlInsRangeEnd,
|
||||
et_w_customXmlInsRangeStart,
|
||||
et_w_customXmlMoveFromRangeEnd,
|
||||
et_w_customXmlMoveFromRangeStart,
|
||||
et_w_customXmlMoveToRangeEnd,
|
||||
et_w_customXmlMoveToRangeStart,
|
||||
et_w_cr,
|
||||
et_w_date,
|
||||
et_w_dayLong,
|
||||
et_w_dayShort,
|
||||
et_w_ddList,
|
||||
et_w_delInstrText,
|
||||
et_w_delText,
|
||||
et_w_docDefaults,
|
||||
et_w_docPartList,
|
||||
et_w_dropDownList,
|
||||
et_w_endnote,
|
||||
et_w_endnotePr,
|
||||
et_w_endnoteRef,
|
||||
et_w_endnoteReference,
|
||||
et_w_ffData,
|
||||
et_w_fldChar,
|
||||
et_w_fldSimple,
|
||||
et_w_font,
|
||||
et_w_footnote,
|
||||
et_w_footnotePr,
|
||||
et_w_footnoteRef,
|
||||
et_w_footnoteReference,
|
||||
et_w_ftr,
|
||||
et_w_hdr,
|
||||
et_w_headers,
|
||||
et_w_hyperlink,
|
||||
et_w_instrText,
|
||||
et_w_latentStyles,
|
||||
et_w_lastRenderedPageBreak,
|
||||
et_w_lvl,
|
||||
et_w_lvlOverride,
|
||||
et_w_monthLong,
|
||||
et_w_monthShort,
|
||||
et_w_moveFromRangeEnd,
|
||||
et_w_moveFromRangeStart,
|
||||
et_w_moveToRangeEnd,
|
||||
et_w_moveToRangeStart,
|
||||
et_w_num,
|
||||
et_w_numPr,
|
||||
et_w_nonBreakHyphen,
|
||||
et_w_object,
|
||||
et_w_p,
|
||||
et_w_pBdr,
|
||||
et_w_permEnd,
|
||||
et_w_permStart,
|
||||
et_w_pgBorders,
|
||||
et_w_pgNum,
|
||||
et_w_placeholder,
|
||||
et_w_pPr,
|
||||
et_w_pPrChange,
|
||||
et_w_proofErr,
|
||||
et_w_ptab,
|
||||
et_w_r,
|
||||
et_w_ruby,
|
||||
et_w_rPr,
|
||||
et_w_rPrChange,
|
||||
et_w_sdt,
|
||||
et_w_sdtContent,
|
||||
et_w_sdtEndPr,
|
||||
et_w_sdtPr,
|
||||
et_w_sectPr,
|
||||
et_w_sectPrChange,
|
||||
et_w_separator,
|
||||
et_w_softHyphen,
|
||||
et_w_style,
|
||||
et_w_sym,
|
||||
et_w_t,
|
||||
et_w_tab,
|
||||
et_w_tabs,
|
||||
et_w_tbl,
|
||||
et_w_tblBorders,
|
||||
et_w_tblCellMar,
|
||||
et_w_tblGrid,
|
||||
et_w_tblGridChange,
|
||||
et_w_tblPr,
|
||||
et_w_tblPrChange,
|
||||
et_w_tblPrEx,
|
||||
et_w_tblPrExChange,
|
||||
et_w_tblStylePr,
|
||||
et_w_tc,
|
||||
et_w_tcBorders,
|
||||
et_w_tcMar,
|
||||
et_w_tcPr,
|
||||
et_w_tcPrChange,
|
||||
et_w_textInput,
|
||||
et_w_tr,
|
||||
et_w_trPr,
|
||||
et_w_trPrChange,
|
||||
et_w_yearLong,
|
||||
et_w_yearShort,
|
||||
|
||||
et_wp_docPr,
|
||||
et_wp_effectExtent,
|
||||
et_wp_extent,
|
||||
et_wp_wrapPolygon,
|
||||
};
|
||||
|
||||
class WritingElement
|
||||
{
|
||||
public:
|
||||
WritingElement(){}
|
||||
virtual ~WritingElement() {}
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node) = 0;
|
||||
virtual CString toXML() const = 0;
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return OOX::et_Unknown;
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* (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 OOX_WRITING_VECTOR_INCLUDE_H_
|
||||
#define OOX_WRITING_VECTOR_INCLUDE_H_
|
||||
|
||||
#include "WritingElement.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
template <typename T>
|
||||
class WritingVector : public WritingElement
|
||||
{
|
||||
public:
|
||||
CAtlArray<T> m_items;
|
||||
|
||||
public:
|
||||
WritingVector() : m_items() {}
|
||||
virtual ~WritingVector() {}
|
||||
explicit WritingVector(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
}
|
||||
|
||||
WritingVector& operator =(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
fromXML(node);
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
XmlUtils::CXmlNodes oNodes;
|
||||
if (node.GetNodes(_T("*"), oNodes))
|
||||
{
|
||||
int nCount = oNodes.GetCount();
|
||||
|
||||
for (int i = 0; i < nCount; ++i)
|
||||
{
|
||||
XmlUtils::CXmlNode nodeTemp;
|
||||
oNodes.GetAt(i, nodeTemp);
|
||||
|
||||
m_items.Add(T(nodeTemp));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual CString toXML() const
|
||||
{
|
||||
CString strResult = _T("");
|
||||
size_t nCount = m_items.GetCount();
|
||||
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
strResult += m_items[i].toXML();
|
||||
}
|
||||
|
||||
return strResult;
|
||||
}
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_Unknown;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OOX_WRITING_VECTOR_INCLUDE_H_
|
||||
229
ActiveX/ASCOfficePPTXFile/PPTXFormat/FileContainer.cpp
Normal file
229
ActiveX/ASCOfficePPTXFile/PPTXFormat/FileContainer.cpp
Normal file
@@ -0,0 +1,229 @@
|
||||
/*
|
||||
* (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
|
||||
*
|
||||
*/
|
||||
#include "./stdafx.h"
|
||||
|
||||
#include "FileContainer.h"
|
||||
#include "DocxFormat/Rels/File.h"
|
||||
#include "FileFactory.h"
|
||||
#include "DocxFormat/ContentTypes/File.h"
|
||||
#include "DocxFormat/FileType.h"
|
||||
#include "DocxFormat/FileTypes.h"
|
||||
#include "DocxFormat/External/Hyperlink.h"
|
||||
#include "WrapperFile.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
void FileContainer::read(const OOX::CPath& filename)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void FileContainer::read(const OOX::Rels::File& rels, const OOX::CPath& path)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void FileContainer::read(const OOX::CPath& filename, FileMap& map, IPPTXEvent* Event)
|
||||
{
|
||||
OOX::Rels::File rels(filename);
|
||||
OOX::CPath path = filename.GetDirectory();
|
||||
read(rels, path, map, Event);
|
||||
}
|
||||
|
||||
void FileContainer::read(const OOX::Rels::File& rels, const OOX::CPath& path, FileMap& map, IPPTXEvent* Event)
|
||||
{
|
||||
bool bIsSlide = false;
|
||||
OOX::File* pSrcFile = dynamic_cast<OOX::File*>(this);
|
||||
if (NULL != pSrcFile)
|
||||
bIsSlide = (pSrcFile->type() == OOX::FileTypes::Slide) ? true : false;
|
||||
|
||||
size_t nCount = rels.Relations.m_items.GetCount();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
const OOX::Rels::RelationShip* pRelation = &(rels.Relations.m_items[i]);
|
||||
OOX::CPath normPath = path / pRelation->target();
|
||||
|
||||
CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = map.find(normPath);
|
||||
|
||||
if (bIsSlide && (pRelation->type() == OOX::FileTypes::Slide))
|
||||
{
|
||||
long percent = Event->GetPercent();
|
||||
|
||||
smart_ptr<OOX::File> file = smart_ptr<OOX::File>(new OOX::HyperLink(pRelation->target()));
|
||||
|
||||
bool res = Event->Progress(0, percent + m_lPercent);
|
||||
if (res)
|
||||
{
|
||||
m_bCancelled = true;
|
||||
break;
|
||||
}
|
||||
|
||||
add(pRelation->rId(), file);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (NULL != pPair)
|
||||
{
|
||||
add(pRelation->rId(), pPair->m_value);
|
||||
}
|
||||
else
|
||||
{
|
||||
long percent = Event->GetPercent();
|
||||
|
||||
smart_ptr<OOX::File> file = PPTX::FileFactory::CreateFilePPTX(path, *pRelation, map);
|
||||
bool res = Event->Progress(0, percent + m_lPercent);
|
||||
if (res)
|
||||
{
|
||||
m_bCancelled = true;
|
||||
break;
|
||||
}
|
||||
|
||||
map.add(normPath, file);
|
||||
add(pRelation->rId(), file);
|
||||
|
||||
smart_ptr<FileContainer> pContainer = file.smart_dynamic_cast<FileContainer>();
|
||||
if (pContainer.IsInit())
|
||||
{
|
||||
pContainer->m_lPercent = m_lPercent;
|
||||
Event->AddPercent(m_lPercent);
|
||||
|
||||
pContainer->read(normPath, map, Event);
|
||||
m_bCancelled = pContainer->m_bCancelled;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FileContainer::write(const OOX::CPath& filename, const OOX::CPath& directory, OOX::ContentTypes::File& content) const
|
||||
{
|
||||
OOX::Rels::File rels;
|
||||
OOX::CPath current = filename.GetDirectory();
|
||||
write(rels, current, directory, content);
|
||||
rels.write(filename);
|
||||
}
|
||||
|
||||
void FileContainer::write(OOX::Rels::File& rels, const OOX::CPath& curdir, const OOX::CPath& directory, OOX::ContentTypes::File& content) const
|
||||
{
|
||||
CAtlMap<CString, size_t> namepair;
|
||||
|
||||
POSITION pos = m_container.GetStartPosition();
|
||||
while (NULL != pos)
|
||||
{
|
||||
const CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = m_container.GetNext(pos);
|
||||
|
||||
smart_ptr<OOX::File> pFile = pPair->m_value;
|
||||
smart_ptr<OOX::External> pExt = pFile.smart_dynamic_cast<OOX::External>();
|
||||
|
||||
if (!pExt.IsInit())
|
||||
{
|
||||
smart_ptr<PPTX::WrapperFile> file = pFile.smart_dynamic_cast<PPTX::WrapperFile>();
|
||||
|
||||
if (file.IsInit())
|
||||
{
|
||||
if (file->GetWrittenStatus() == false)
|
||||
{
|
||||
OOX::CPath defdir = pFile->DefaultDirectory();
|
||||
OOX::CPath name = pFile->DefaultFileName();
|
||||
|
||||
|
||||
|
||||
OOX::CSystemUtility::CreateDirectories(directory / defdir);
|
||||
pFile->write(directory / defdir / name, directory, content);
|
||||
rels.registration(pPair->m_key, pFile->type(), defdir / name);
|
||||
}
|
||||
else
|
||||
{
|
||||
OOX::CPath defdir = pFile->DefaultDirectory();
|
||||
OOX::CPath name = file->GetWrittenFileName();
|
||||
|
||||
rels.registration(pPair->m_key, pFile->type(), defdir / name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
OOX::CPath defdir = pFile->DefaultDirectory();
|
||||
OOX::CPath name = pFile->DefaultFileName();
|
||||
|
||||
OOX::CSystemUtility::CreateDirectories(directory / defdir);
|
||||
pFile->write(directory / defdir / name, directory, content);
|
||||
rels.registration(pPair->m_key, pFile->type(), defdir / name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rels.registration(pPair->m_key, pExt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FileContainer::WrittenSetFalse()
|
||||
{
|
||||
POSITION pos = m_container.GetStartPosition();
|
||||
while (NULL != pos)
|
||||
{
|
||||
smart_ptr<OOX::File> pFile = m_container.GetNextValue(pos);
|
||||
|
||||
smart_ptr<PPTX::WrapperFile> pWrapFile = pFile.smart_dynamic_cast<PPTX::WrapperFile>();
|
||||
smart_ptr<PPTX::FileContainer> pWrapCont = pFile.smart_dynamic_cast<PPTX::FileContainer>();
|
||||
|
||||
if (pWrapFile.is_init() && !pWrapFile->GetWrittenStatus())
|
||||
{
|
||||
pWrapFile->WrittenSetFalse();
|
||||
|
||||
if (pWrapCont.is_init())
|
||||
{
|
||||
pWrapCont->WrittenSetFalse();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CCommonRels::_read(const OOX::Rels::File& rels, const OOX::CPath& path)
|
||||
{
|
||||
size_t nCount = rels.Relations.m_items.GetCount();
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
const OOX::Rels::RelationShip* pRelation = &(rels.Relations.m_items[i]);
|
||||
|
||||
smart_ptr<OOX::File> _file = PPTX::FileFactory::CreateFilePPTX_OnlyMedia(path, *pRelation);
|
||||
add(pRelation->rId(), _file);
|
||||
}
|
||||
}
|
||||
|
||||
void CCommonRels::_read(const OOX::CPath& filename)
|
||||
{
|
||||
OOX::Rels::File rels(filename);
|
||||
OOX::CPath path = filename.GetDirectory();
|
||||
_read(rels, path);
|
||||
}
|
||||
} // namespace PPTX
|
||||
80
ActiveX/ASCOfficePPTXFile/PPTXFormat/FileContainer.h
Normal file
80
ActiveX/ASCOfficePPTXFile/PPTXFormat/FileContainer.h
Normal 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_IFILE_CONTAINER_INCLUDE_H_
|
||||
#define PPTX_IFILE_CONTAINER_INCLUDE_H_
|
||||
|
||||
#include "DocxFormat/IFileContainer.h"
|
||||
#include "FileMap.h"
|
||||
#include "PPTXEvent.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class FileContainer : public OOX::IFileContainer
|
||||
{
|
||||
public:
|
||||
FileContainer()
|
||||
{
|
||||
m_lPercent = 0;
|
||||
m_bCancelled = false;
|
||||
}
|
||||
virtual ~FileContainer()
|
||||
{
|
||||
}
|
||||
protected:
|
||||
void read(const OOX::CPath& filename);
|
||||
void read(const OOX::Rels::File& rels, const OOX::CPath& path);
|
||||
|
||||
void read(const OOX::CPath& filename, FileMap& map, IPPTXEvent* Event);
|
||||
void read(const OOX::Rels::File& rels, const OOX::CPath& path, FileMap& map, IPPTXEvent* Event);
|
||||
void write(const OOX::CPath& filename, const OOX::CPath& directory, OOX::ContentTypes::File& content) const;
|
||||
void write(OOX::Rels::File& rels, const OOX::CPath& current, const OOX::CPath& directory, OOX::ContentTypes::File& content) const;
|
||||
|
||||
void WrittenSetFalse();
|
||||
|
||||
long m_lPercent;
|
||||
bool m_bCancelled;
|
||||
};
|
||||
|
||||
class CCommonRels : public PPTX::FileContainer
|
||||
{
|
||||
public:
|
||||
CCommonRels() : PPTX::FileContainer()
|
||||
{
|
||||
}
|
||||
|
||||
void _read(const OOX::CPath& filename);
|
||||
void _read(const OOX::Rels::File& rels, const OOX::CPath& path);
|
||||
};
|
||||
}
|
||||
|
||||
#endif // PPTX_IFILE_CONTAINER_INCLUDE_H_
|
||||
158
ActiveX/ASCOfficePPTXFile/PPTXFormat/FileFactory.cpp
Normal file
158
ActiveX/ASCOfficePPTXFile/PPTXFormat/FileFactory.cpp
Normal file
@@ -0,0 +1,158 @@
|
||||
/*
|
||||
* (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
|
||||
*
|
||||
*/
|
||||
#include "./stdafx.h"
|
||||
|
||||
#include "FileFactory.h"
|
||||
#include "DocxFormat/File.h"
|
||||
#include "DocxFormat/FileTypes.h"
|
||||
#include "DocxFormat/Rels/RelationShip.h"
|
||||
#include "App.h"
|
||||
#include "Core.h"
|
||||
#include "Theme.h"
|
||||
#include "HandoutMaster.h"
|
||||
#include "Presentation.h"
|
||||
#include "PresProps.h"
|
||||
#include "SlideLayout.h"
|
||||
#include "SlideMaster.h"
|
||||
#include "Slide.h"
|
||||
#include "CommentAuthors.h"
|
||||
#include "Comments.h"
|
||||
#include "TableStyles.h"
|
||||
#include "ViewProps.h"
|
||||
#include "NotesSlide.h"
|
||||
#include "NotesMaster.h"
|
||||
#include "DocxFormat/Media/Image.h"
|
||||
#include "DocxFormat/Media/Audio.h"
|
||||
#include "DocxFormat/Media/Video.h"
|
||||
#include "DocxFormat/External/HyperLink.h"
|
||||
#include "DocxFormat/External/ExternalImage.h"
|
||||
#include "DocxFormat/External/ExternalAudio.h"
|
||||
#include "DocxFormat/External/ExternalVideo.h"
|
||||
#include "VmlDrawing.h"
|
||||
#include "DocxFormat/UnknowTypeFile.h"
|
||||
#include "FileMap.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
const smart_ptr<OOX::File> FileFactory::CreateFilePPTX(const OOX::CPath& path, const OOX::Rels::RelationShip& relation, FileMap& map)
|
||||
{
|
||||
OOX::CPath filename = path / relation.filename();
|
||||
|
||||
if (relation.type() == OOX::FileTypes::App)
|
||||
return smart_ptr<OOX::File>(new PPTX::App(filename, map));
|
||||
else if (relation.type() == OOX::FileTypes::Core)
|
||||
return smart_ptr<OOX::File>(new PPTX::Core(filename, map));
|
||||
else if (relation.type() == OOX::FileTypes::Presentation)
|
||||
return smart_ptr<OOX::File>(new PPTX::Presentation(filename, map));
|
||||
else if (relation.type() == OOX::FileTypes::Theme)
|
||||
return smart_ptr<OOX::File>(new PPTX::Theme(filename, map));
|
||||
else if (relation.type() == OOX::FileTypes::SlideMaster)
|
||||
return smart_ptr<OOX::File>(new PPTX::SlideMaster(filename, map));
|
||||
else if (relation.type() == OOX::FileTypes::SlideLayout)
|
||||
return smart_ptr<OOX::File>(new PPTX::SlideLayout(filename, map));
|
||||
else if (relation.type() == OOX::FileTypes::Slide)
|
||||
return smart_ptr<OOX::File>(new PPTX::Slide(filename, map));
|
||||
else if (relation.type() == OOX::FileTypes::HandoutMaster)
|
||||
return smart_ptr<OOX::File>(new PPTX::HandoutMaster(filename, map));
|
||||
else if (relation.type() == OOX::FileTypes::NotesMaster)
|
||||
return smart_ptr<OOX::File>(new PPTX::NotesMaster(filename, map));
|
||||
else if (relation.type() == OOX::FileTypes::NotesSlide)
|
||||
return smart_ptr<OOX::File>(new PPTX::NotesSlide(filename, map));
|
||||
else if (relation.type() == OOX::FileTypes::PresProps)
|
||||
return smart_ptr<OOX::File>(new PPTX::PresProps(filename, map));
|
||||
else if (relation.type() == OOX::FileTypes::ViewProps)
|
||||
return smart_ptr<OOX::File>(new PPTX::ViewProps(filename, map));
|
||||
else if (relation.type() == OOX::FileTypes::TableStyles)
|
||||
return smart_ptr<OOX::File>(new PPTX::TableStyles(filename, map));
|
||||
else if (relation.type() == OOX::FileTypes::VmlDrawing)
|
||||
return smart_ptr<OOX::File>(new PPTX::VmlDrawing(filename, map));
|
||||
else if (relation.type() == OOX::FileTypes::HyperLink)
|
||||
return smart_ptr<OOX::File>(new OOX::HyperLink(relation.target()));
|
||||
else if ((relation.type() == OOX::FileTypes::ExternalImage) && (relation.isExternal()))
|
||||
return smart_ptr<OOX::File>(new OOX::ExternalImage(relation.target()));
|
||||
else if ((relation.type() == OOX::FileTypes::ExternalAudio) && (relation.isExternal()))
|
||||
return smart_ptr<OOX::File>(new OOX::ExternalAudio(relation.target()));
|
||||
else if ((relation.type() == OOX::FileTypes::ExternalVideo) && (relation.isExternal()))
|
||||
return smart_ptr<OOX::File>(new OOX::ExternalVideo(relation.target()));
|
||||
else if (relation.type() == OOX::FileTypes::Image)
|
||||
return smart_ptr<OOX::File>(new OOX::Image(filename));
|
||||
else if (relation.type() == OOX::FileTypes::Audio)
|
||||
return smart_ptr<OOX::File>(new OOX::Audio(filename));
|
||||
else if (relation.type() == OOX::FileTypes::Video)
|
||||
return smart_ptr<OOX::File>(new OOX::Video(filename));
|
||||
else if (relation.type() == OOX::FileTypes::Media)
|
||||
return smart_ptr<OOX::File>(new OOX::HyperLink(filename));
|
||||
else if (relation.type() == OOX::FileTypes::Data)
|
||||
return smart_ptr<OOX::File>(new OOX::Image(filename));
|
||||
else if (relation.type() == OOX::FileTypes::DrawingDiag)
|
||||
return smart_ptr<OOX::File>(new OOX::Image(filename));
|
||||
else if (relation.type() == OOX::FileTypes::Chart)
|
||||
return smart_ptr<OOX::File>(new OOX::Image(filename));
|
||||
else if (relation.type() == OOX::FileTypes::CommentAuthors)
|
||||
return smart_ptr<OOX::File>(new PPTX::Authors(filename, map));
|
||||
else if (relation.type() == OOX::FileTypes::SlideComments)
|
||||
return smart_ptr<OOX::File>(new PPTX::Comments(filename, map));
|
||||
|
||||
return smart_ptr<OOX::File>(new OOX::UnknowTypeFile());
|
||||
}
|
||||
|
||||
const smart_ptr<OOX::File> FileFactory::CreateFilePPTX_OnlyMedia(const OOX::CPath& path, const OOX::Rels::RelationShip& relation)
|
||||
{
|
||||
bool bIsDownload = false;
|
||||
CString strFile = relation.filename().GetPath();
|
||||
int n1 = strFile.Find(_T("www"));
|
||||
int n2 = strFile.Find(_T("http"));
|
||||
int n3 = strFile.Find(_T("ftp"));
|
||||
int n4 = strFile.Find(_T("https://"));
|
||||
|
||||
if (((n1 >= 0) && (n1 < 10)) || ((n2 >= 0) && (n2 < 10)) || ((n3 >= 0) && (n3 < 10)) || ((n4 >= 0) && (n4 < 10)))
|
||||
bIsDownload = true;
|
||||
|
||||
OOX::CPath filename = path / relation.filename();
|
||||
|
||||
if (bIsDownload)
|
||||
filename = relation.filename();
|
||||
|
||||
CString strT = relation.type();
|
||||
|
||||
if (strT == OOX::FileTypes::Image ||
|
||||
strT == OOX::FileTypes::Data ||
|
||||
strT == OOX::FileTypes::DrawingDiag ||
|
||||
strT == OOX::FileTypes::Chart)
|
||||
{
|
||||
return smart_ptr<OOX::File>(new OOX::Image(filename));
|
||||
}
|
||||
|
||||
return smart_ptr<OOX::File>(new OOX::UnknowTypeFile());
|
||||
}
|
||||
|
||||
} // namespace PPTX
|
||||
51
ActiveX/ASCOfficePPTXFile/PPTXFormat/FileFactory.h
Normal file
51
ActiveX/ASCOfficePPTXFile/PPTXFormat/FileFactory.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* (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_FILE_FACTORY_INCLUDE_H_
|
||||
#define PPTX_FILE_FACTORY_INCLUDE_H_
|
||||
|
||||
#include "DocxFormat/File.h"
|
||||
|
||||
|
||||
namespace OOX {namespace Rels {class RelationShip;}}
|
||||
namespace PPTX {class FileMap;}
|
||||
namespace PPTX
|
||||
{
|
||||
class FileFactory
|
||||
{
|
||||
public:
|
||||
static const smart_ptr<OOX::File> CreateFilePPTX(const OOX::CPath& path, const OOX::Rels::RelationShip& relation, FileMap& map);
|
||||
static const smart_ptr<OOX::File> CreateFilePPTX_OnlyMedia(const OOX::CPath& path, const OOX::Rels::RelationShip& relation);
|
||||
};
|
||||
}
|
||||
|
||||
#endif // PPTX_FILE_FACTORY_INCLUDE_H_
|
||||
32
ActiveX/ASCOfficePPTXFile/PPTXFormat/FileMap.cpp
Normal file
32
ActiveX/ASCOfficePPTXFile/PPTXFormat/FileMap.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* (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
|
||||
*
|
||||
*/
|
||||
|
||||
69
ActiveX/ASCOfficePPTXFile/PPTXFormat/FileMap.h
Normal file
69
ActiveX/ASCOfficePPTXFile/PPTXFormat/FileMap.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* (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_FILEMAP_INCLUDE_H_
|
||||
#define PPTX_FILEMAP_INCLUDE_H_
|
||||
|
||||
#include "DocxFormat/File.h"
|
||||
namespace PPTX
|
||||
{
|
||||
class FileMap
|
||||
{
|
||||
public:
|
||||
FileMap()
|
||||
{
|
||||
}
|
||||
|
||||
~FileMap()
|
||||
{
|
||||
}
|
||||
public:
|
||||
CAtlMap<CString, smart_ptr<OOX::File>> m_map;
|
||||
|
||||
public:
|
||||
|
||||
AVSINLINE CAtlMap<CString, smart_ptr<OOX::File>>::CPair* find(const OOX::CPath& path)
|
||||
{
|
||||
return m_map.Lookup(path.m_strFilename);
|
||||
}
|
||||
|
||||
AVSINLINE void add(const OOX::CPath& key, const smart_ptr<OOX::File>& value)
|
||||
{
|
||||
m_map.SetAt(key.m_strFilename, value);
|
||||
}
|
||||
|
||||
AVSINLINE bool empty() const {return m_map.IsEmpty();}
|
||||
AVSINLINE size_t size() const {return m_map.GetCount();}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // PPTX_FILEMAP_INCLUDE_H_
|
||||
189
ActiveX/ASCOfficePPTXFile/PPTXFormat/Folder.cpp
Normal file
189
ActiveX/ASCOfficePPTXFile/PPTXFormat/Folder.cpp
Normal file
@@ -0,0 +1,189 @@
|
||||
/*
|
||||
* (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
|
||||
*
|
||||
*/
|
||||
#include "./stdafx.h"
|
||||
|
||||
#include "Folder.h"
|
||||
#include "DocxFormat/Rels/File.h"
|
||||
#include "FileMap.h"
|
||||
#include "DocxFormat/FileTypes.h"
|
||||
#include "Presentation.h"
|
||||
#include "Theme.h"
|
||||
#include "SlideMaster.h"
|
||||
#include "SlideLayout.h"
|
||||
#include "Slide.h"
|
||||
#include "NotesMaster.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
Folder::Folder()
|
||||
{
|
||||
}
|
||||
|
||||
Folder::Folder(const OOX::CPath& path, IPPTXEvent* Event)
|
||||
{
|
||||
read(path, Event);
|
||||
}
|
||||
|
||||
void Folder::read(const OOX::CPath& path, IPPTXEvent* Event)
|
||||
{
|
||||
OOX::Rels::File rels(path);
|
||||
PPTX::FileMap map;
|
||||
long files = CountFiles(path);
|
||||
if(files == 0)
|
||||
return;
|
||||
m_lPercent = 1000000 / files;
|
||||
FileContainer::read(rels, path, map, Event);
|
||||
if(m_bCancelled)
|
||||
return;
|
||||
|
||||
POSITION pos = NULL;
|
||||
smart_ptr<PPTX::Presentation> _presentation = FileContainer::get(OOX::FileTypes::Presentation).smart_dynamic_cast<PPTX::Presentation>();
|
||||
if (_presentation.is_init())
|
||||
{
|
||||
_presentation->commentAuthors = _presentation->get(OOX::FileTypes::CommentAuthors).smart_dynamic_cast<PPTX::Authors>();
|
||||
}
|
||||
|
||||
pos = map.m_map.GetStartPosition();
|
||||
while (NULL != pos)
|
||||
{
|
||||
CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = map.m_map.GetNext(pos);
|
||||
const OOX::FileType& curType = pPair->m_value->type();
|
||||
|
||||
if (OOX::FileTypes::ThemePPTX == curType)
|
||||
{
|
||||
smart_ptr<PPTX::Theme> pTheme = pPair->m_value.smart_dynamic_cast<PPTX::Theme>();
|
||||
if (pTheme.IsInit())
|
||||
pTheme->Presentation = _presentation;
|
||||
}
|
||||
}
|
||||
|
||||
pos = map.m_map.GetStartPosition();
|
||||
while (NULL != pos)
|
||||
{
|
||||
CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = map.m_map.GetNext(pos);
|
||||
const OOX::FileType& curType = pPair->m_value->type();
|
||||
|
||||
if (OOX::FileTypes::SlideMaster == curType)
|
||||
{
|
||||
smart_ptr<PPTX::SlideMaster> pointer = pPair->m_value.smart_dynamic_cast<PPTX::SlideMaster>();
|
||||
if (pointer.is_init())
|
||||
pointer->ApplyRels();
|
||||
}
|
||||
}
|
||||
|
||||
pos = map.m_map.GetStartPosition();
|
||||
while (NULL != pos)
|
||||
{
|
||||
CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = map.m_map.GetNext(pos);
|
||||
const OOX::FileType& curType = pPair->m_value->type();
|
||||
|
||||
if (OOX::FileTypes::SlideLayout == curType)
|
||||
{
|
||||
smart_ptr<PPTX::SlideLayout> pointer = pPair->m_value.smart_dynamic_cast<PPTX::SlideLayout>();
|
||||
if (pointer.is_init())
|
||||
pointer->ApplyRels();
|
||||
}
|
||||
}
|
||||
|
||||
pos = map.m_map.GetStartPosition();
|
||||
while (NULL != pos)
|
||||
{
|
||||
CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = map.m_map.GetNext(pos);
|
||||
const OOX::FileType& curType = pPair->m_value->type();
|
||||
|
||||
if (OOX::FileTypes::Slide == curType)
|
||||
{
|
||||
smart_ptr<PPTX::Slide> pointer = pPair->m_value.smart_dynamic_cast<PPTX::Slide>();
|
||||
if (pointer.is_init())
|
||||
pointer->ApplyRels();
|
||||
}
|
||||
}
|
||||
|
||||
pos = map.m_map.GetStartPosition();
|
||||
while (NULL != pos)
|
||||
{
|
||||
CAtlMap<CString, smart_ptr<OOX::File>>::CPair* pPair = map.m_map.GetNext(pos);
|
||||
const OOX::FileType& curType = pPair->m_value->type();
|
||||
|
||||
if (OOX::FileTypes::NotesMaster == curType)
|
||||
{
|
||||
smart_ptr<PPTX::NotesMaster> pointer = pPair->m_value.smart_dynamic_cast<PPTX::NotesMaster>();
|
||||
if (pointer.is_init())
|
||||
pointer->ApplyRels();
|
||||
}
|
||||
}
|
||||
|
||||
Event->Progress(0, 1000000);
|
||||
}
|
||||
|
||||
void Folder::write(const OOX::CPath& path)
|
||||
{
|
||||
OOX::CSystemUtility::CreateDirectories(path);
|
||||
|
||||
OOX::Rels::File rels;
|
||||
OOX::ContentTypes::File content;
|
||||
|
||||
OOX::CPath dir = path;
|
||||
FileContainer::write(rels, path, dir, content);
|
||||
|
||||
rels.write(path / _T("/"));
|
||||
content.write(path);
|
||||
FileContainer::WrittenSetFalse();
|
||||
}
|
||||
|
||||
void Folder::createFromTemplate(const OOX::CPath& path)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
const bool Folder::isValid(const OOX::CPath& path) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void Folder::extractPictures(const OOX::CPath& path)
|
||||
{
|
||||
OOX::CSystemUtility::CreateDirectories(path);
|
||||
FileContainer::extractPictures(path);
|
||||
}
|
||||
|
||||
void Folder::extractPictures(const OOX::CPath& source, const OOX::CPath& path)
|
||||
{
|
||||
|
||||
extractPictures(path);
|
||||
}
|
||||
|
||||
long Folder::CountFiles(const OOX::CPath& path)
|
||||
{
|
||||
return OOX::CSystemUtility::GetFilesCount(path.GetDirectory(), true);
|
||||
}
|
||||
} // namespace PPTX
|
||||
63
ActiveX/ASCOfficePPTXFile/PPTXFormat/Folder.h
Normal file
63
ActiveX/ASCOfficePPTXFile/PPTXFormat/Folder.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* (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_FOLDER_INCLUDE_H_
|
||||
#define PPTX_FOLDER_INCLUDE_H_
|
||||
|
||||
#include "FileContainer.h"
|
||||
#include "DocxFormat/RId.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class Folder : public PPTX::FileContainer
|
||||
{
|
||||
public:
|
||||
Folder();
|
||||
Folder(const OOX::CPath& path, IPPTXEvent* Event);
|
||||
|
||||
public:
|
||||
void read(const OOX::CPath& path, IPPTXEvent* Event);
|
||||
void write(const OOX::CPath& path);
|
||||
void createFromTemplate(const OOX::CPath& path);
|
||||
|
||||
public:
|
||||
const bool isValid(const OOX::CPath& path) const;
|
||||
|
||||
public:
|
||||
void extractPictures(const OOX::CPath& path);
|
||||
void extractPictures(const OOX::CPath& source, const OOX::CPath& path);
|
||||
private:
|
||||
long CountFiles(const OOX::CPath& path);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //PPTX_FOLDER_INCLUDE_H_
|
||||
119
ActiveX/ASCOfficePPTXFile/PPTXFormat/HandoutMaster.h
Normal file
119
ActiveX/ASCOfficePPTXFile/PPTXFormat/HandoutMaster.h
Normal file
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
* (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_SLIDES_HANDOUTMASTER_INCLUDE_H_
|
||||
#define PPTX_SLIDES_HANDOUTMASTER_INCLUDE_H_
|
||||
|
||||
#include "WrapperFile.h"
|
||||
#include "FileContainer.h"
|
||||
|
||||
#include "Logic/ClrMap.h"
|
||||
#include "Logic/CSld.h"
|
||||
#include "Logic/Hf.h"
|
||||
|
||||
#include "DocxFormat/FileTypes.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
class HandoutMaster : public WrapperFile, public PPTX::FileContainer
|
||||
{
|
||||
public:
|
||||
HandoutMaster()
|
||||
{
|
||||
}
|
||||
HandoutMaster(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
read(filename, map);
|
||||
}
|
||||
virtual ~HandoutMaster()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void read(const OOX::CPath& filename, FileMap& map)
|
||||
{
|
||||
|
||||
XmlUtils::CXmlNode oNode;
|
||||
oNode.FromXmlFile2(filename.m_strFilename);
|
||||
|
||||
cSld = oNode.ReadNode(_T("p:cSld"));
|
||||
cSld.SetParentFilePointer(this);
|
||||
|
||||
clrMap = oNode.ReadNode(_T("p:clrMap"));
|
||||
clrMap.SetParentFilePointer(this);
|
||||
|
||||
hf = oNode.ReadNode(_T("p:hf"));
|
||||
|
||||
if (hf.is_init())
|
||||
hf->SetParentFilePointer(this);
|
||||
}
|
||||
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, OOX::ContentTypes::File& content)const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
oAttr.Write(_T("xmlns:a"), OOX::g_Namespaces.a.m_strLink);
|
||||
oAttr.Write(_T("xmlns:r"), OOX::g_Namespaces.r.m_strLink);
|
||||
|
||||
XmlUtils::CNodeValue oValue;
|
||||
oValue.Write(cSld);
|
||||
oValue.Write(clrMap);
|
||||
oValue.WriteNullable(hf);
|
||||
|
||||
XmlUtils::SaveToFile(filename.m_strFilename, XmlUtils::CreateNode(_T("p:handoutMaster"), oAttr, oValue));
|
||||
|
||||
content.registration(type().OverrideType(), directory, filename);
|
||||
m_written = true;
|
||||
m_WrittenFileName = filename.GetFilename();
|
||||
FileContainer::write(filename, directory, content);
|
||||
}
|
||||
|
||||
public:
|
||||
virtual const OOX::FileType type() const
|
||||
{
|
||||
return OOX::FileTypes::HandoutMaster;
|
||||
}
|
||||
virtual const OOX::CPath DefaultDirectory() const
|
||||
{
|
||||
return type().DefaultDirectory();
|
||||
}
|
||||
virtual const OOX::CPath DefaultFileName() const
|
||||
{
|
||||
return type().DefaultFileName();
|
||||
}
|
||||
|
||||
public:
|
||||
Logic::CSld cSld;
|
||||
Logic::ClrMap clrMap;
|
||||
nullable<Logic::HF> hf;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // PPTX_SLIDES_HANDOUTMASTER_INCLUDE_H_
|
||||
70
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/AlbumLayout.h
Normal file
70
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/AlbumLayout.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* (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_LIMIT_ALBUMLAYOUT_INCLUDE_H_
|
||||
#define PPTX_LIMIT_ALBUMLAYOUT_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class AlbumLayout : public BaseLimit
|
||||
{
|
||||
public:
|
||||
AlbumLayout()
|
||||
{
|
||||
m_strValue = _T("fitToSlide");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("1pic") == strValue) ||
|
||||
(_T("1picTitle") == strValue) ||
|
||||
(_T("2pic") == strValue) ||
|
||||
(_T("2picTitle") == strValue) ||
|
||||
(_T("4pic") == strValue) ||
|
||||
(_T("4picTitle") == strValue) ||
|
||||
(_T("fitToSlide") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_ALBUMLAYOUT_INCLUDE_H_
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* (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_LIMIT_ANIMATIONDGMBUILD_INCLUDE_H_
|
||||
#define PPTX_LIMIT_ANIMATIONDGMBUILD_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class AnimationDgmBuild : public BaseLimit
|
||||
{
|
||||
public:
|
||||
AnimationDgmBuild()
|
||||
{
|
||||
m_strValue = _T("allAtOnce");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((strValue == _T("allAtOnce")) ||
|
||||
(strValue == _T("lvlAtOnce")) ||
|
||||
(strValue == _T("lvlOne")) ||
|
||||
(strValue == _T("one")))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_ANIMATIONDGMBUILD_INCLUDE_H_
|
||||
122
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/BWMode.h
Normal file
122
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/BWMode.h
Normal file
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
* (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_LIMIT_BWMODE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_BWMODE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class BWMode : public BaseLimit
|
||||
{
|
||||
public:
|
||||
BWMode()
|
||||
{
|
||||
m_strValue = _T("auto");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("auto") == strValue) ||
|
||||
(_T("black") == strValue) ||
|
||||
(_T("blackGray") == strValue) ||
|
||||
(_T("blackWhite") == strValue) ||
|
||||
(_T("clr") == strValue) ||
|
||||
(_T("gray") == strValue) ||
|
||||
(_T("grayWhite") == strValue) ||
|
||||
(_T("hidden") == strValue) ||
|
||||
(_T("invGray") == strValue) ||
|
||||
(_T("ltGray") == strValue) ||
|
||||
(_T("white") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("auto") == m_strValue)
|
||||
return 0;
|
||||
if (_T("black") == m_strValue)
|
||||
return 1;
|
||||
if (_T("blackGray") == m_strValue)
|
||||
return 2;
|
||||
if (_T("blackWhite") == m_strValue)
|
||||
return 3;
|
||||
if (_T("clr") == m_strValue)
|
||||
return 4;
|
||||
if (_T("gray") == m_strValue)
|
||||
return 5;
|
||||
if (_T("grayWhite") == m_strValue)
|
||||
return 6;
|
||||
if (_T("hidden") == m_strValue)
|
||||
return 7;
|
||||
if (_T("invGray") == m_strValue)
|
||||
return 8;
|
||||
if (_T("ltGray") == m_strValue)
|
||||
return 9;
|
||||
if (_T("white") == m_strValue)
|
||||
return 10;
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 0: m_strValue = _T("auto"); break;
|
||||
case 1: m_strValue = _T("black"); break;
|
||||
case 2: m_strValue = _T("blackGray"); break;
|
||||
case 3: m_strValue = _T("blackWhite"); break;
|
||||
case 4: m_strValue = _T("clr"); break;
|
||||
case 5: m_strValue = _T("gray"); break;
|
||||
case 6: m_strValue = _T("grayWhite"); break;
|
||||
case 7: m_strValue = _T("hidden"); break;
|
||||
case 8: m_strValue = _T("invGray"); break;
|
||||
case 9: m_strValue = _T("ltGray"); break;
|
||||
case 10: m_strValue = _T("white"); break;
|
||||
default:
|
||||
m_strValue = _T("auto");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_BWMODE_INCLUDE_H_
|
||||
105
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/BaseLimit.h
Normal file
105
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/BaseLimit.h
Normal 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_LIMIT_BASE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_BASE_INCLUDE_H_
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/Base/Base.h"
|
||||
|
||||
#define _USE_STRING_OPERATOR \
|
||||
virtual void operator=(const CString& value) \
|
||||
{ \
|
||||
set(value); \
|
||||
} \
|
||||
virtual void operator=(const BSTR& value) \
|
||||
{ \
|
||||
set((CString)value); \
|
||||
}
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class BaseLimit
|
||||
{
|
||||
public:
|
||||
BaseLimit(const CString& str = _T("")) : m_strValue(str)
|
||||
{
|
||||
}
|
||||
|
||||
BaseLimit(const BaseLimit& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
|
||||
BaseLimit& operator=(const BaseLimit& oSrc)
|
||||
{
|
||||
m_strValue = oSrc.m_strValue;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void operator=(const CString& str)
|
||||
{
|
||||
set(str);
|
||||
}
|
||||
AVSINLINE void _set(const CString& strValue)
|
||||
{
|
||||
set(strValue);
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void set(const CString& strValue) = 0;
|
||||
|
||||
AVSINLINE CString& get()
|
||||
{
|
||||
return m_strValue;
|
||||
}
|
||||
AVSINLINE const CString& get() const
|
||||
{
|
||||
return m_strValue;
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
CString m_strValue;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_BASE_INCLUDE_H_
|
||||
103
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/BevelType.h
Normal file
103
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/BevelType.h
Normal file
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* (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_LIMIT_BEVELTYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_BEVELTYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class BevelType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
BevelType()
|
||||
{
|
||||
m_strValue = _T("circle");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("angle") == strValue) ||
|
||||
(_T("artDeco") == strValue) ||
|
||||
(_T("circle") == strValue) ||
|
||||
(_T("convex") == strValue) ||
|
||||
(_T("coolSlant") == strValue) ||
|
||||
(_T("cross") == strValue) ||
|
||||
(_T("divot") == strValue) ||
|
||||
(_T("hardEdge") == strValue) ||
|
||||
(_T("relaxedInset") == strValue) ||
|
||||
(_T("riblet") == strValue) ||
|
||||
(_T("slope") == strValue) ||
|
||||
(_T("softRound") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("angle") == m_strValue)
|
||||
return 0;
|
||||
if (_T("artDeco") == m_strValue)
|
||||
return 1;
|
||||
if (_T("circle") == m_strValue)
|
||||
return 2;
|
||||
if (_T("convex") == m_strValue)
|
||||
return 3;
|
||||
if (_T("coolSlant") == m_strValue)
|
||||
return 4;
|
||||
if (_T("cross") == m_strValue)
|
||||
return 5;
|
||||
if (_T("divot") == m_strValue)
|
||||
return 6;
|
||||
if (_T("hardEdge") == m_strValue)
|
||||
return 7;
|
||||
if (_T("relaxedInset") == m_strValue)
|
||||
return 8;
|
||||
if (_T("riblet") == m_strValue)
|
||||
return 9;
|
||||
if (_T("slope") == m_strValue)
|
||||
return 10;
|
||||
if (_T("softRound") == m_strValue)
|
||||
return 11;
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_BEVELTYPE_INCLUDE_H_
|
||||
83
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/BlendMode.h
Normal file
83
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/BlendMode.h
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* (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_LIMIT_BLENDMODE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_BLENDMODE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class BlendMode : public BaseLimit
|
||||
{
|
||||
public:
|
||||
BlendMode()
|
||||
{
|
||||
m_strValue = _T("screen");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("darken") == strValue) ||
|
||||
(_T("lighten") == strValue) ||
|
||||
(_T("mult") == strValue) ||
|
||||
(_T("over") == strValue) ||
|
||||
(_T("screen") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("darken") == m_strValue)
|
||||
return 0;
|
||||
if (_T("lighten") == m_strValue)
|
||||
return 1;
|
||||
if (_T("mult") == m_strValue)
|
||||
return 2;
|
||||
if (_T("over") == m_strValue)
|
||||
return 3;
|
||||
if (_T("screen") == m_strValue)
|
||||
return 4;
|
||||
return 4;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_BLENDMODE_INCLUDE_H_
|
||||
82
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/BlipCompression.h
Normal file
82
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/BlipCompression.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* (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_LIMIT_BLIPCOMPRESSION_INCLUDE_H_
|
||||
#define PPTX_LIMIT_BLIPCOMPRESSION_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class BlipCompression : public BaseLimit
|
||||
{
|
||||
public:
|
||||
BlipCompression()
|
||||
{
|
||||
m_strValue = _T("none");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("none") == strValue) ||
|
||||
(_T("email") == strValue) ||
|
||||
(_T("hqprint") == strValue) ||
|
||||
(_T("print") == strValue) ||
|
||||
(_T("screen") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("none") == m_strValue)
|
||||
return 0;
|
||||
if (_T("email") == m_strValue)
|
||||
return 1;
|
||||
if (_T("hqprint") == m_strValue)
|
||||
return 2;
|
||||
if (_T("print") == m_strValue)
|
||||
return 3;
|
||||
if (_T("screen") == m_strValue)
|
||||
return 4;
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_BLIPCOMPRESSION_INCLUDE_H_
|
||||
125
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/CameraType.h
Normal file
125
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/CameraType.h
Normal file
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* (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_LIMIT_CAMERATYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_CAMERATYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class CameraType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
CameraType()
|
||||
{
|
||||
m_strValue = _T("legacyObliqueFront");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void CameraType::set(const CString& strValue)
|
||||
{
|
||||
if ((_T("isometricBottomDown") == strValue) ||
|
||||
(_T("isometricBottomUp") == strValue) ||
|
||||
(_T("isometricLeftDown") == strValue) ||
|
||||
(_T("isometricLeftUp") == strValue) ||
|
||||
(_T("isometricOffAxis1Left") == strValue) ||
|
||||
(_T("isometricOffAxis1Right") == strValue) ||
|
||||
(_T("isometricOffAxis1Top") == strValue) ||
|
||||
(_T("isometricOffAxis2Left") == strValue) ||
|
||||
(_T("isometricOffAxis2Right") == strValue) ||
|
||||
(_T("isometricOffAxis2Top") == strValue) ||
|
||||
(_T("isometricOffAxis3Bottom") == strValue) ||
|
||||
(_T("isometricOffAxis3Left") == strValue) ||
|
||||
(_T("isometricOffAxis3Right") == strValue) ||
|
||||
(_T("isometricOffAxis4Bottom") == strValue) ||
|
||||
(_T("isometricOffAxis4Left") == strValue) ||
|
||||
(_T("isometricOffAxis4Right") == strValue) ||
|
||||
(_T("isometricRightDown") == strValue) ||
|
||||
(_T("isometricRightUp") == strValue) ||
|
||||
(_T("isometricTopDown") == strValue) ||
|
||||
(_T("isometricTopUp") == strValue) ||
|
||||
(_T("legacyObliqueBottom") == strValue) ||
|
||||
(_T("legacyObliqueBottomLeft") == strValue) ||
|
||||
(_T("legacyObliqueBottomRight") == strValue) ||
|
||||
(_T("legacyObliqueFront") == strValue) ||
|
||||
(_T("legacyObliqueLeft") == strValue) ||
|
||||
(_T("legacyObliqueRight") == strValue) ||
|
||||
(_T("legacyObliqueTop") == strValue) ||
|
||||
(_T("legacyObliqueTopLeft") == strValue) ||
|
||||
(_T("legacyObliqueTopRight") == strValue) ||
|
||||
(_T("legacyPerspectiveBottom") == strValue) ||
|
||||
(_T("legacyPerspectiveBottomLeft") == strValue) ||
|
||||
(_T("legacyPerspectiveBottomRight") == strValue) ||
|
||||
(_T("legacyPerspectiveFront") == strValue) ||
|
||||
(_T("legacyPerspectiveLeft") == strValue) ||
|
||||
(_T("legacyPerspectiveRight") == strValue) ||
|
||||
(_T("legacyPerspectiveTop") == strValue) ||
|
||||
(_T("legacyPerspectiveTopLeft") == strValue) ||
|
||||
(_T("legacyPerspectiveTopRight") == strValue) ||
|
||||
(_T("obliqueBottom") == strValue) ||
|
||||
(_T("obliqueBottomLeft") == strValue) ||
|
||||
(_T("obliqueBottomRight") == strValue) ||
|
||||
(_T("obliqueLeft") == strValue) ||
|
||||
(_T("obliqueRight") == strValue) ||
|
||||
(_T("obliqueTop") == strValue) ||
|
||||
(_T("obliqueTopLeft") == strValue) ||
|
||||
(_T("obliqueTopRight") == strValue) ||
|
||||
(_T("orthographicFront") == strValue) ||
|
||||
(_T("perspectiveAbove") == strValue) ||
|
||||
(_T("perspectiveAboveLeftFacing") == strValue) ||
|
||||
(_T("perspectiveAboveRightFacing") == strValue) ||
|
||||
(_T("perspectiveBelow") == strValue) ||
|
||||
(_T("perspectiveContrastingLeftFacing") == strValue) ||
|
||||
(_T("perspectiveContrastingRightFacing") == strValue) ||
|
||||
(_T("perspectiveFront") == strValue) ||
|
||||
(_T("perspectiveHeroicExtremeLeftFacing") == strValue) ||
|
||||
(_T("perspectiveHeroicExtremeRightFacing") == strValue) ||
|
||||
(_T("perspectiveHeroicLeftFacing") == strValue) ||
|
||||
(_T("perspectiveHeroicRightFacing") == strValue) ||
|
||||
(_T("perspectiveLeft") == strValue) ||
|
||||
(_T("perspectiveRelaxed") == strValue) ||
|
||||
(_T("perspectiveRelaxedModerately") == strValue) ||
|
||||
(_T("perspectiveRight") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_CAMERATYPE_INCLUDE_H_
|
||||
69
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/ChartBuild.h
Normal file
69
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/ChartBuild.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* (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_LIMIT_CHARTBUILD_INCLUDE_H_
|
||||
#define PPTX_LIMIT_CHARTBUILD_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class ChartBuild : public BaseLimit
|
||||
{
|
||||
public:
|
||||
ChartBuild()
|
||||
{
|
||||
m_strValue = _T("allPts");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("allPts") == strValue) ||
|
||||
(_T("category") == strValue) ||
|
||||
(_T("gridLegend") == strValue) ||
|
||||
(_T("ptInCategory") == strValue) ||
|
||||
(_T("ptInSeries") == strValue) ||
|
||||
(_T("series") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_CHARTBUILD_INCLUDE_H_
|
||||
68
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/ChartBuildType.h
Normal file
68
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/ChartBuildType.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* (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_LIMIT_CHARTBUILDTYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_CHARTBUILDTYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class ChartBuildType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
ChartBuildType::ChartBuildType()
|
||||
{
|
||||
m_strValue = _T("allAtOnce");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("allAtOnce") == strValue) ||
|
||||
(_T("category") == strValue) ||
|
||||
(_T("categoryEl") == strValue) ||
|
||||
(_T("series") == strValue) ||
|
||||
(_T("seriesEl") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_CHARTBUILDTYPE_INCLUDE_H_
|
||||
177
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/ColorSchemeIndex.h
Normal file
177
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/ColorSchemeIndex.h
Normal file
@@ -0,0 +1,177 @@
|
||||
/*
|
||||
* (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_LIMIT_COLORSCHEMEINDEX_INCLUDE_H_
|
||||
#define PPTX_LIMIT_COLORSCHEMEINDEX_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class ColorSchemeIndex : public BaseLimit
|
||||
{
|
||||
public:
|
||||
ColorSchemeIndex()
|
||||
{
|
||||
m_strValue = _T("accent1");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("accent1") == strValue) ||
|
||||
(_T("accent2") == strValue) ||
|
||||
(_T("accent3") == strValue) ||
|
||||
(_T("accent4") == strValue) ||
|
||||
(_T("accent5") == strValue) ||
|
||||
(_T("accent6") == strValue) ||
|
||||
(_T("dk1") == strValue) ||
|
||||
(_T("dk2") == strValue) ||
|
||||
(_T("folHlink") == strValue) ||
|
||||
(_T("hlink") == strValue) ||
|
||||
(_T("lt1") == strValue) ||
|
||||
(_T("lt2") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (_T("light1") == strValue)
|
||||
m_strValue = _T("lt1");
|
||||
else if (_T("light2") == strValue)
|
||||
m_strValue = _T("lt2");
|
||||
else if (_T("dark1") == strValue)
|
||||
m_strValue = _T("dk1");
|
||||
else if (_T("dark2") == strValue)
|
||||
m_strValue = _T("dk2");
|
||||
else if (_T("hyperlink") == strValue)
|
||||
m_strValue = _T("hlink");
|
||||
else if (_T("followedHyperlink") == strValue)
|
||||
m_strValue = _T("folHlink");
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("accent1") == m_strValue)
|
||||
return 0;
|
||||
if (_T("accent2") == m_strValue)
|
||||
return 1;
|
||||
if (_T("accent3") == m_strValue)
|
||||
return 2;
|
||||
if (_T("accent4") == m_strValue)
|
||||
return 3;
|
||||
if (_T("accent5") == m_strValue)
|
||||
return 4;
|
||||
if (_T("accent6") == m_strValue)
|
||||
return 5;
|
||||
if (_T("bg1") == m_strValue)
|
||||
return 6;
|
||||
if (_T("bg2") == m_strValue)
|
||||
return 7;
|
||||
if (_T("dk1") == m_strValue)
|
||||
return 8;
|
||||
if (_T("dk2") == m_strValue)
|
||||
return 9;
|
||||
if (_T("folHlink") == m_strValue)
|
||||
return 10;
|
||||
if (_T("hlink") == m_strValue)
|
||||
return 11;
|
||||
if (_T("lt1") == m_strValue)
|
||||
return 12;
|
||||
if (_T("lt2") == m_strValue)
|
||||
return 13;
|
||||
if (_T("phClr") == m_strValue)
|
||||
return 14;
|
||||
if (_T("tx1") == m_strValue)
|
||||
return 15;
|
||||
if (_T("tx2") == m_strValue)
|
||||
return 16;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetStringCode(const BYTE& val)
|
||||
{
|
||||
switch (val)
|
||||
{
|
||||
case 0:
|
||||
m_strValue = _T("accent1");
|
||||
break;
|
||||
case 1:
|
||||
m_strValue = _T("accent2");
|
||||
break;
|
||||
case 2:
|
||||
m_strValue = _T("accent3");
|
||||
break;
|
||||
case 3:
|
||||
m_strValue = _T("accent4");
|
||||
break;
|
||||
case 4:
|
||||
m_strValue = _T("accent5");
|
||||
break;
|
||||
case 5:
|
||||
m_strValue = _T("accent6");
|
||||
break;
|
||||
case 8:
|
||||
m_strValue = _T("dk1");
|
||||
break;
|
||||
case 9:
|
||||
m_strValue = _T("dk2");
|
||||
break;
|
||||
case 10:
|
||||
m_strValue = _T("folHlink");
|
||||
break;
|
||||
case 11:
|
||||
m_strValue = _T("hlink");
|
||||
break;
|
||||
case 12:
|
||||
m_strValue = _T("lt1");
|
||||
break;
|
||||
case 13:
|
||||
m_strValue = _T("lt2");
|
||||
break;
|
||||
default:
|
||||
m_strValue = _T("accent1");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_COLORSCHEMEINDEX_INCLUDE_H_
|
||||
105
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/CompoundLine.h
Normal file
105
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/CompoundLine.h
Normal 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_LIMIT_COMPOUNDLINE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_COMPOUNDLINE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class CompoundLine : public BaseLimit
|
||||
{
|
||||
public:
|
||||
CompoundLine()
|
||||
{
|
||||
m_strValue = _T("sng");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("dbl") == strValue) ||
|
||||
(_T("sng") == strValue) ||
|
||||
(_T("thickThin") == strValue) ||
|
||||
(_T("thinThick") == strValue) ||
|
||||
(_T("tri") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("dbl") == m_strValue)
|
||||
return 0;
|
||||
if (_T("sng") == m_strValue)
|
||||
return 1;
|
||||
if (_T("thickThin") == m_strValue)
|
||||
return 2;
|
||||
if (_T("thinThick") == m_strValue)
|
||||
return 3;
|
||||
if (_T("tri") == m_strValue)
|
||||
return 4;
|
||||
return 1;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 0:
|
||||
m_strValue = _T("dbl");
|
||||
break;
|
||||
case 2:
|
||||
m_strValue = _T("thickThin");
|
||||
break;
|
||||
case 3:
|
||||
m_strValue = _T("thinThick");
|
||||
break;
|
||||
case 4:
|
||||
m_strValue = _T("tri");
|
||||
break;
|
||||
default:
|
||||
m_strValue = _T("sng");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_COMPOUNDLINE_INCLUDE_H_
|
||||
74
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/Conformance.h
Normal file
74
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/Conformance.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* (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_LIMIT_CONFORMANCE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_CONFORMANCE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class Conformance : public BaseLimit
|
||||
{
|
||||
public:
|
||||
Conformance()
|
||||
{
|
||||
m_strValue = _T("transitional");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("strict") == strValue) ||
|
||||
(_T("transitional") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("strict") == m_strValue)
|
||||
return 0;
|
||||
if (_T("transitional") == m_strValue)
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_CONFORMANCE_INCLUDE_H_
|
||||
67
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/ContentStatus.h
Normal file
67
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/ContentStatus.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* (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_LIMIT_CONTENT_STATUS_INCLUDE_H_
|
||||
#define PPTX_LIMIT_CONTENT_STATUS_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class ContentStatus : public BaseLimit
|
||||
{
|
||||
public:
|
||||
ContentStatus()
|
||||
{
|
||||
m_strValue = _T("Draft");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("Draft") == strValue) ||
|
||||
(_T("Reviewed") == strValue) ||
|
||||
(_T("Final") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_CONTENT_STATUS_INCLUDE_H_
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* (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_LIMIT_CORNERDIRECTIONVAL_INCLUDE_H_
|
||||
#define PPTX_LIMIT_CORNERDIRECTIONVAL_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class CornerDirectionVal : public BaseLimit
|
||||
{
|
||||
public:
|
||||
CornerDirectionVal()
|
||||
{
|
||||
m_strValue = _T("lu");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("ld") == strValue) ||
|
||||
(_T("lu") == strValue) ||
|
||||
(_T("rd") == strValue) ||
|
||||
(_T("ru") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_CORNERDIRECTIONVAL_INCLUDE_H_
|
||||
65
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/DgmBuild.h
Normal file
65
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/DgmBuild.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* (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_LIMIT_DGMBUILD_INCLUDE_H_
|
||||
#define PPTX_LIMIT_DGMBUILD_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class DgmBuild : public BaseLimit
|
||||
{
|
||||
public:
|
||||
DgmBuild()
|
||||
{
|
||||
m_strValue = _T("sp");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("bg") == strValue) ||
|
||||
(_T("sp") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_DGMBUILD_INCLUDE_H_
|
||||
80
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/DgmBuildType.h
Normal file
80
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/DgmBuildType.h
Normal 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_LIMIT_DGMBUILDTYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_DGMBUILDTYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class DgmBuildType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
DgmBuildType()
|
||||
{
|
||||
m_strValue = _T("whole");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("allAtOnce") == strValue) ||
|
||||
(_T("breadthByLvl") == strValue) ||
|
||||
(_T("breadthByNode") == strValue) ||
|
||||
(_T("ccw") == strValue) ||
|
||||
(_T("ccwIn") == strValue) ||
|
||||
(_T("ccwOut") == strValue) ||
|
||||
(_T("cust") == strValue) ||
|
||||
(_T("cw") == strValue) ||
|
||||
(_T("cwIn") == strValue) ||
|
||||
(_T("cwOut") == strValue) ||
|
||||
(_T("depthByBranch") == strValue) ||
|
||||
(_T("depthByNode") == strValue) ||
|
||||
(_T("down") == strValue) ||
|
||||
(_T("inByRing") == strValue) ||
|
||||
(_T("outByRing") == strValue) ||
|
||||
(_T("up") == strValue) ||
|
||||
(_T("whole") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_DGMBUILDTYPE_INCLUDE_H_
|
||||
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* (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_LIMIT_EFFECTCONTAINERTYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_EFFECTCONTAINERTYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class EffectContainerType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
EffectContainerType()
|
||||
{
|
||||
m_strValue = _T("sib");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("sib") == strValue) ||
|
||||
(_T("tree") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("sib") == m_strValue)
|
||||
return 0;
|
||||
if (_T("tree") == m_strValue)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_EFFECTCONTAINERTYPE_INCLUDE_H_
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* (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_LIMIT_EIGHTDIRECTIONVAL_INCLUDE_H_
|
||||
#define PPTX_LIMIT_EIGHTDIRECTIONVAL_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class EightDirectionVal : public BaseLimit
|
||||
{
|
||||
public:
|
||||
EightDirectionVal()
|
||||
{
|
||||
m_strValue = _T("l");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("ld") == strValue) ||
|
||||
(_T("lu") == strValue) ||
|
||||
(_T("rd") == strValue) ||
|
||||
(_T("ru") == strValue) ||
|
||||
(_T("d") == strValue) ||
|
||||
(_T("l") == strValue) ||
|
||||
(_T("r") == strValue) ||
|
||||
(_T("u") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_EIGHTDIRECTIONVAL_INCLUDE_H_
|
||||
95
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/FillPath.h
Normal file
95
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/FillPath.h
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* (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_LIMIT_FILLPATH_INCLUDE_H_
|
||||
#define PPTX_LIMIT_FILLPATH_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class FillPath : public BaseLimit
|
||||
{
|
||||
public:
|
||||
FillPath()
|
||||
{
|
||||
m_strValue = _T("circle");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("circle") == strValue) ||
|
||||
(_T("rect") == strValue) ||
|
||||
(_T("shape") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("circle") == m_strValue)
|
||||
return 0;
|
||||
if (_T("rect") == m_strValue)
|
||||
return 1;
|
||||
if (_T("shape") == m_strValue)
|
||||
return 2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 0:
|
||||
m_strValue = _T("circle");
|
||||
break;
|
||||
case 1:
|
||||
m_strValue = _T("rect");
|
||||
break;
|
||||
case 2:
|
||||
m_strValue = _T("shape");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_FILLPATH_INCLUDE_H_
|
||||
101
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/Flip.h
Normal file
101
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/Flip.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_LIMIT_FLIP_INCLUDE_H_
|
||||
#define PPTX_LIMIT_FLIP_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class Flip : public BaseLimit
|
||||
{
|
||||
public:
|
||||
Flip()
|
||||
{
|
||||
m_strValue = _T("none");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("none") == strValue) ||
|
||||
(_T("x") == strValue) ||
|
||||
(_T("xy") == strValue) ||
|
||||
(_T("y") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("none") == m_strValue)
|
||||
return 0;
|
||||
if (_T("x") == m_strValue)
|
||||
return 1;
|
||||
if (_T("y") == m_strValue)
|
||||
return 2;
|
||||
if (_T("xy") == m_strValue)
|
||||
return 3;
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 0:
|
||||
m_strValue = _T("none");
|
||||
break;
|
||||
case 1:
|
||||
m_strValue = _T("x");
|
||||
break;
|
||||
case 2:
|
||||
m_strValue = _T("y");
|
||||
break;
|
||||
case 3:
|
||||
m_strValue = _T("xy");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_FLIP_INCLUDE_H_
|
||||
108
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/FontAlign.h
Normal file
108
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/FontAlign.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_LIMIT_FONTALIGN_INCLUDE_H_
|
||||
#define PPTX_LIMIT_FONTALIGN_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class FontAlign : public BaseLimit
|
||||
{
|
||||
public:
|
||||
FontAlign()
|
||||
{
|
||||
m_strValue = _T("auto");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("auto") == strValue) ||
|
||||
(_T("b") == strValue) ||
|
||||
(_T("base") == strValue) ||
|
||||
(_T("ctr") == strValue) ||
|
||||
(_T("t") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("auto") == m_strValue)
|
||||
return 0;
|
||||
if (_T("b") == m_strValue)
|
||||
return 1;
|
||||
if (_T("base") == m_strValue)
|
||||
return 2;
|
||||
if (_T("ctr") == m_strValue)
|
||||
return 3;
|
||||
if (_T("t") == m_strValue)
|
||||
return 4;
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& val)
|
||||
{
|
||||
switch (val)
|
||||
{
|
||||
case 0:
|
||||
m_strValue = _T("auto");
|
||||
break;
|
||||
case 1:
|
||||
m_strValue = _T("b");
|
||||
break;
|
||||
case 2:
|
||||
m_strValue = _T("base");
|
||||
break;
|
||||
case 3:
|
||||
m_strValue = _T("ctr");
|
||||
break;
|
||||
case 4:
|
||||
m_strValue = _T("t");
|
||||
break;
|
||||
default:
|
||||
m_strValue = _T("auto");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_FONTALIGN_INCLUDE_H_
|
||||
92
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/FontStyleIndex.h
Normal file
92
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/FontStyleIndex.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_LIMIT_FONTSTYLEINDEX_INCLUDE_H_
|
||||
#define PPTX_LIMIT_FONTSTYLEINDEX_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class FontStyleIndex : public BaseLimit
|
||||
{
|
||||
public:
|
||||
FontStyleIndex()
|
||||
{
|
||||
m_strValue = _T("none");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("major") == strValue) ||
|
||||
(_T("minor") == strValue) ||
|
||||
(_T("none") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("major") == m_strValue)
|
||||
return 0;
|
||||
if (_T("minor") == m_strValue)
|
||||
return 1;
|
||||
if (_T("none") == m_strValue)
|
||||
return 2;
|
||||
return 2;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 0:
|
||||
m_strValue = _T("major");
|
||||
break;
|
||||
case 1:
|
||||
m_strValue = _T("minor");
|
||||
break;
|
||||
default:
|
||||
m_strValue = _T("none");
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_FONTSTYLEINDEX_INCLUDE_H_
|
||||
71
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/FrameShape.h
Normal file
71
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/FrameShape.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* (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_LIMIT_FRAMESHAPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_FRAMESHAPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class FrameShape : public BaseLimit
|
||||
{
|
||||
public:
|
||||
FrameShape()
|
||||
{
|
||||
m_strValue = _T("frameStyle1");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("frameStyle1") == strValue) ||
|
||||
(_T("frameStyle2") == strValue) ||
|
||||
(_T("frameStyle3") == strValue) ||
|
||||
(_T("frameStyle4") == strValue) ||
|
||||
(_T("frameStyle5") == strValue) ||
|
||||
(_T("frameStyle6") == strValue) ||
|
||||
(_T("frameStyle7") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_FRAMESHAPE_INCLUDE_H_
|
||||
81
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/HorzOverflow.h
Normal file
81
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/HorzOverflow.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* (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_LIMIT_HORZOVERFLOW_INCLUDE_H_
|
||||
#define PPTX_LIMIT_HORZOVERFLOW_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class HorzOverflow : public BaseLimit
|
||||
{
|
||||
public:
|
||||
HorzOverflow()
|
||||
{
|
||||
m_strValue = _T("clip");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("clip") == strValue) ||
|
||||
(_T("overflow") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("clip") == m_strValue)
|
||||
return 0;
|
||||
if (_T("overflow") == m_strValue)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
if (1 == src)
|
||||
m_strValue = _T("overflow");
|
||||
else
|
||||
m_strValue = _T("clip");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_HORZOVERFLOW_INCLUDE_H_
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* (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_LIMIT_INOUTDIRECTIONVAL_INCLUDE_H_
|
||||
#define PPTX_LIMIT_INOUTDIRECTIONVAL_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class InOutDirectionVal : public BaseLimit
|
||||
{
|
||||
public:
|
||||
InOutDirectionVal()
|
||||
{
|
||||
m_strValue = _T("out");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("in") == strValue) ||
|
||||
(_T("out") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_INOUTDIRECTIONVAL_INCLUDE_H_
|
||||
66
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/IterateType.h
Normal file
66
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/IterateType.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* (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_LIMIT_ITERATETYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_ITERATETYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class IterateType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
IterateType()
|
||||
{
|
||||
m_strValue = _T("el");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("el") == strValue) ||
|
||||
(_T("lt") == strValue) ||
|
||||
(_T("wd") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_ITERATETYPE_INCLUDE_H_
|
||||
93
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/LastView.h
Normal file
93
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/LastView.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_LIMIT_LASTVIEW_INCLUDE_H_
|
||||
#define PPTX_LIMIT_LASTVIEW_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class LastView : public BaseLimit
|
||||
{
|
||||
public:
|
||||
LastView()
|
||||
{
|
||||
m_strValue = _T("sldThumbnailView");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("handoutView") == strValue) ||
|
||||
(_T("notesMasterView") == strValue) ||
|
||||
(_T("notesView") == strValue) ||
|
||||
(_T("outlineView") == strValue) ||
|
||||
(_T("sldMasterView") == strValue) ||
|
||||
(_T("sldSorterView") == strValue) ||
|
||||
(_T("sldThumbnailView") == strValue) ||
|
||||
(_T("sldView") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("handoutView") == m_strValue)
|
||||
return 0;
|
||||
if (_T("notesMasterView") == m_strValue)
|
||||
return 1;
|
||||
if (_T("notesView") == m_strValue)
|
||||
return 2;
|
||||
if (_T("outlineView") == m_strValue)
|
||||
return 3;
|
||||
if (_T("sldMasterView") == m_strValue)
|
||||
return 4;
|
||||
if (_T("sldSorterView") == m_strValue)
|
||||
return 5;
|
||||
if (_T("sldThumbnailView") == m_strValue)
|
||||
return 6;
|
||||
if (_T("sldView") == m_strValue)
|
||||
return 7;
|
||||
return 6;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_LASTVIEW_INCLUDE_H_
|
||||
90
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/LightRigType.h
Normal file
90
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/LightRigType.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_LIMIT_LIGHTRIGTYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_LIGHTRIGTYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class LightRigType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
LightRigType()
|
||||
{
|
||||
m_strValue = _T("balanced");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("balanced") == strValue) ||
|
||||
(_T("brightRoom") == strValue) ||
|
||||
(_T("chilly") == strValue) ||
|
||||
(_T("contrasting") == strValue) ||
|
||||
(_T("flat") == strValue) ||
|
||||
(_T("flood") == strValue) ||
|
||||
(_T("freezing") == strValue) ||
|
||||
(_T("glow") == strValue) ||
|
||||
(_T("harsh") == strValue) ||
|
||||
(_T("legacyFlat1") == strValue) ||
|
||||
(_T("legacyFlat2") == strValue) ||
|
||||
(_T("legacyFlat3") == strValue) ||
|
||||
(_T("legacyFlat4") == strValue) ||
|
||||
(_T("legacyHarsh1") == strValue) ||
|
||||
(_T("legacyHarsh2") == strValue) ||
|
||||
(_T("legacyHarsh3") == strValue) ||
|
||||
(_T("legacyHarsh4") == strValue) ||
|
||||
(_T("legacyNormal1") == strValue) ||
|
||||
(_T("legacyNormal2") == strValue) ||
|
||||
(_T("legacyNormal3") == strValue) ||
|
||||
(_T("legacyNormal4") == strValue) ||
|
||||
(_T("morning") == strValue) ||
|
||||
(_T("soft") == strValue) ||
|
||||
(_T("sunrise") == strValue) ||
|
||||
(_T("sunset") == strValue) ||
|
||||
(_T("threePt") == strValue) ||
|
||||
(_T("twoPt") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_LIGHTRIGTYPE_INCLUDE_H_
|
||||
93
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/LineCap.h
Normal file
93
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/LineCap.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_LIMIT_LINECAP_INCLUDE_H_
|
||||
#define PPTX_LIMIT_LINECAP_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class LineCap : public BaseLimit
|
||||
{
|
||||
public:
|
||||
LineCap()
|
||||
{
|
||||
m_strValue = _T("flat");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("flat") == strValue) ||
|
||||
(_T("rnd") == strValue) ||
|
||||
(_T("sq") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("flat") == m_strValue)
|
||||
return 0;
|
||||
if (_T("rnd") == m_strValue)
|
||||
return 1;
|
||||
if (_T("sq") == m_strValue)
|
||||
return 2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 1:
|
||||
m_strValue = _T("rnd");
|
||||
break;
|
||||
case 2:
|
||||
m_strValue = _T("sq");
|
||||
break;
|
||||
default:
|
||||
m_strValue = _T("flat");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_LINECAP_INCLUDE_H_
|
||||
94
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/LineEndSize.h
Normal file
94
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/LineEndSize.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_LIMIT_LINEENDSIZE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_LINEENDSIZE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class LineEndSize : public BaseLimit
|
||||
{
|
||||
public:
|
||||
LineEndSize()
|
||||
{
|
||||
m_strValue = _T("med");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("lg") == strValue) ||
|
||||
(_T("med") == strValue) ||
|
||||
(_T("sm") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("lg") == m_strValue)
|
||||
return 0;
|
||||
if (_T("med") == m_strValue)
|
||||
return 1;
|
||||
if (_T("sm") == m_strValue)
|
||||
return 2;
|
||||
return 1;
|
||||
}
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 0:
|
||||
m_strValue = _T("lg");
|
||||
break;
|
||||
case 1:
|
||||
m_strValue = _T("med");
|
||||
break;
|
||||
case 2:
|
||||
m_strValue = _T("sm");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_LINEENDSIZE_INCLUDE_H_
|
||||
113
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/LineEndType.h
Normal file
113
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/LineEndType.h
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* (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_LIMIT_LINEENDTYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_LINEENDTYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class LineEndType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
LineEndType()
|
||||
{
|
||||
m_strValue = _T("none");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("none") == strValue) ||
|
||||
(_T("arrow") == strValue) ||
|
||||
(_T("diamond") == strValue) ||
|
||||
(_T("oval") == strValue) ||
|
||||
(_T("stealth") == strValue) ||
|
||||
(_T("triangle") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("none") == m_strValue)
|
||||
return 0;
|
||||
if (_T("arrow") == m_strValue)
|
||||
return 1;
|
||||
if (_T("diamond") == m_strValue)
|
||||
return 2;
|
||||
if (_T("oval") == m_strValue)
|
||||
return 3;
|
||||
if (_T("stealth") == m_strValue)
|
||||
return 4;
|
||||
if (_T("triangle") == m_strValue)
|
||||
return 5;
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 0:
|
||||
m_strValue = _T("none");
|
||||
break;
|
||||
case 1:
|
||||
m_strValue = _T("arrow");
|
||||
break;
|
||||
case 2:
|
||||
m_strValue = _T("diamond");
|
||||
break;
|
||||
case 3:
|
||||
m_strValue = _T("oval");
|
||||
break;
|
||||
case 4:
|
||||
m_strValue = _T("stealth");
|
||||
break;
|
||||
case 5:
|
||||
m_strValue = _T("triangle");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_LINEENDTYPE_INCLUDE_H_
|
||||
114
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/Material.h
Normal file
114
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/Material.h
Normal file
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* (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_LIMIT_MATERIAL_INCLUDE_H_
|
||||
#define PPTX_LIMIT_MATERIAL_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class Material : public BaseLimit
|
||||
{
|
||||
public:
|
||||
Material()
|
||||
{
|
||||
m_strValue = _T("clear");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("clear") == strValue) ||
|
||||
(_T("dkEdge") == strValue) ||
|
||||
(_T("flat") == strValue) ||
|
||||
(_T("legacyMatte") == strValue) ||
|
||||
(_T("legacyMetal") == strValue) ||
|
||||
(_T("legacyPlastic") == strValue) ||
|
||||
(_T("legacyWireframe") == strValue) ||
|
||||
(_T("matte") == strValue) ||
|
||||
(_T("metal") == strValue) ||
|
||||
(_T("plastic") == strValue) ||
|
||||
(_T("powder") == strValue) ||
|
||||
(_T("softEdge") == strValue) ||
|
||||
(_T("softmetal") == strValue) ||
|
||||
(_T("translucentPowder") == strValue) ||
|
||||
(_T("warmMatte") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("clear") == m_strValue)
|
||||
return 0;
|
||||
if (_T("dkEdge") == m_strValue)
|
||||
return 1;
|
||||
if (_T("flat") == m_strValue)
|
||||
return 2;
|
||||
if (_T("legacyMatte") == m_strValue)
|
||||
return 3;
|
||||
if (_T("legacyMetal") == m_strValue)
|
||||
return 4;
|
||||
if (_T("legacyPlastic") == m_strValue)
|
||||
return 5;
|
||||
if (_T("legacyWireframe") == m_strValue)
|
||||
return 6;
|
||||
if (_T("matte") == m_strValue)
|
||||
return 7;
|
||||
if (_T("metal") == m_strValue)
|
||||
return 8;
|
||||
if (_T("plastic") == m_strValue)
|
||||
return 9;
|
||||
if (_T("powder") == m_strValue)
|
||||
return 10;
|
||||
if (_T("softEdge") == m_strValue)
|
||||
return 11;
|
||||
if (_T("softmetal") == m_strValue)
|
||||
return 12;
|
||||
if (_T("translucentPowder") == m_strValue)
|
||||
return 13;
|
||||
if (_T("warmMatte") == m_strValue)
|
||||
return 14;
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_MATERIAL_INCLUDE_H_
|
||||
93
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/OnOff.h
Normal file
93
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/OnOff.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_LIMIT_ONOFF_INCLUDE_H_
|
||||
#define PPTX_LIMIT_ONOFF_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class OnOff : public BaseLimit
|
||||
{
|
||||
public:
|
||||
OnOff()
|
||||
{
|
||||
m_strValue = _T("def");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("on") == strValue) ||
|
||||
(_T("off") == strValue) ||
|
||||
(_T("def") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("on") == m_strValue)
|
||||
return 0;
|
||||
if (_T("off") == m_strValue)
|
||||
return 1;
|
||||
if (_T("def") == m_strValue)
|
||||
return 2;
|
||||
return 2;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 0:
|
||||
m_strValue = _T("on");
|
||||
break;
|
||||
case 1:
|
||||
m_strValue = _T("off");
|
||||
break;
|
||||
default:
|
||||
m_strValue = _T("def");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_ONOFF_INCLUDE_H_
|
||||
80
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/Orient.h
Normal file
80
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/Orient.h
Normal 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_LIMIT_ORIENT_INCLUDE_H_
|
||||
#define PPTX_LIMIT_ORIENT_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class Orient : public BaseLimit
|
||||
{
|
||||
public:
|
||||
Orient()
|
||||
{
|
||||
m_strValue = _T("vert");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("horz") == strValue) ||
|
||||
(_T("vert") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("horz") == m_strValue)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
if (0 == src)
|
||||
m_strValue = _T("horz");
|
||||
else
|
||||
m_strValue = _T("vert");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_ORIENT_INCLUDE_H_
|
||||
67
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/ParaBuildType.h
Normal file
67
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/ParaBuildType.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* (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_LIMIT_PARABUILDTYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_PARABUILDTYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class ParaBuildType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
ParaBuildType()
|
||||
{
|
||||
m_strValue = _T("whole");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("allAtOnce") == strValue) ||
|
||||
(_T("cust") == strValue) ||
|
||||
(_T("p") == strValue) ||
|
||||
(_T("whole") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_PARABUILDTYPE_INCLUDE_H_
|
||||
113
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PathFillMode.h
Normal file
113
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PathFillMode.h
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* (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_LIMIT_PATHFILLMODE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_PATHFILLMODE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class PathFillMode : public BaseLimit
|
||||
{
|
||||
public:
|
||||
PathFillMode()
|
||||
{
|
||||
m_strValue = _T("none");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("darken") == strValue) ||
|
||||
(_T("darkenLess") == strValue) ||
|
||||
(_T("lighten") == strValue) ||
|
||||
(_T("lightenLess") == strValue) ||
|
||||
(_T("none") == strValue) ||
|
||||
(_T("norm") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("darken") == m_strValue)
|
||||
return 0;
|
||||
if (_T("darkenLess") == m_strValue)
|
||||
return 1;
|
||||
if (_T("lighten") == m_strValue)
|
||||
return 2;
|
||||
if (_T("lightenLess") == m_strValue)
|
||||
return 3;
|
||||
if (_T("none") == m_strValue)
|
||||
return 4;
|
||||
if (_T("norm") == m_strValue)
|
||||
return 5;
|
||||
return 4;
|
||||
}
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 0:
|
||||
m_strValue = _T("darken");
|
||||
break;
|
||||
case 1:
|
||||
m_strValue = _T("darkenLess");
|
||||
break;
|
||||
case 2:
|
||||
m_strValue = _T("lighten");
|
||||
break;
|
||||
case 3:
|
||||
m_strValue = _T("lightenLess");
|
||||
break;
|
||||
case 4:
|
||||
m_strValue = _T("none");
|
||||
break;
|
||||
case 5:
|
||||
m_strValue = _T("norm");
|
||||
break;
|
||||
default:
|
||||
m_strValue = _T("none");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_PATHFILLMODE_INCLUDE_H_
|
||||
240
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PattFillVal.h
Normal file
240
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PattFillVal.h
Normal file
@@ -0,0 +1,240 @@
|
||||
/*
|
||||
* (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_LIMIT_PATTFILLVAL_INCLUDE_H_
|
||||
#define PPTX_LIMIT_PATTFILLVAL_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class PattFillVal : public BaseLimit
|
||||
{
|
||||
public:
|
||||
PattFillVal()
|
||||
{
|
||||
m_strValue = _T("cross");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("cross") == strValue) ||
|
||||
(_T("dashDnDiag") == strValue) ||
|
||||
(_T("dashHorz") == strValue) ||
|
||||
(_T("dashUpDiag") == strValue) ||
|
||||
(_T("dashVert") == strValue) ||
|
||||
(_T("diagBrick") == strValue) ||
|
||||
(_T("diagCross") == strValue) ||
|
||||
(_T("divot") == strValue) ||
|
||||
(_T("dkDnDiag") == strValue) ||
|
||||
(_T("dkHorz") == strValue) ||
|
||||
(_T("dkUpDiag") == strValue) ||
|
||||
(_T("dkVert") == strValue) ||
|
||||
(_T("dnDiag") == strValue) ||
|
||||
(_T("dotDmnd") == strValue) ||
|
||||
(_T("dotGrid") == strValue) ||
|
||||
(_T("horz") == strValue) ||
|
||||
(_T("horzBrick") == strValue) ||
|
||||
(_T("lgCheck") == strValue) ||
|
||||
(_T("lgConfetti") == strValue) ||
|
||||
(_T("lgGrid") == strValue) ||
|
||||
(_T("ltDnDiag") == strValue) ||
|
||||
(_T("ltHorz") == strValue) ||
|
||||
(_T("ltUpDiag") == strValue) ||
|
||||
(_T("ltVert") == strValue) ||
|
||||
(_T("narHorz") == strValue) ||
|
||||
(_T("narVert") == strValue) ||
|
||||
(_T("openDmnd") == strValue) ||
|
||||
(_T("pct10") == strValue) ||
|
||||
(_T("pct20") == strValue) ||
|
||||
(_T("pct25") == strValue) ||
|
||||
(_T("pct30") == strValue) ||
|
||||
(_T("pct40") == strValue) ||
|
||||
(_T("pct5") == strValue) ||
|
||||
(_T("pct50") == strValue) ||
|
||||
(_T("pct60") == strValue) ||
|
||||
(_T("pct70") == strValue) ||
|
||||
(_T("pct75") == strValue) ||
|
||||
(_T("pct80") == strValue) ||
|
||||
(_T("pct90") == strValue) ||
|
||||
(_T("plaid") == strValue) ||
|
||||
(_T("shingle") == strValue) ||
|
||||
(_T("smCheck") == strValue) ||
|
||||
(_T("smConfetti") == strValue) ||
|
||||
(_T("smGrid") == strValue) ||
|
||||
(_T("solidDmnd") == strValue) ||
|
||||
(_T("sphere") == strValue) ||
|
||||
(_T("trellis") == strValue) ||
|
||||
(_T("upDiag") == strValue) ||
|
||||
(_T("vert") == strValue) ||
|
||||
(_T("wave") == strValue) ||
|
||||
(_T("wdDnDiag") == strValue) ||
|
||||
(_T("wdUpDiag") == strValue) ||
|
||||
(_T("weave") == strValue) ||
|
||||
(_T("zigZag") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("cross") == m_strValue) return 0;
|
||||
if (_T("dashDnDiag") == m_strValue) return 1;
|
||||
if (_T("dashHorz") == m_strValue) return 2;
|
||||
if (_T("dashUpDiag") == m_strValue) return 3;
|
||||
if (_T("dashVert") == m_strValue) return 4;
|
||||
if (_T("diagBrick") == m_strValue) return 5;
|
||||
if (_T("diagCross") == m_strValue) return 6;
|
||||
if (_T("divot") == m_strValue) return 7;
|
||||
if (_T("dkDnDiag") == m_strValue) return 8;
|
||||
if (_T("dkHorz") == m_strValue) return 9;
|
||||
if (_T("dkUpDiag") == m_strValue) return 10;
|
||||
if (_T("dkVert") == m_strValue) return 11;
|
||||
if (_T("dnDiag") == m_strValue) return 12;
|
||||
if (_T("dotDmnd") == m_strValue) return 13;
|
||||
if (_T("dotGrid") == m_strValue) return 14;
|
||||
if (_T("horz") == m_strValue) return 15;
|
||||
if (_T("horzBrick") == m_strValue) return 16;
|
||||
if (_T("lgCheck") == m_strValue) return 17;
|
||||
if (_T("lgConfetti") == m_strValue) return 18;
|
||||
if (_T("lgGrid") == m_strValue) return 19;
|
||||
if (_T("ltDnDiag") == m_strValue) return 20;
|
||||
if (_T("ltHorz") == m_strValue) return 21;
|
||||
if (_T("ltUpDiag") == m_strValue) return 22;
|
||||
if (_T("ltVert") == m_strValue) return 23;
|
||||
if (_T("narHorz") == m_strValue) return 24;
|
||||
if (_T("narVert") == m_strValue) return 25;
|
||||
if (_T("openDmnd") == m_strValue) return 26;
|
||||
if (_T("pct10") == m_strValue) return 27;
|
||||
if (_T("pct20") == m_strValue) return 28;
|
||||
if (_T("pct25") == m_strValue) return 29;
|
||||
if (_T("pct30") == m_strValue) return 30;
|
||||
if (_T("pct40") == m_strValue) return 31;
|
||||
if (_T("pct5") == m_strValue) return 32;
|
||||
if (_T("pct50") == m_strValue) return 33;
|
||||
if (_T("pct60") == m_strValue) return 34;
|
||||
if (_T("pct70") == m_strValue) return 35;
|
||||
if (_T("pct75") == m_strValue) return 36;
|
||||
if (_T("pct80") == m_strValue) return 37;
|
||||
if (_T("pct90") == m_strValue) return 38;
|
||||
if (_T("plaid") == m_strValue) return 39;
|
||||
if (_T("shingle") == m_strValue) return 40;
|
||||
if (_T("smCheck") == m_strValue) return 41;
|
||||
if (_T("smConfetti") == m_strValue) return 42;
|
||||
if (_T("smGrid") == m_strValue) return 43;
|
||||
if (_T("solidDmnd") == m_strValue) return 44;
|
||||
if (_T("sphere") == m_strValue) return 45;
|
||||
if (_T("trellis") == m_strValue) return 46;
|
||||
if (_T("upDiag") == m_strValue) return 47;
|
||||
if (_T("vert") == m_strValue) return 48;
|
||||
if (_T("wave") == m_strValue) return 49;
|
||||
if (_T("wdDnDiag") == m_strValue) return 50;
|
||||
if (_T("wdUpDiag") == m_strValue) return 51;
|
||||
if (_T("weave") == m_strValue) return 52;
|
||||
if (_T("zigZag") == m_strValue) return 53;
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 0: m_strValue = _T("cross"); break;
|
||||
case 1: m_strValue = _T("dashDnDiag"); break;
|
||||
case 2: m_strValue = _T("dashHorz"); break;
|
||||
case 3: m_strValue = _T("dashUpDiag"); break;
|
||||
case 4: m_strValue = _T("dashVert"); break;
|
||||
case 5: m_strValue = _T("diagBrick"); break;
|
||||
case 6: m_strValue = _T("diagCross"); break;
|
||||
case 7: m_strValue = _T("divot"); break;
|
||||
case 8: m_strValue = _T("dkDnDiag"); break;
|
||||
case 9: m_strValue = _T("dkHorz"); break;
|
||||
case 10: m_strValue = _T("dkUpDiag"); break;
|
||||
case 11: m_strValue = _T("dkVert"); break;
|
||||
case 12: m_strValue = _T("dnDiag"); break;
|
||||
case 13: m_strValue = _T("dotDmnd"); break;
|
||||
case 14: m_strValue = _T("dotGrid"); break;
|
||||
case 15: m_strValue = _T("horz"); break;
|
||||
case 16: m_strValue = _T("horzBrick"); break;
|
||||
case 17: m_strValue = _T("lgCheck"); break;
|
||||
case 18: m_strValue = _T("lgConfetti"); break;
|
||||
case 19: m_strValue = _T("lgGrid"); break;
|
||||
case 20: m_strValue = _T("ltDnDiag"); break;
|
||||
case 21: m_strValue = _T("ltHorz"); break;
|
||||
case 22: m_strValue = _T("ltUpDiag"); break;
|
||||
case 23: m_strValue = _T("ltVert"); break;
|
||||
case 24: m_strValue = _T("narHorz"); break;
|
||||
case 25: m_strValue = _T("narVert"); break;
|
||||
case 26: m_strValue = _T("openDmnd"); break;
|
||||
case 27: m_strValue = _T("pct10"); break;
|
||||
case 28: m_strValue = _T("pct20"); break;
|
||||
case 29: m_strValue = _T("pct25"); break;
|
||||
case 30: m_strValue = _T("pct30"); break;
|
||||
case 31: m_strValue = _T("pct40"); break;
|
||||
case 32: m_strValue = _T("pct5"); break;
|
||||
case 33: m_strValue = _T("pct50"); break;
|
||||
case 34: m_strValue = _T("pct60"); break;
|
||||
case 35: m_strValue = _T("pct70"); break;
|
||||
case 36: m_strValue = _T("pct75"); break;
|
||||
case 37: m_strValue = _T("pct80"); break;
|
||||
case 38: m_strValue = _T("pct90"); break;
|
||||
case 39: m_strValue = _T("plaid"); break;
|
||||
case 40: m_strValue = _T("shingle"); break;
|
||||
case 41: m_strValue = _T("smCheck"); break;
|
||||
case 42: m_strValue = _T("smConfetti"); break;
|
||||
case 43: m_strValue = _T("smGrid"); break;
|
||||
case 44: m_strValue = _T("solidDmnd"); break;
|
||||
case 45: m_strValue = _T("sphere"); break;
|
||||
case 46: m_strValue = _T("trellis"); break;
|
||||
case 47: m_strValue = _T("upDiag"); break;
|
||||
case 48: m_strValue = _T("vert"); break;
|
||||
case 49: m_strValue = _T("wave"); break;
|
||||
case 50: m_strValue = _T("wdDnDiag"); break;
|
||||
case 51: m_strValue = _T("wdUpDiag"); break;
|
||||
case 52: m_strValue = _T("weave"); break;
|
||||
case 53: m_strValue = _T("zigZag"); break;
|
||||
default:
|
||||
m_strValue = _T("cross");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_PATTFILLVAL_INCLUDE_H_
|
||||
82
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PenAlign.h
Normal file
82
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PenAlign.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* (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_LIMIT_PENALIGN_INCLUDE_H_
|
||||
#define PPTX_LIMIT_PENALIGN_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class PenAlign : public BaseLimit
|
||||
{
|
||||
public:
|
||||
PenAlign()
|
||||
{
|
||||
m_strValue = _T("ctr");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("ctr") == strValue) ||
|
||||
(_T("in") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("ctr") == m_strValue)
|
||||
return 0;
|
||||
if (_T("in") == m_strValue)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
if (1 == src)
|
||||
m_strValue = _T("in");
|
||||
else
|
||||
m_strValue = _T("ctr");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_PENALIGN_INCLUDE_H_
|
||||
93
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PlaceholderSize.h
Normal file
93
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PlaceholderSize.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_LIMIT_PLACEHOLDERSIZE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_PLACEHOLDERSIZE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class PlaceholderSize : public BaseLimit
|
||||
{
|
||||
public:
|
||||
PlaceholderSize()
|
||||
{
|
||||
m_strValue = _T("full");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("full") == strValue) ||
|
||||
(_T("half") == strValue) ||
|
||||
(_T("quarter") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("full") == m_strValue)
|
||||
return 0;
|
||||
if (_T("half") == m_strValue)
|
||||
return 1;
|
||||
if (_T("quarter") == m_strValue)
|
||||
return 2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 1:
|
||||
m_strValue = _T("half");
|
||||
break;
|
||||
case 2:
|
||||
m_strValue = _T("quarter");
|
||||
break;
|
||||
default:
|
||||
m_strValue = _T("full");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_PLACEHOLDERSIZE_INCLUDE_H_
|
||||
210
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PlaceholderType.h
Normal file
210
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PlaceholderType.h
Normal file
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
* (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_LIMIT_PLACEHOLDERTYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_PLACEHOLDERTYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
AVSINLINE int GetPhType(const CString& strType)
|
||||
{
|
||||
if (_T("body") == strType)
|
||||
return 0;
|
||||
if (_T("chart") == strType)
|
||||
return 1;
|
||||
if (_T("clipArt") == strType)
|
||||
return 2;
|
||||
if (_T("ctrTitle") == strType)
|
||||
return 15;
|
||||
if (_T("dgm") == strType)
|
||||
return 4;
|
||||
if (_T("dt") == strType)
|
||||
return 5;
|
||||
if (_T("ftr") == strType)
|
||||
return 6;
|
||||
if (_T("hdr") == strType)
|
||||
return 7;
|
||||
if (_T("media") == strType)
|
||||
return 8;
|
||||
if (_T("obj") == strType)
|
||||
return 9;
|
||||
if (_T("pic") == strType)
|
||||
return 10;
|
||||
if (_T("sldImg") == strType)
|
||||
return 11;
|
||||
if (_T("sldNum") == strType)
|
||||
return 12;
|
||||
if (_T("subTitle") == strType)
|
||||
return 0;
|
||||
if (_T("tbl") == strType)
|
||||
return 14;
|
||||
if (_T("title") == strType)
|
||||
return 15;
|
||||
return 0;
|
||||
}
|
||||
|
||||
class PlaceholderType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
PlaceholderType()
|
||||
{
|
||||
m_strValue = _T("obj");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("body") == strValue) ||
|
||||
(_T("chart") == strValue) ||
|
||||
(_T("clipArt") == strValue) ||
|
||||
(_T("ctrTitle") == strValue) ||
|
||||
(_T("dgm") == strValue) ||
|
||||
(_T("dt") == strValue) ||
|
||||
(_T("ftr") == strValue) ||
|
||||
(_T("hdr") == strValue) ||
|
||||
(_T("media") == strValue) ||
|
||||
(_T("obj") == strValue) ||
|
||||
(_T("pic") == strValue) ||
|
||||
(_T("sldImg") == strValue) ||
|
||||
(_T("sldNum") == strValue) ||
|
||||
(_T("subTitle") == strValue) ||
|
||||
(_T("tbl") == strValue) ||
|
||||
(_T("title") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("body") == m_strValue)
|
||||
return 0;
|
||||
if (_T("chart") == m_strValue)
|
||||
return 1;
|
||||
if (_T("clipArt") == m_strValue)
|
||||
return 2;
|
||||
if (_T("ctrTitle") == m_strValue)
|
||||
return 3;
|
||||
if (_T("dgm") == m_strValue)
|
||||
return 4;
|
||||
if (_T("dt") == m_strValue)
|
||||
return 5;
|
||||
if (_T("ftr") == m_strValue)
|
||||
return 6;
|
||||
if (_T("hdr") == m_strValue)
|
||||
return 7;
|
||||
if (_T("media") == m_strValue)
|
||||
return 8;
|
||||
if (_T("obj") == m_strValue)
|
||||
return 9;
|
||||
if (_T("pic") == m_strValue)
|
||||
return 10;
|
||||
if (_T("sldImg") == m_strValue)
|
||||
return 11;
|
||||
if (_T("sldNum") == m_strValue)
|
||||
return 12;
|
||||
if (_T("subTitle") == m_strValue)
|
||||
return 13;
|
||||
if (_T("tbl") == m_strValue)
|
||||
return 14;
|
||||
if (_T("title") == m_strValue)
|
||||
return 15;
|
||||
return 9;
|
||||
}
|
||||
virtual void SetBYTECode(const BYTE& src)
|
||||
{
|
||||
switch (src)
|
||||
{
|
||||
case 0:
|
||||
m_strValue = _T("body");
|
||||
break;
|
||||
case 1:
|
||||
m_strValue = _T("chart");
|
||||
break;
|
||||
case 2:
|
||||
m_strValue = _T("clipArt");
|
||||
break;
|
||||
case 3:
|
||||
m_strValue = _T("ctrTitle");
|
||||
break;
|
||||
case 4:
|
||||
m_strValue = _T("dgm");
|
||||
break;
|
||||
case 5:
|
||||
m_strValue = _T("dt");
|
||||
break;
|
||||
case 6:
|
||||
m_strValue = _T("ftr");
|
||||
break;
|
||||
case 7:
|
||||
m_strValue = _T("hdr");
|
||||
break;
|
||||
case 8:
|
||||
m_strValue = _T("media");
|
||||
break;
|
||||
case 9:
|
||||
m_strValue = _T("obj");
|
||||
break;
|
||||
case 10:
|
||||
m_strValue = _T("pic");
|
||||
break;
|
||||
case 11:
|
||||
m_strValue = _T("sldImg");
|
||||
break;
|
||||
case 12:
|
||||
m_strValue = _T("sldNum");
|
||||
break;
|
||||
case 13:
|
||||
m_strValue = _T("subTitle");
|
||||
break;
|
||||
case 14:
|
||||
m_strValue = _T("tbl");
|
||||
break;
|
||||
case 15:
|
||||
m_strValue = _T("title");
|
||||
break;
|
||||
default:
|
||||
m_strValue = _T("obj");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_PLACEHOLDERTYPE_INCLUDE_H_
|
||||
130
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PresetShadowVal.h
Normal file
130
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PresetShadowVal.h
Normal file
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
* (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_LIMIT_PRESETSHADOWVAL_INCLUDE_H_
|
||||
#define PPTX_LIMIT_PRESETSHADOWVAL_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class PresetShadowVal : public BaseLimit
|
||||
{
|
||||
public:
|
||||
PresetShadowVal()
|
||||
{
|
||||
m_strValue = _T("shdw1");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("shdw1") == strValue) ||
|
||||
(_T("shdw2") == strValue) ||
|
||||
(_T("shdw3") == strValue) ||
|
||||
(_T("shdw4") == strValue) ||
|
||||
(_T("shdw5") == strValue) ||
|
||||
(_T("shdw6") == strValue) ||
|
||||
(_T("shdw7") == strValue) ||
|
||||
(_T("shdw8") == strValue) ||
|
||||
(_T("shdw9") == strValue) ||
|
||||
(_T("shdw10") == strValue) ||
|
||||
(_T("shdw11") == strValue) ||
|
||||
(_T("shdw12") == strValue) ||
|
||||
(_T("shdw13") == strValue) ||
|
||||
(_T("shdw14") == strValue) ||
|
||||
(_T("shdw15") == strValue) ||
|
||||
(_T("shdw16") == strValue) ||
|
||||
(_T("shdw17") == strValue) ||
|
||||
(_T("shdw18") == strValue) ||
|
||||
(_T("shdw19") == strValue) ||
|
||||
(_T("shdw20") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("shdw1") == m_strValue)
|
||||
return 0;
|
||||
if (_T("shdw2") == m_strValue)
|
||||
return 1;
|
||||
if (_T("shdw3") == m_strValue)
|
||||
return 2;
|
||||
if (_T("shdw4") == m_strValue)
|
||||
return 3;
|
||||
if (_T("shdw5") == m_strValue)
|
||||
return 4;
|
||||
if (_T("shdw6") == m_strValue)
|
||||
return 5;
|
||||
if (_T("shdw7") == m_strValue)
|
||||
return 6;
|
||||
if (_T("shdw8") == m_strValue)
|
||||
return 7;
|
||||
if (_T("shdw9") == m_strValue)
|
||||
return 8;
|
||||
if (_T("shdw10") == m_strValue)
|
||||
return 9;
|
||||
if (_T("shdw11") == m_strValue)
|
||||
return 10;
|
||||
if (_T("shdw12") == m_strValue)
|
||||
return 11;
|
||||
if (_T("shdw13") == m_strValue)
|
||||
return 12;
|
||||
if (_T("shdw14") == m_strValue)
|
||||
return 13;
|
||||
if (_T("shdw15") == m_strValue)
|
||||
return 14;
|
||||
if (_T("shdw16") == m_strValue)
|
||||
return 15;
|
||||
if (_T("shdw17") == m_strValue)
|
||||
return 16;
|
||||
if (_T("shdw18") == m_strValue)
|
||||
return 17;
|
||||
if (_T("shdw19") == m_strValue)
|
||||
return 18;
|
||||
if (_T("shdw20") == m_strValue)
|
||||
return 19;
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_PRESETSHADOWVAL_INCLUDE_H_
|
||||
253
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PrstClrVal.h
Normal file
253
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PrstClrVal.h
Normal file
@@ -0,0 +1,253 @@
|
||||
/*
|
||||
* (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_LIMIT_PRSTCLRVAL_INCLUDE_H_
|
||||
#define PPTX_LIMIT_PRSTCLRVAL_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class PrstClrVal : public BaseLimit
|
||||
{
|
||||
public:
|
||||
PrstClrVal()
|
||||
{
|
||||
m_strValue = _T("black");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("aliceBlue") == strValue) ||
|
||||
(_T("antiqueWhite") == strValue) ||
|
||||
(_T("aqua") == strValue) ||
|
||||
(_T("aquamarine") == strValue) ||
|
||||
(_T("azure") == strValue) ||
|
||||
(_T("beige") == strValue) ||
|
||||
(_T("bisque") == strValue) ||
|
||||
(_T("black") == strValue) ||
|
||||
(_T("blanchedAlmond") == strValue) ||
|
||||
(_T("blue") == strValue) ||
|
||||
(_T("blueViolet") == strValue) ||
|
||||
(_T("brown") == strValue) ||
|
||||
(_T("burlyWood") == strValue) ||
|
||||
(_T("cadetBlue") == strValue) ||
|
||||
(_T("chartreuse") == strValue) ||
|
||||
(_T("chocolate") == strValue) ||
|
||||
(_T("coral") == strValue) ||
|
||||
(_T("cornflowerBlue") == strValue) ||
|
||||
(_T("cornsilk") == strValue) ||
|
||||
(_T("crimson") == strValue) ||
|
||||
(_T("cyan") == strValue) ||
|
||||
(_T("darkBlue") == strValue) ||
|
||||
(_T("darkCyan") == strValue) ||
|
||||
(_T("darkGoldenrod") == strValue) ||
|
||||
(_T("darkGray") == strValue) ||
|
||||
(_T("darkGreen") == strValue) ||
|
||||
(_T("darkGrey") == strValue) ||
|
||||
(_T("darkKhaki") == strValue) ||
|
||||
(_T("darkMagenta") == strValue) ||
|
||||
(_T("darkOliveGreen") == strValue) ||
|
||||
(_T("darkOrange") == strValue) ||
|
||||
(_T("darkOrchid") == strValue) ||
|
||||
(_T("darkRed") == strValue) ||
|
||||
(_T("darkSalmon") == strValue) ||
|
||||
(_T("darkSeaGreen") == strValue) ||
|
||||
(_T("darkSlateBlue") == strValue) ||
|
||||
(_T("darkSlateGray") == strValue) ||
|
||||
(_T("darkSlateGrey") == strValue) ||
|
||||
(_T("darkTurquoise") == strValue) ||
|
||||
(_T("darkViolet") == strValue) ||
|
||||
(_T("deepPink") == strValue) ||
|
||||
(_T("deepSkyBlue") == strValue) ||
|
||||
(_T("dimGray") == strValue) ||
|
||||
(_T("dimGrey") == strValue) ||
|
||||
(_T("dkBlue") == strValue) ||
|
||||
(_T("dkCyan") == strValue) ||
|
||||
(_T("dkGoldenrod") == strValue) ||
|
||||
(_T("dkGray") == strValue) ||
|
||||
(_T("dkGreen") == strValue) ||
|
||||
(_T("dkGrey") == strValue) ||
|
||||
(_T("dkKhaki") == strValue) ||
|
||||
(_T("dkMagenta") == strValue) ||
|
||||
(_T("dkOliveGreen") == strValue) ||
|
||||
(_T("dkOrange") == strValue) ||
|
||||
(_T("dkOrchid") == strValue) ||
|
||||
(_T("dkRed") == strValue) ||
|
||||
(_T("dkSalmon") == strValue) ||
|
||||
(_T("dkSeaGreen") == strValue) ||
|
||||
(_T("dkSlateBlue") == strValue) ||
|
||||
(_T("dkSlateGray") == strValue) ||
|
||||
(_T("dkSlateGrey") == strValue) ||
|
||||
(_T("dkTurquoise") == strValue) ||
|
||||
(_T("dkViolet") == strValue) ||
|
||||
(_T("dodgerBlue") == strValue) ||
|
||||
(_T("firebrick") == strValue) ||
|
||||
(_T("floralWhite") == strValue) ||
|
||||
(_T("forestGreen") == strValue) ||
|
||||
(_T("fuchsia") == strValue) ||
|
||||
(_T("gainsboro") == strValue) ||
|
||||
(_T("ghostWhite") == strValue) ||
|
||||
(_T("gold") == strValue) ||
|
||||
(_T("goldenrod") == strValue) ||
|
||||
(_T("gray") == strValue) ||
|
||||
(_T("green") == strValue) ||
|
||||
(_T("greenYellow") == strValue) ||
|
||||
(_T("grey") == strValue) ||
|
||||
(_T("honeydew") == strValue) ||
|
||||
(_T("hotPink") == strValue) ||
|
||||
(_T("indianRed") == strValue) ||
|
||||
(_T("indigo") == strValue) ||
|
||||
(_T("ivory") == strValue) ||
|
||||
(_T("khaki") == strValue) ||
|
||||
(_T("lavender") == strValue) ||
|
||||
(_T("lavenderBlush") == strValue) ||
|
||||
(_T("lawnGreen") == strValue) ||
|
||||
(_T("lemonChiffon") == strValue) ||
|
||||
(_T("lightBlue") == strValue) ||
|
||||
(_T("lightCoral") == strValue) ||
|
||||
(_T("lightCyan") == strValue) ||
|
||||
(_T("lightGoldenrodYellow") == strValue) ||
|
||||
(_T("lightGray") == strValue) ||
|
||||
(_T("lightGreen") == strValue) ||
|
||||
(_T("lightGrey") == strValue) ||
|
||||
(_T("lightPink") == strValue) ||
|
||||
(_T("lightSalmon") == strValue) ||
|
||||
(_T("lightSeaGreen") == strValue) ||
|
||||
(_T("lightSkyBlue") == strValue) ||
|
||||
(_T("lightSlateGray") == strValue) ||
|
||||
(_T("lightSlateGrey") == strValue) ||
|
||||
(_T("lightSteelBlue") == strValue) ||
|
||||
(_T("lightYellow") == strValue) ||
|
||||
(_T("lime") == strValue) ||
|
||||
(_T("limeGreen") == strValue) ||
|
||||
(_T("linen") == strValue) ||
|
||||
(_T("ltBlue") == strValue) ||
|
||||
(_T("ltCoral") == strValue) ||
|
||||
(_T("ltCyan") == strValue) ||
|
||||
(_T("ltGoldenrodYellow") == strValue) ||
|
||||
(_T("ltGray") == strValue) ||
|
||||
(_T("ltGreen") == strValue) ||
|
||||
(_T("ltGrey") == strValue) ||
|
||||
(_T("ltPink") == strValue) ||
|
||||
(_T("ltSalmon") == strValue) ||
|
||||
(_T("ltSeaGreen") == strValue) ||
|
||||
(_T("ltSkyBlue") == strValue) ||
|
||||
(_T("ltSlateGray") == strValue) ||
|
||||
(_T("ltSlateGrey") == strValue) ||
|
||||
(_T("ltSteelBlue") == strValue) ||
|
||||
(_T("ltYellow") == strValue) ||
|
||||
(_T("magenta") == strValue) ||
|
||||
(_T("maroon") == strValue) ||
|
||||
(_T("medAquamarine") == strValue) ||
|
||||
(_T("medBlue") == strValue) ||
|
||||
(_T("mediumAquamarine") == strValue) ||
|
||||
(_T("mediumBlue") == strValue) ||
|
||||
(_T("mediumOrchid") == strValue) ||
|
||||
(_T("mediumPurple") == strValue) ||
|
||||
(_T("mediumSeaGreen") == strValue) ||
|
||||
(_T("mediumSlateBlue") == strValue) ||
|
||||
(_T("mediumSpringGreen") == strValue) ||
|
||||
(_T("mediumTurquoise") == strValue) ||
|
||||
(_T("mediumVioletRed") == strValue) ||
|
||||
(_T("medOrchid") == strValue) ||
|
||||
(_T("medPurple") == strValue) ||
|
||||
(_T("medSeaGreen") == strValue) ||
|
||||
(_T("medSlateBlue") == strValue) ||
|
||||
(_T("medSpringGreen") == strValue) ||
|
||||
(_T("medTurquoise") == strValue) ||
|
||||
(_T("medVioletRed") == strValue) ||
|
||||
(_T("midnightBlue") == strValue) ||
|
||||
(_T("mintCream") == strValue) ||
|
||||
(_T("mistyRose") == strValue) ||
|
||||
(_T("moccasin") == strValue) ||
|
||||
(_T("navajoWhite") == strValue) ||
|
||||
(_T("navy") == strValue) ||
|
||||
(_T("oldLace") == strValue) ||
|
||||
(_T("olive") == strValue) ||
|
||||
(_T("oliveDrab") == strValue) ||
|
||||
(_T("orange") == strValue) ||
|
||||
(_T("orangeRed") == strValue) ||
|
||||
(_T("orchid") == strValue) ||
|
||||
(_T("paleGoldenrod") == strValue) ||
|
||||
(_T("paleGreen") == strValue) ||
|
||||
(_T("paleTurquoise") == strValue) ||
|
||||
(_T("paleVioletRed") == strValue) ||
|
||||
(_T("papayaWhip") == strValue) ||
|
||||
(_T("peachPuff") == strValue) ||
|
||||
(_T("peru") == strValue) ||
|
||||
(_T("pink") == strValue) ||
|
||||
(_T("plum") == strValue) ||
|
||||
(_T("powderBlue") == strValue) ||
|
||||
(_T("purple") == strValue) ||
|
||||
(_T("red") == strValue) ||
|
||||
(_T("rosyBrown") == strValue) ||
|
||||
(_T("royalBlue") == strValue) ||
|
||||
(_T("saddleBrown") == strValue) ||
|
||||
(_T("salmon") == strValue) ||
|
||||
(_T("sandyBrown") == strValue) ||
|
||||
(_T("seaGreen") == strValue) ||
|
||||
(_T("seaShell") == strValue) ||
|
||||
(_T("sienna") == strValue) ||
|
||||
(_T("silver") == strValue) ||
|
||||
(_T("skyBlue") == strValue) ||
|
||||
(_T("slateBlue") == strValue) ||
|
||||
(_T("slateGray") == strValue) ||
|
||||
(_T("slateGrey") == strValue) ||
|
||||
(_T("snow") == strValue) ||
|
||||
(_T("springGreen") == strValue) ||
|
||||
(_T("steelBlue") == strValue) ||
|
||||
(_T("tan") == strValue) ||
|
||||
(_T("teal") == strValue) ||
|
||||
(_T("thistle") == strValue) ||
|
||||
(_T("tomato") == strValue) ||
|
||||
(_T("turquoise") == strValue) ||
|
||||
(_T("violet") == strValue) ||
|
||||
(_T("wheat") == strValue) ||
|
||||
(_T("white") == strValue) ||
|
||||
(_T("whiteSmoke") == strValue) ||
|
||||
(_T("yellow") == strValue) ||
|
||||
(_T("yellowGreen") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_PRSTCLRVAL_INCLUDE_H_
|
||||
101
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PrstDashVal.h
Normal file
101
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/PrstDashVal.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_LIMIT_PRSTDASHVAL_INCLUDE_H_
|
||||
#define PPTX_LIMIT_PRSTDASHVAL_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class PrstDashVal : public BaseLimit
|
||||
{
|
||||
public:
|
||||
PrstDashVal()
|
||||
{
|
||||
m_strValue = _T("solid");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("dash") == strValue) ||
|
||||
(_T("dashDot") == strValue) ||
|
||||
(_T("dot") == strValue) ||
|
||||
(_T("lgDash") == strValue) ||
|
||||
(_T("lgDashDot") == strValue) ||
|
||||
(_T("lgDashDotDot") == strValue) ||
|
||||
(_T("solid") == strValue) ||
|
||||
(_T("sysDash") == strValue) ||
|
||||
(_T("sysDashDot") == strValue) ||
|
||||
(_T("sysDashDotDot") == strValue) ||
|
||||
(_T("sysDot") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("dash") == m_strValue)
|
||||
return 0;
|
||||
if (_T("dashDot") == m_strValue)
|
||||
return 1;
|
||||
if (_T("dot") == m_strValue)
|
||||
return 2;
|
||||
if (_T("lgDash") == m_strValue)
|
||||
return 3;
|
||||
if (_T("lgDashDot") == m_strValue)
|
||||
return 4;
|
||||
if (_T("lgDashDotDot") == m_strValue)
|
||||
return 5;
|
||||
if (_T("solid") == m_strValue)
|
||||
return 6;
|
||||
if (_T("sysDash") == m_strValue)
|
||||
return 7;
|
||||
if (_T("sysDashDot") == m_strValue)
|
||||
return 8;
|
||||
if (_T("sysDashDotDot") == m_strValue)
|
||||
return 9;
|
||||
if (_T("sysDot") == m_strValue)
|
||||
return 10;
|
||||
return 6;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_PRSTDASHVAL_INCLUDE_H_
|
||||
95
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/RectAlign.h
Normal file
95
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/RectAlign.h
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* (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_LIMIT_RECTALIGN_INCLUDE_H_
|
||||
#define PPTX_LIMIT_RECTALIGN_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class RectAlign : public BaseLimit
|
||||
{
|
||||
public:
|
||||
RectAlign()
|
||||
{
|
||||
m_strValue = _T("tl");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("b") == strValue) ||
|
||||
(_T("bl") == strValue) ||
|
||||
(_T("br") == strValue) ||
|
||||
(_T("ctr") == strValue) ||
|
||||
(_T("l") == strValue) ||
|
||||
(_T("r") == strValue) ||
|
||||
(_T("t") == strValue) ||
|
||||
(_T("tl") == strValue) ||
|
||||
(_T("tr") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("b") == m_strValue)
|
||||
return 0;
|
||||
if (_T("bl") == m_strValue)
|
||||
return 1;
|
||||
if (_T("br") == m_strValue)
|
||||
return 2;
|
||||
if (_T("ctr") == m_strValue)
|
||||
return 3;
|
||||
if (_T("l") == m_strValue)
|
||||
return 4;
|
||||
if (_T("r") == m_strValue)
|
||||
return 5;
|
||||
if (_T("t") == m_strValue)
|
||||
return 6;
|
||||
if (_T("tl") == m_strValue)
|
||||
return 7;
|
||||
if (_T("tr") == m_strValue)
|
||||
return 8;
|
||||
return 7;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_RECTALIGN_INCLUDE_H_
|
||||
124
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/SchemeClrVal.h
Normal file
124
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/SchemeClrVal.h
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* (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_LIMIT_SCHEMECLRVAL_INCLUDE_H_
|
||||
#define PPTX_LIMIT_SCHEMECLRVAL_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class SchemeClrVal : public BaseLimit
|
||||
{
|
||||
public:
|
||||
SchemeClrVal()
|
||||
{
|
||||
m_strValue = _T("accent1");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("accent1") == strValue) ||
|
||||
(_T("accent2") == strValue) ||
|
||||
(_T("accent3") == strValue) ||
|
||||
(_T("accent4") == strValue) ||
|
||||
(_T("accent5") == strValue) ||
|
||||
(_T("accent6") == strValue) ||
|
||||
(_T("bg1") == strValue) ||
|
||||
(_T("bg2") == strValue) ||
|
||||
(_T("dk1") == strValue) ||
|
||||
(_T("dk2") == strValue) ||
|
||||
(_T("folHlink") == strValue) ||
|
||||
(_T("hlink") == strValue) ||
|
||||
(_T("lt1") == strValue) ||
|
||||
(_T("lt2") == strValue) ||
|
||||
(_T("phClr") == strValue) ||
|
||||
(_T("tx1") == strValue) ||
|
||||
(_T("tx2") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("accent1") == m_strValue)
|
||||
return 0;
|
||||
if (_T("accent2") == m_strValue)
|
||||
return 1;
|
||||
if (_T("accent3") == m_strValue)
|
||||
return 2;
|
||||
if (_T("accent4") == m_strValue)
|
||||
return 3;
|
||||
if (_T("accent5") == m_strValue)
|
||||
return 4;
|
||||
if (_T("accent6") == m_strValue)
|
||||
return 5;
|
||||
|
||||
if (_T("bg1") == m_strValue)
|
||||
return 6;
|
||||
if (_T("bg2") == m_strValue)
|
||||
return 7;
|
||||
|
||||
if (_T("dk1") == m_strValue)
|
||||
return 8;
|
||||
if (_T("dk2") == m_strValue)
|
||||
return 9;
|
||||
|
||||
if (_T("folHlink") == m_strValue)
|
||||
return 10;
|
||||
if (_T("hlink") == m_strValue)
|
||||
return 11;
|
||||
|
||||
if (_T("lt1") == m_strValue)
|
||||
return 12;
|
||||
if (_T("lt2") == m_strValue)
|
||||
return 13;
|
||||
if (_T("phClr") == m_strValue)
|
||||
return 14;
|
||||
if (_T("tx1") == m_strValue)
|
||||
return 15;
|
||||
if (_T("tx2") == m_strValue)
|
||||
return 16;
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_SCHEMECLRVAL_INCLUDE_H_
|
||||
250
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/ShapeType.h
Normal file
250
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/ShapeType.h
Normal file
@@ -0,0 +1,250 @@
|
||||
/*
|
||||
* (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_LIMIT_SHAPETYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_SHAPETYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class ShapeType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
ShapeType()
|
||||
{
|
||||
m_strValue = _T("rect");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("accentBorderCallout1") == strValue) ||
|
||||
(_T("accentBorderCallout2") == strValue) ||
|
||||
(_T("accentBorderCallout3") == strValue) ||
|
||||
(_T("accentCallout1") == strValue) ||
|
||||
(_T("accentCallout2") == strValue) ||
|
||||
(_T("accentCallout3") == strValue) ||
|
||||
(_T("actionButtonBackPrevious") == strValue) ||
|
||||
(_T("actionButtonBeginning") == strValue) ||
|
||||
(_T("actionButtonBlank") == strValue) ||
|
||||
(_T("actionButtonDocument") == strValue) ||
|
||||
(_T("actionButtonEnd") == strValue) ||
|
||||
(_T("actionButtonForwardNext") == strValue) ||
|
||||
(_T("actionButtonHelp") == strValue) ||
|
||||
(_T("actionButtonHome") == strValue) ||
|
||||
(_T("actionButtonInformation") == strValue) ||
|
||||
(_T("actionButtonMovie") == strValue) ||
|
||||
(_T("actionButtonReturn") == strValue) ||
|
||||
(_T("actionButtonSound") == strValue) ||
|
||||
(_T("arc") == strValue) ||
|
||||
(_T("bentArrow") == strValue) ||
|
||||
(_T("bentConnector2") == strValue) ||
|
||||
(_T("bentConnector3") == strValue) ||
|
||||
(_T("bentConnector4") == strValue) ||
|
||||
(_T("bentConnector5") == strValue) ||
|
||||
(_T("bentUpArrow") == strValue) ||
|
||||
(_T("bevel") == strValue) ||
|
||||
(_T("blockArc") == strValue) ||
|
||||
(_T("borderCallout1") == strValue) ||
|
||||
(_T("borderCallout2") == strValue) ||
|
||||
(_T("borderCallout3") == strValue) ||
|
||||
(_T("bracePair") == strValue) ||
|
||||
(_T("bracketPair") == strValue) ||
|
||||
(_T("callout1") == strValue) ||
|
||||
(_T("callout2") == strValue) ||
|
||||
(_T("callout3") == strValue) ||
|
||||
(_T("can") == strValue) ||
|
||||
(_T("chartPlus") == strValue) ||
|
||||
(_T("chartStar") == strValue) ||
|
||||
(_T("chartX") == strValue) ||
|
||||
(_T("chevron") == strValue) ||
|
||||
(_T("chord") == strValue) ||
|
||||
(_T("circularArrow") == strValue) ||
|
||||
(_T("cloud") == strValue) ||
|
||||
(_T("cloudCallout") == strValue) ||
|
||||
(_T("corner") == strValue) ||
|
||||
(_T("cornerTabs") == strValue) ||
|
||||
(_T("cube") == strValue) ||
|
||||
(_T("curvedConnector2") == strValue) ||
|
||||
(_T("curvedConnector3") == strValue) ||
|
||||
(_T("curvedConnector4") == strValue) ||
|
||||
(_T("curvedConnector5") == strValue) ||
|
||||
(_T("curvedDownArrow") == strValue) ||
|
||||
(_T("curvedLeftArrow") == strValue) ||
|
||||
(_T("curvedRightArrow") == strValue) ||
|
||||
(_T("curvedUpArrow") == strValue) ||
|
||||
(_T("decagon") == strValue) ||
|
||||
(_T("diagStripe") == strValue) ||
|
||||
(_T("diamond") == strValue) ||
|
||||
(_T("dodecagon") == strValue) ||
|
||||
(_T("donut") == strValue) ||
|
||||
(_T("doubleWave") == strValue) ||
|
||||
(_T("downArrow") == strValue) ||
|
||||
(_T("downArrowCallout") == strValue) ||
|
||||
(_T("ellipse") == strValue) ||
|
||||
(_T("ellipseRibbon") == strValue) ||
|
||||
(_T("ellipseRibbon2") == strValue) ||
|
||||
(_T("flowChartAlternateProcess") == strValue) ||
|
||||
(_T("flowChartCollate") == strValue) ||
|
||||
(_T("flowChartConnector") == strValue) ||
|
||||
(_T("flowChartDecision") == strValue) ||
|
||||
(_T("flowChartDelay") == strValue) ||
|
||||
(_T("flowChartDisplay") == strValue) ||
|
||||
(_T("flowChartDocument") == strValue) ||
|
||||
(_T("flowChartExtract") == strValue) ||
|
||||
(_T("flowChartInputOutput") == strValue) ||
|
||||
(_T("flowChartInternalStorage") == strValue) ||
|
||||
(_T("flowChartMagneticDisk") == strValue) ||
|
||||
(_T("flowChartMagneticDrum") == strValue) ||
|
||||
(_T("flowChartMagneticTape") == strValue) ||
|
||||
(_T("flowChartManualInput") == strValue) ||
|
||||
(_T("flowChartManualOperation") == strValue) ||
|
||||
(_T("flowChartMerge") == strValue) ||
|
||||
(_T("flowChartMultidocument") == strValue) ||
|
||||
(_T("flowChartOfflineStorage") == strValue) ||
|
||||
(_T("flowChartOffpageConnector") == strValue) ||
|
||||
(_T("flowChartOnlineStorage") == strValue) ||
|
||||
(_T("flowChartOr") == strValue) ||
|
||||
(_T("flowChartPredefinedProcess") == strValue) ||
|
||||
(_T("flowChartPreparation") == strValue) ||
|
||||
(_T("flowChartProcess") == strValue) ||
|
||||
(_T("flowChartPunchedCard") == strValue) ||
|
||||
(_T("flowChartPunchedTape") == strValue) ||
|
||||
(_T("flowChartSort") == strValue) ||
|
||||
(_T("flowChartSummingJunction") == strValue) ||
|
||||
(_T("flowChartTerminator") == strValue) ||
|
||||
(_T("foldedCorner") == strValue) ||
|
||||
(_T("frame") == strValue) ||
|
||||
(_T("funnel") == strValue) ||
|
||||
(_T("gear6") == strValue) ||
|
||||
(_T("gear9") == strValue) ||
|
||||
(_T("halfFrame") == strValue) ||
|
||||
(_T("heart") == strValue) ||
|
||||
(_T("heptagon") == strValue) ||
|
||||
(_T("hexagon") == strValue) ||
|
||||
(_T("homePlate") == strValue) ||
|
||||
(_T("horizontalScroll") == strValue) ||
|
||||
(_T("irregularSeal1") == strValue) ||
|
||||
(_T("irregularSeal2") == strValue) ||
|
||||
(_T("leftArrow") == strValue) ||
|
||||
(_T("leftArrowCallout") == strValue) ||
|
||||
(_T("leftBrace") == strValue) ||
|
||||
(_T("leftBracket") == strValue) ||
|
||||
(_T("leftCircularArrow") == strValue) ||
|
||||
(_T("leftRightArrow") == strValue) ||
|
||||
(_T("leftRightArrowCallout") == strValue) ||
|
||||
(_T("leftRightCircularArrow") == strValue) ||
|
||||
(_T("leftRightRibbon") == strValue) ||
|
||||
(_T("leftRightUpArrow") == strValue) ||
|
||||
(_T("leftUpArrow") == strValue) ||
|
||||
(_T("lightningBolt") == strValue) ||
|
||||
(_T("line") == strValue) ||
|
||||
(_T("lineInv") == strValue) ||
|
||||
(_T("mathDivide") == strValue) ||
|
||||
(_T("mathEqual") == strValue) ||
|
||||
(_T("mathMinus") == strValue) ||
|
||||
(_T("mathMultiply") == strValue) ||
|
||||
(_T("mathNotEqual") == strValue) ||
|
||||
(_T("mathPlus") == strValue) ||
|
||||
(_T("moon") == strValue) ||
|
||||
(_T("nonIsoscelesTrapezoid") == strValue) ||
|
||||
(_T("noSmoking") == strValue) ||
|
||||
(_T("notchedRightArrow") == strValue) ||
|
||||
(_T("octagon") == strValue) ||
|
||||
(_T("parallelogram") == strValue) ||
|
||||
(_T("pentagon") == strValue) ||
|
||||
(_T("pie") == strValue) ||
|
||||
(_T("pieWedge") == strValue) ||
|
||||
(_T("plaque") == strValue) ||
|
||||
(_T("plaqueTabs") == strValue) ||
|
||||
(_T("plus") == strValue) ||
|
||||
(_T("quadArrow") == strValue) ||
|
||||
(_T("quadArrowCallout") == strValue) ||
|
||||
(_T("rect") == strValue) ||
|
||||
(_T("ribbon") == strValue) ||
|
||||
(_T("ribbon2") == strValue) ||
|
||||
(_T("rightArrow") == strValue) ||
|
||||
(_T("rightArrowCallout") == strValue) ||
|
||||
(_T("rightBrace") == strValue) ||
|
||||
(_T("rightBracket") == strValue) ||
|
||||
(_T("round1Rect") == strValue) ||
|
||||
(_T("round2DiagRect") == strValue) ||
|
||||
(_T("round2SameRect") == strValue) ||
|
||||
(_T("roundRect") == strValue) ||
|
||||
(_T("rtTriangle") == strValue) ||
|
||||
(_T("smileyFace") == strValue) ||
|
||||
(_T("snip1Rect") == strValue) ||
|
||||
(_T("snip2DiagRect") == strValue) ||
|
||||
(_T("snip2SameRect") == strValue) ||
|
||||
(_T("snipRoundRect") == strValue) ||
|
||||
(_T("squareTabs") == strValue) ||
|
||||
(_T("star10") == strValue) ||
|
||||
(_T("star12") == strValue) ||
|
||||
(_T("star16") == strValue) ||
|
||||
(_T("star24") == strValue) ||
|
||||
(_T("star32") == strValue) ||
|
||||
(_T("star4") == strValue) ||
|
||||
(_T("star5") == strValue) ||
|
||||
(_T("star6") == strValue) ||
|
||||
(_T("star7") == strValue) ||
|
||||
(_T("star8") == strValue) ||
|
||||
(_T("straightConnector1") == strValue) ||
|
||||
(_T("stripedRightArrow") == strValue) ||
|
||||
(_T("sun") == strValue) ||
|
||||
(_T("swooshArrow") == strValue) ||
|
||||
(_T("teardrop") == strValue) ||
|
||||
(_T("trapezoid") == strValue) ||
|
||||
(_T("triangle") == strValue) ||
|
||||
(_T("upArrow") == strValue) ||
|
||||
(_T("upArrowCallout") == strValue) ||
|
||||
(_T("upDownArrow") == strValue) ||
|
||||
(_T("upDownArrowCallout") == strValue) ||
|
||||
(_T("uturnArrow") == strValue) ||
|
||||
(_T("verticalScroll") == strValue) ||
|
||||
(_T("wave") == strValue) ||
|
||||
(_T("wedgeEllipseCallout") == strValue) ||
|
||||
(_T("wedgeRectCallout") == strValue) ||
|
||||
(_T("wedgeRoundRectCallout") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_SHAPETYPE_INCLUDE_H_
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* (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_LIMIT_SIDEDIRECTIONVAL_INCLUDE_H_
|
||||
#define PPTX_LIMIT_SIDEDIRECTIONVAL_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class SideDirectionVal : public BaseLimit
|
||||
{
|
||||
public:
|
||||
SideDirectionVal()
|
||||
{
|
||||
m_strValue = _T("l");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("d") == strValue) ||
|
||||
(_T("l") == strValue) ||
|
||||
(_T("r") == strValue) ||
|
||||
(_T("u") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_SIDEDIRECTIONVAL_INCLUDE_H_
|
||||
141
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/SlideLayoutType.h
Normal file
141
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/SlideLayoutType.h
Normal file
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* (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_LIMIT_SLIDELAYOUTTYPE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_SLIDELAYOUTTYPE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class SlideLayoutType : public BaseLimit
|
||||
{
|
||||
public:
|
||||
SlideLayoutType()
|
||||
{
|
||||
m_strValue = _T("blank");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("blank") == strValue) ||
|
||||
(_T("chart") == strValue) ||
|
||||
(_T("chartAndTx") == strValue) ||
|
||||
(_T("clipArtAndTx") == strValue) ||
|
||||
(_T("clipArtAndVertTx") == strValue) ||
|
||||
(_T("cust") == strValue) ||
|
||||
(_T("dgm") == strValue) ||
|
||||
(_T("fourObj") == strValue) ||
|
||||
(_T("mediaAndTx") == strValue) ||
|
||||
(_T("obj") == strValue) ||
|
||||
(_T("objAndTwoObj") == strValue) ||
|
||||
(_T("objAndTx") == strValue) ||
|
||||
(_T("objOnly") == strValue) ||
|
||||
(_T("objOverTx") == strValue) ||
|
||||
(_T("objTx") == strValue) ||
|
||||
(_T("picTx") == strValue) ||
|
||||
(_T("secHead") == strValue) ||
|
||||
(_T("tbl") == strValue) ||
|
||||
(_T("title") == strValue) ||
|
||||
(_T("titleOnly") == strValue) ||
|
||||
(_T("twoColTx") == strValue) ||
|
||||
(_T("twoObj") == strValue) ||
|
||||
(_T("twoObjAndObj") == strValue) ||
|
||||
(_T("twoObjAndTx") == strValue) ||
|
||||
(_T("twoObjOverTx") == strValue) ||
|
||||
(_T("twoTxTwoObj") == strValue) ||
|
||||
(_T("tx") == strValue) ||
|
||||
(_T("txAndChart") == strValue) ||
|
||||
(_T("txAndClipArt") == strValue) ||
|
||||
(_T("txAndMedia") == strValue) ||
|
||||
(_T("txAndObj") == strValue) ||
|
||||
(_T("txAndTwoObj") == strValue) ||
|
||||
(_T("txOverObj") == strValue) ||
|
||||
(_T("vertTitleAndTx") == strValue) ||
|
||||
(_T("vertTitleAndTxOverChart") == strValue) ||
|
||||
(_T("vertTx") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("blank") == m_strValue) return 0;
|
||||
if (_T("chart") == m_strValue) return 1;
|
||||
if (_T("chartAndTx") == m_strValue) return 2;
|
||||
if (_T("clipArtAndTx") == m_strValue) return 3;
|
||||
if (_T("clipArtAndVertTx") == m_strValue) return 4;
|
||||
if (_T("cust") == m_strValue) return 5;
|
||||
if (_T("dgm") == m_strValue) return 6;
|
||||
if (_T("fourObj") == m_strValue) return 7;
|
||||
if (_T("mediaAndTx") == m_strValue) return 8;
|
||||
if (_T("obj") == m_strValue) return 9;
|
||||
if (_T("objAndTwoObj") == m_strValue) return 10;
|
||||
if (_T("objAndTx") == m_strValue) return 11;
|
||||
if (_T("objOnly") == m_strValue) return 12;
|
||||
if (_T("objOverTx") == m_strValue) return 13;
|
||||
if (_T("objTx") == m_strValue) return 14;
|
||||
if (_T("picTx") == m_strValue) return 15;
|
||||
if (_T("secHead") == m_strValue) return 16;
|
||||
if (_T("tbl") == m_strValue) return 17;
|
||||
if (_T("title") == m_strValue) return 18;
|
||||
if (_T("titleOnly") == m_strValue) return 19;
|
||||
if (_T("twoColTx") == m_strValue) return 20;
|
||||
if (_T("twoObj") == m_strValue) return 21;
|
||||
if (_T("twoObjAndObj") == m_strValue) return 22;
|
||||
if (_T("twoObjAndTx") == m_strValue) return 23;
|
||||
if (_T("twoObjOverTx") == m_strValue) return 24;
|
||||
if (_T("twoTxTwoObj") == m_strValue) return 25;
|
||||
if (_T("tx") == m_strValue) return 26;
|
||||
if (_T("txAndChart") == m_strValue) return 27;
|
||||
if (_T("txAndClipArt") == m_strValue) return 28;
|
||||
if (_T("txAndMedia") == m_strValue) return 29;
|
||||
if (_T("txAndObj") == m_strValue) return 30;
|
||||
if (_T("txAndTwoObj") == m_strValue) return 31;
|
||||
if (_T("txOverObj") == m_strValue) return 32;
|
||||
if (_T("vertTitleAndTx") == m_strValue) return 33;
|
||||
if (_T("vertTitleAndTxOverChart") == m_strValue) return 34;
|
||||
if (_T("vertTx") == m_strValue) return 35;
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_SLIDELAYOUTTYPE_INCLUDE_H_
|
||||
126
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/SlideSize.h
Normal file
126
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/SlideSize.h
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* (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_LIMIT_SLIDESIZE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_SLIDESIZE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class SlideSize : public BaseLimit
|
||||
{
|
||||
public:
|
||||
SlideSize()
|
||||
{
|
||||
m_strValue = _T("screen4x3");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("35mm") == strValue) ||
|
||||
(_T("A3") == strValue) ||
|
||||
(_T("A4") == strValue) ||
|
||||
(_T("B4ISO") == strValue) ||
|
||||
(_T("B4JIS") == strValue) ||
|
||||
(_T("B5ISO") == strValue) ||
|
||||
(_T("B5JIS") == strValue) ||
|
||||
(_T("banner") == strValue) ||
|
||||
(_T("custom") == strValue) ||
|
||||
(_T("hagakiCard") == strValue) ||
|
||||
(_T("ledger") == strValue) ||
|
||||
(_T("letter") == strValue) ||
|
||||
(_T("overhead") == strValue) ||
|
||||
(_T("screen16x10") == strValue) ||
|
||||
(_T("screen16x9") == strValue) ||
|
||||
(_T("screen4x3") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("35mm") == m_strValue) return 0;
|
||||
if (_T("A3") == m_strValue) return 1;
|
||||
if (_T("A4") == m_strValue) return 2;
|
||||
if (_T("B4ISO") == m_strValue) return 3;
|
||||
if (_T("B4JIS") == m_strValue) return 4;
|
||||
if (_T("B5ISO") == m_strValue) return 5;
|
||||
if (_T("B5JIS") == m_strValue) return 6;
|
||||
if (_T("banner") == m_strValue) return 7;
|
||||
if (_T("custom") == m_strValue) return 8;
|
||||
if (_T("hagakiCard") == m_strValue) return 9;
|
||||
if (_T("ledger") == m_strValue) return 10;
|
||||
if (_T("letter") == m_strValue) return 11;
|
||||
if (_T("overhead") == m_strValue) return 12;
|
||||
if (_T("screen16x10") == m_strValue) return 13;
|
||||
if (_T("screen16x9") == m_strValue) return 14;
|
||||
if (_T("screen4x3") == m_strValue) return 15;
|
||||
|
||||
return 15;
|
||||
}
|
||||
virtual void SetBYTECode(const BYTE& type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case 0: m_strValue = _T("35mm"); break;
|
||||
case 1: m_strValue = _T("A3"); break;
|
||||
case 2: m_strValue = _T("A4"); break;
|
||||
case 3: m_strValue = _T("B4ISO"); break;
|
||||
case 4: m_strValue = _T("B4JIS"); break;
|
||||
case 5: m_strValue = _T("B5ISO"); break;
|
||||
case 6: m_strValue = _T("B5JIS"); break;
|
||||
case 7: m_strValue = _T("banner"); break;
|
||||
case 8: m_strValue = _T("custom"); break;
|
||||
case 9: m_strValue = _T("hagakiCard"); break;
|
||||
case 10: m_strValue = _T("ledger"); break;
|
||||
case 11: m_strValue = _T("letter"); break;
|
||||
case 12: m_strValue = _T("overhead"); break;
|
||||
case 13: m_strValue = _T("screen16x10"); break;
|
||||
case 14: m_strValue = _T("screen16x9"); break;
|
||||
case 15: m_strValue = _T("screen4x3"); break;
|
||||
default:
|
||||
m_strValue = _T("screen4x3");
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_SLIDESIZE_INCLUDE_H_
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* (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_LIMIT_SPLITTER_BAR_STATE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_SPLITTER_BAR_STATE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class SplitterBarState : public BaseLimit
|
||||
{
|
||||
public:
|
||||
SplitterBarState()
|
||||
{
|
||||
m_strValue = _T("restored");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("maximized") == strValue) ||
|
||||
(_T("minimized") == strValue) ||
|
||||
(_T("restored") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
|
||||
virtual BYTE GetBYTECode() const
|
||||
{
|
||||
if (_T("maximized") == m_strValue)
|
||||
return 0;
|
||||
if (_T("minimized") == m_strValue)
|
||||
return 1;
|
||||
if (_T("restored") == m_strValue)
|
||||
return 2;
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_SPLITTER_BAR_STATE_INCLUDE_H_
|
||||
93
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/SysClrVal.h
Normal file
93
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/SysClrVal.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_LIMIT_SYSCLRVAL_INCLUDE_H_
|
||||
#define PPTX_LIMIT_SYSCLRVAL_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class SysClrVal : public BaseLimit
|
||||
{
|
||||
public:
|
||||
SysClrVal()
|
||||
{
|
||||
m_strValue = _T("window");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("3dDkShadow") == strValue) ||
|
||||
(_T("3dLight") == strValue) ||
|
||||
(_T("activeBorder") == strValue) ||
|
||||
(_T("activeCaption") == strValue) ||
|
||||
(_T("appWorkspace") == strValue) ||
|
||||
(_T("background") == strValue) ||
|
||||
(_T("btnFace") == strValue) ||
|
||||
(_T("btnHighlight") == strValue) ||
|
||||
(_T("btnShadow") == strValue) ||
|
||||
(_T("btnText") == strValue) ||
|
||||
(_T("captionText") == strValue) ||
|
||||
(_T("gradientActiveCaption") == strValue) ||
|
||||
(_T("gradientInactiveCaption") == strValue) ||
|
||||
(_T("grayText") == strValue) ||
|
||||
(_T("highlight") == strValue) ||
|
||||
(_T("highlightText") == strValue) ||
|
||||
(_T("hotLight") == strValue) ||
|
||||
(_T("inactiveBorder") == strValue) ||
|
||||
(_T("inactiveCaption") == strValue) ||
|
||||
(_T("inactiveCaptionText") == strValue) ||
|
||||
(_T("infoBk") == strValue) ||
|
||||
(_T("infoText") == strValue) ||
|
||||
(_T("menu") == strValue) ||
|
||||
(_T("menuBar") == strValue) ||
|
||||
(_T("menuHighlight") == strValue) ||
|
||||
(_T("menuText") == strValue) ||
|
||||
(_T("scrollBar") == strValue) ||
|
||||
(_T("window") == strValue) ||
|
||||
(_T("windowFrame") == strValue) ||
|
||||
(_T("windowText") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_SYSCLRVAL_INCLUDE_H_
|
||||
65
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/TLAccumulate.h
Normal file
65
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/TLAccumulate.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* (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_LIMIT_TLACCUMULATE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_TLACCUMULATE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class TLAccumulate : public BaseLimit
|
||||
{
|
||||
public:
|
||||
TLAccumulate()
|
||||
{
|
||||
m_strValue = _T("none");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("always") == strValue) ||
|
||||
(_T("none") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_TLACCUMULATE_INCLUDE_H_
|
||||
68
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/TLAdditive.h
Normal file
68
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/TLAdditive.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* (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_LIMIT_TLADDITIVE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_TLADDITIVE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class TLAdditive : public BaseLimit
|
||||
{
|
||||
public:
|
||||
TLAdditive()
|
||||
{
|
||||
m_strValue = _T("none");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("base") == strValue) ||
|
||||
(_T("mult") == strValue) ||
|
||||
(_T("none") == strValue) ||
|
||||
(_T("repl") == strValue) ||
|
||||
(_T("sum") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_TLADDITIVE_INCLUDE_H_
|
||||
66
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/TLCalcMode.h
Normal file
66
ActiveX/ASCOfficePPTXFile/PPTXFormat/Limit/TLCalcMode.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* (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_LIMIT_TLCALCMODE_INCLUDE_H_
|
||||
#define PPTX_LIMIT_TLCALCMODE_INCLUDE_H_
|
||||
|
||||
#include "BaseLimit.h"
|
||||
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Limit
|
||||
{
|
||||
class TLCalcMode : public BaseLimit
|
||||
{
|
||||
public:
|
||||
TLCalcMode()
|
||||
{
|
||||
m_strValue = _T("lin");
|
||||
}
|
||||
|
||||
_USE_STRING_OPERATOR
|
||||
|
||||
virtual void set(const CString& strValue)
|
||||
{
|
||||
if ((_T("lin") == strValue) ||
|
||||
(_T("fmla") == strValue) ||
|
||||
(_T("discrete") == strValue))
|
||||
{
|
||||
m_strValue = strValue;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PPTX_LIMIT_TLCALCMODE_INCLUDE_H_
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user