init repo

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

View File

@@ -0,0 +1,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
*
*/
#include "precompiled_docxformat.h"
#include "App.h"
#include "FileTypes.h"
namespace OOX
{
App::App()
{
}
App::App(const OOX::CPath& filename)
{
read(filename);
}
App::~App()
{
}
void App::read(const OOX::CPath& filename)
{
}
void App::write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
{
}
const FileType App::type() const
{
return FileTypes::App;
}
const OOX::CPath App::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const OOX::CPath App::DefaultFileName() const
{
return type().DefaultFileName();
}
} // namespace OOX

View File

@@ -0,0 +1,58 @@
/*
* (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_APP_INCLUDE_H_
#define OOX_APP_INCLUDE_H_
#include "File.h"
namespace OOX
{
class App : public OOX::File
{
public:
App();
App(const OOX::CPath& filename);
virtual ~App();
public:
virtual void read(const OOX::CPath& filename);
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const;
public:
virtual const FileType type() const;
virtual const OOX::CPath DefaultDirectory() const;
virtual const OOX::CPath DefaultFileName() const;
};
}
#endif // OOX_APP_INCLUDE_H_

View File

@@ -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
*
*/
#include "precompiled_docxformat.h"
#include "Default.h"
#include "Extensiontable.h"
namespace OOX
{
namespace ContentTypes
{
Default::Default(const std::wstring& extension)
: m_extension(extension)
{
}
Default::Default(const wchar_t* extension)
: m_extension(extension)
{
}
Default::~Default()
{
}
Default::Default(const XML::XNode& node)
{
fromXML(node);
}
const Default& Default::operator =(const XML::XNode& node)
{
fromXML(node);
return *this;
}
void Default::fromXML(const XML::XNode& node)
{
const XML::XElement element(node);
m_extension = element.attribute("Extension").value();
}
const XML::XNode Default::toXML() const
{
static const ExtensionTable table;
return
XML::XElement("Default",
XML::XAttribute("Extension", m_extension) +
XML::XAttribute("ContentType", table[m_extension])
);
}
const bool Default::operator ==(const std::wstring& rhs) const
{
return m_extension == rhs;
}
}
} // namespace OOX

View 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 OOX_CONTENT_TYPES_DEFAULT_INCLUDE_H_
#define OOX_CONTENT_TYPES_DEFAULT_INCLUDE_H_
#include <string>
#include "./../WritingElement.h"
namespace OOX
{
namespace ContentTypes
{
class Default : public WritingElement
{
public:
Default(const std::wstring& extension);
Default(const wchar_t* extension);
virtual ~Default();
explicit Default(const XML::XNode& node);
const Default& operator =(const XML::XNode& node);
public:
virtual void fromXML(const XML::XNode& node);
virtual const XML::XNode toXML() const;
public:
const bool operator ==(const std::wstring& rhs) const;
private:
std::wstring m_extension;
};
}
}
#endif // OOX_CONTENT_TYPES_DEFAULT_INCLUDE_H_

View File

@@ -0,0 +1,87 @@
/*
* (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 "precompiled_docxformat.h"
#include "DefaultTable.h"
namespace OOX
{
namespace ContentTypes
{
DefaultTable::DefaultTable()
{
m_items.push_back(L"rels");
m_items.push_back(L"xml");
}
DefaultTable::~DefaultTable()
{
}
DefaultTable::DefaultTable(const XML::XNode& node)
{
fromXML(node);
}
const DefaultTable& DefaultTable::operator =(const XML::XNode& node)
{
fromXML(node);
return *this;
}
void DefaultTable::fromXML(const XML::XNode& node)
{
const XML::XElement element(node);
XML::Fill(m_items, element, "Default");
}
void DefaultTable::add(const OOX::CPath& path)
{
const std::wstring extension = std::wstring(OOX::CSystemUtility::GetFileExtention(path.GetPath()));
if (std::find(begin(), end(), extension) == end())
m_items.push_back(extension);
}
}
} // namespace OOX

View File

@@ -0,0 +1,60 @@
/*
* (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();
virtual ~DefaultTable();
explicit DefaultTable(const XML::XNode& node);
const DefaultTable& operator =(const XML::XNode& node);
public:
virtual void fromXML(const XML::XNode& node);
public:
void add(const OOX::CPath& path);
};
}
}
#endif // OOX_CONTENT)TYPES_DEFAULT_TABLE_INCLUDE_H_

View File

@@ -0,0 +1,89 @@
/*
* (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 "precompiled_docxformat.h"
#include "ExtensionTable.h"
#include "Exception/log_range_error.h"
#include "ToString.h"
namespace OOX
{
namespace ContentTypes
{
ExtensionTable::ExtensionTable()
{
m_table.insert(std::make_pair(L"gif", "image/gif"));
m_table.insert(std::make_pair(L"png", "image/png"));
m_table.insert(std::make_pair(L"tif", "image/tiff"));
m_table.insert(std::make_pair(L"tiff", "image/tiff"));
m_table.insert(std::make_pair(L"jpeg", "image/jpeg"));
m_table.insert(std::make_pair(L"jpg", "image/jpeg"));
m_table.insert(std::make_pair(L"jpe", "image/jpeg"));
m_table.insert(std::make_pair(L"jfif", "image/jpeg"));
m_table.insert(std::make_pair(L"rels", "application/vnd.openxmlformats-package.relationships+xml"));
m_table.insert(std::make_pair(L"bin", "application/vnd.openxmlformats-officedocument.oleObject"));
m_table.insert(std::make_pair(L"xml", "application/xml"));
m_table.insert(std::make_pair(L"emf", "image/x-emf"));
m_table.insert(std::make_pair(L"emz", "image/x-emz"));
m_table.insert(std::make_pair(L"wmf", "image/x-wmf"));
m_table.insert(std::make_pair(L"svm", "image/svm"));
m_table.insert(std::make_pair(L"wav", "audio/wav"));
m_table.insert(std::make_pair(L"xls", "application/vnd.ms-excel"));
m_table.insert(std::make_pair(L"xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"));
m_table.insert(std::make_pair(L"xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12"));
m_table.insert(std::make_pair(L"xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"));
m_table.insert(std::make_pair(L"ppt", "application/vnd.ms-powerpoint"));
m_table.insert(std::make_pair(L"pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"));
m_table.insert(std::make_pair(L"pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"));
m_table.insert(std::make_pair(L"sldm", "application/vnd.ms-powerpoint.slide.macroEnabled.12"));
m_table.insert(std::make_pair(L"sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide"));
m_table.insert(std::make_pair(L"doc", "application/msword"));
m_table.insert(std::make_pair(L"docm", "aapplication/vnd.ms-word.document.macroEnabled.12"));
m_table.insert(std::make_pair(L"docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"));
m_table.insert(std::make_pair(L"vml", "application/vnd.openxmlformats-officedocument.vmlDrawing"));
}
const std::string& ExtensionTable::operator[] (const std::wstring& extension) const
{
std::map<std::wstring, std::string>::const_iterator iter = m_table.find(ToLower(extension));
if (iter == m_table.end())
throw log_range_error(L"not found " + extension + L" in extension table");
return iter->second;
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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 <string>
#include <map>
namespace OOX
{
namespace ContentTypes
{
class ExtensionTable
{
public:
ExtensionTable();
const std::string& operator[] (const std::wstring& extention) const;
private:
std::map<std::wstring, std::string> m_table;
};
}
}
#endif // OOX_CONTENT_TYPES_EXTENSION_TABLE_INCLUDE_H_

View 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
*
*/
#include "precompiled_docxformat.h"
#include "File.h"
#include "./../FileTypes.h"
namespace OOX
{
namespace ContentTypes
{
static const OOX::CPath s_filename = L"[Content_Types].xml";
File::File()
{
}
File::File(const OOX::CPath& path)
{
read(path);
}
File::~File()
{
}
void File::read(const OOX::CPath& path)
{
}
void File::write(const OOX::CPath& path) const
{
}
const bool File::isValid() const
{
return true;
}
void File::registration(const std::string& type, const OOX::CPath& directory, const OOX::CPath& filename)
{
}
}
} // namespace OOX

View 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_CONTENT_TYPES_FILE_INCLUDE_H_
#define OOX_CONTENT_TYPES_FILE_INCLUDE_H_
#include <vector>
#include "./../FileType.h"
namespace OOX
{
namespace ContentTypes
{
class File
{
public:
File();
File(const OOX::CPath& path);
virtual ~File();
public:
virtual void read(const OOX::CPath& path);
virtual void write(const OOX::CPath& path) const;
virtual const bool isValid() const;
public:
void registration(const std::string& type, const OOX::CPath& directory, const OOX::CPath& filename);
};
}
}
#endif // DOCX_CONTENT_TYPES_FILE_INCLUDE_H_

View File

@@ -0,0 +1,100 @@
/*
* (c) Copyright Ascensio System SIA 2010-2014
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "precompiled_docxformat.h"
#include "Override.h"
namespace OOX
{
namespace ContentTypes
{
Override::Override(const std::string& type, const OOX::CPath& path)
: m_part(path),
m_type(type)
{
}
Override::~Override()
{
}
Override::Override(const XML::XNode& node)
{
fromXML(node);
}
const Override& Override::operator =(const XML::XNode& node)
{
fromXML(node);
return *this;
}
void Override::fromXML(const XML::XNode& node)
{
const XML::XElement element(node);
m_part = OOX::CPath(element.attribute("PartName").value().ToWString().c_str());
m_type = element.attribute("ContentType").value();
}
const XML::XNode Override::toXML() const
{
return XML::XElement();
}
const std::string Override::type() const
{
return m_type;
}
const OOX::CPath Override::filename() const
{
return m_part;
}
}
} // namespace OOX

View 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 OOX_CONTENT_TYPES_OVERRIDE_INCLUDE_H_
#define OOX_CONTENT_TYPES_OVERRIDE_INCLUDE_H_
#include <string>
#include "./../WritingElement.h"
#include "property.h"
namespace OOX
{
namespace ContentTypes
{
class Override : public WritingElement
{
public:
Override(const std::string& type, const OOX::CPath& path);
virtual ~Override();
explicit Override(const XML::XNode& node);
const Override& operator =(const XML::XNode& node);
public:
virtual void fromXML(const XML::XNode& node);
virtual const XML::XNode toXML() const;
public:
const std::string type() const;
const OOX::CPath filename() const;
private:
std::string m_type;
OOX::CPath m_part;
};
}
}
#endif // OOX_CONTENT_TYPES_OVERRIDE_INCLUDE_H_

View File

@@ -0,0 +1,73 @@
/*
* (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 "precompiled_docxformat.h"
#include "OverrideTable.h"
namespace OOX
{
namespace ContentTypes
{
OverrideTable::OverrideTable()
{
}
OverrideTable::~OverrideTable()
{
}
OverrideTable::OverrideTable(const XML::XNode& node)
{
fromXML(node);
}
const OverrideTable& OverrideTable::operator =(const XML::XNode& node)
{
fromXML(node);
return *this;
}
void OverrideTable::fromXML(const XML::XNode& node)
{
const XML::XElement element(node);
XML::Fill(m_items, element, "Override");
}
void OverrideTable::add(const std::string& type, const OOX::CPath& path)
{
m_items.push_back(Override(type, path));
}
}
} // namespace OOX

View File

@@ -0,0 +1,60 @@
/*
* (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(const XML::XNode& node);
const OverrideTable& operator =(const XML::XNode& node);
public:
virtual void fromXML(const XML::XNode& node);
public:
void add(const std::string& type, const OOX::CPath& path);
};
}
}
#endif // OOX_CONTENT_TYPES_OVERRIDE_TABLE_INCLUDE_H_

View 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
*
*/
#include "precompiled_docxformat.h"
#include "Core.h"
#include "FileTypes.h"
namespace OOX
{
Core::Core()
{
}
Core::Core(const OOX::CPath& filename)
{
read(filename);
}
Core::~Core()
{
}
void Core::read(const OOX::CPath& oPath)
{
XmlUtils::CXmlNode document;
document.FromXmlFile( oPath.GetPath(), true );
if ( _T("cp:coreProperties") == document.GetName() )
{
XmlUtils::CXmlNode item;
if ( document.GetNode( _T("cp:category"), item ) )
m_sCategory = std::wstring(static_cast<const wchar_t*>(item.GetText()));
if ( document.GetNode( _T("cp:contentStatus"), item ) )
m_sContentStatus = std::wstring(static_cast<const wchar_t*>(item.GetText()));
if ( document.GetNode( _T("dcterms:created"), item ) )
m_sCreated = std::wstring(static_cast<const wchar_t*>(item.GetText()));
if ( document.GetNode( _T("dc:creator"), item ) )
m_sCreator = std::wstring(static_cast<const wchar_t*>(item.GetText()));
if ( document.GetNode( _T("dc:description"), item ) )
m_sDescription = std::wstring(static_cast<const wchar_t*>(item.GetText()));
if ( document.GetNode( _T("dc:identifier"), item ) )
m_sIdentifier = std::wstring(static_cast<const wchar_t*>(item.GetText()));
if ( document.GetNode( _T("cp:keywords"), item ) )
m_sKeywords = std::wstring(static_cast<const wchar_t*>(item.GetText()));
if ( document.GetNode( _T("dc:language"), item ) )
m_sLanguage = std::wstring(static_cast<const wchar_t*>(item.GetText()));
if ( document.GetNode( _T("cp:lastModifiedBy"), item ) )
m_sLastModifiedBy = std::wstring(static_cast<const wchar_t*>(item.GetText()));
if ( document.GetNode( _T("cp:lastPrinted"), item ) )
m_sLastPrinted = std::wstring(static_cast<const wchar_t*>(item.GetText()));
if ( document.GetNode( _T("dcterms:modified"), item ) )
m_sModified = std::wstring(static_cast<const wchar_t*>(item.GetText()));
if ( document.GetNode( _T("cp:revision"), item ) )
m_sRevision = std::wstring(static_cast<const wchar_t*>(item.GetText()));
if ( document.GetNode( _T("dc:subject"), item ) )
m_sSubject = std::wstring(static_cast<const wchar_t*>(item.GetText()));
if ( document.GetNode( _T("dc:title"), item ) )
m_sTitle = std::wstring(static_cast<const wchar_t*>(item.GetText()));
if ( document.GetNode( _T("cp:version"), item ) )
m_sVersion = std::wstring(static_cast<const wchar_t*>(item.GetText()));
}
}
void Core::write(const OOX::CPath& oPath, const OOX::CPath& directory, ContentTypes::File& content) const
{
}
const FileType Core::type() const
{
return FileTypes::Core;
}
const OOX::CPath Core::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const OOX::CPath Core::DefaultFileName() const
{
return type().DefaultFileName();
}
} // namespace OOX

View File

@@ -0,0 +1,80 @@
/*
* (c) Copyright Ascensio System SIA 2010-2014
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef OOX_CORE_INCLUDE_H_
#define OOX_CORE_INCLUDE_H_
#include "File.h"
#include "../.././../../Common/DocxFormat/Source/Base/Nullable.h"
#include "../.././../../Common/DocxFormat/Source/Xml/XmlUtils.h"
namespace OOX
{
class Core : public OOX::File
{
public:
Core();
Core(const OOX::CPath& filename);
virtual ~Core();
public:
virtual void read(const OOX::CPath& oPath);
virtual void write(const OOX::CPath& oPath, const OOX::CPath& directory, ContentTypes::File& content) const;
public:
virtual const FileType type() const;
virtual const OOX::CPath DefaultDirectory() const;
virtual const OOX::CPath DefaultFileName() const;
private:
NSCommon::nullable<std::wstring> m_sCategory;
NSCommon::nullable<std::wstring> m_sContentStatus;
NSCommon::nullable<std::wstring> m_sCreated;
NSCommon::nullable<std::wstring> m_sCreator;
NSCommon::nullable<std::wstring> m_sDescription;
NSCommon::nullable<std::wstring> m_sIdentifier;
NSCommon::nullable<std::wstring> m_sKeywords;
NSCommon::nullable<std::wstring> m_sLanguage;
NSCommon::nullable<std::wstring> m_sLastModifiedBy;
NSCommon::nullable<std::wstring> m_sLastPrinted;
NSCommon::nullable<std::wstring> m_sModified;
NSCommon::nullable<std::wstring> m_sRevision;
NSCommon::nullable<std::wstring> m_sSubject;
NSCommon::nullable<std::wstring> m_sTitle;
NSCommon::nullable<std::wstring> m_sVersion;
};
}
#endif // OOX_CORE_INCLUDE_H_

View 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
*
*/
#include "precompiled_docxformat.h"
#include "DateTime.h"
namespace OOX
{
const std::string DateTime::s_pattern("%YYYY-%MM-%DDT%hh:%mm:%ssZ");
DateTime::DateTime()
{
}
DateTime::DateTime(const std::string& value) : m_datetime(value, s_pattern)
{
}
DateTime::DateTime(const ::DateTime& dt) : m_datetime(dt)
{
}
const std::string DateTime::ToString() const
{
return m_datetime.ToString(s_pattern);
}
const DateTime DateTime::Parse(const std::string& value)
{
return DateTime(value);
}
::DateTime& DateTime::datetime()
{
return m_datetime;
}
const ::DateTime& DateTime::datetime() const
{
return m_datetime;
}
} // namespace OOX

View File

@@ -0,0 +1,62 @@
/*
* (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 <string>
#include "Utility.h"
namespace OOX
{
class DateTime
{
public:
DateTime();
explicit DateTime(const std::string& value);
explicit DateTime(const ::DateTime& dt);
public:
const std::string ToString() const;
static const DateTime Parse(const std::string& value);
public:
::DateTime& datetime();
const ::DateTime& datetime() const;
private:
static const std::string s_pattern;
::DateTime m_datetime;
};
}
#endif // OOX_DATE_TIME_INCLUDE_H_

View 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
*
*/
#include "precompiled_docxformat.h"
#include "Document.h"
#include "FileTypes.h"
#include "Media/Media.h"
#include "Logic/Paragraph.h"
#include "Encoding.h"
#include "External/HyperLink.h"
namespace OOX
{
Document::Document()
{
}
Document::Document(const OOX::CPath& filename)
{
read(filename);
}
Document::~Document()
{
}
void Document::read(const OOX::CPath& filename)
{
IFileContainer::read(filename);
const XML::XDocument document(filename);
const XML::XElement element = document.Root.element("body");
SectorProperty = element.element("sectPr");
Background = document.Root.element("background");
std::map<int, int> ListsAndCounts;
ListsAndCounts.clear();
for (XML::const_element_iterator i = element.Elements.begin(); i != element.Elements.end(); ++i)
{
const XML::XElement element(*i);
if (element.XName == "p" || element.XName == "tbl" || element.XName == "sdt" || element.XName == "bookmarkStart" || element.XName == "bookmarkEnd")
{
Logic::TextItem text(*i);
if((text.is<OOX::Logic::Paragraph>()) && (text.as<OOX::Logic::Paragraph>().isInList()))
{
int listnum = text.as<OOX::Logic::Paragraph>().GetListNum();
if(ListsAndCounts.find(listnum) == ListsAndCounts.end())
{
ListsAndCounts.insert(std::make_pair(listnum, 1));
text.as<OOX::Logic::Paragraph>().CountInList = 1;
}
else
{
ListsAndCounts[listnum]++;
text.as<OOX::Logic::Paragraph>().CountInList = ListsAndCounts[listnum];
}
}
else if(text.is<OOX::Logic::Paragraph>())
{
text.as<OOX::Logic::Paragraph>().CountInList = 0;
}
Items->push_back(text);
}
}
}
void Document::write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
{
}
const FileType Document::type() const
{
return FileTypes::Document;
}
const OOX::CPath Document::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const OOX::CPath Document::DefaultFileName() const
{
return type().DefaultFileName();
}
void Document::addImage(const OOX::CPath& imagePath, const long width, const long height)
{
Image* image = new Image(imagePath);
const RId rId = add(NSCommon::smart_ptr<OOX::File>(image));
Logic::Paragraph paragraph(rId, imagePath, width, height);
Items->push_back(paragraph);
}
void Document::addImage(const OOX::CPath& imagePath, const long xEmu, const std::string& hRelativeFrom, const long yEmu , const std::string& vRelativeFrom, const long widthEmu, const long heightEmu)
{
Image* image = new Image(imagePath);
const RId rId = add(NSCommon::smart_ptr<OOX::File>(image));
Logic::Paragraph paragraph(rId, imagePath, xEmu, hRelativeFrom, yEmu, vRelativeFrom, widthEmu, heightEmu);
Items->push_back(paragraph);
}
void Document::addImageInBegin(const OOX::CPath& imagePath, const long width, const long height)
{
Items->clear();
Image* image = new Image(imagePath);
const RId rId = add(NSCommon::smart_ptr<OOX::File>(image));
Logic::Paragraph paragraph(rId, imagePath, width, height);
Items->push_back(paragraph);
}
void Document::addSpaceToLast(const int count)
{
if (!Items->empty() && Items->back().is<Logic::Paragraph>())
{
Items->back().as<Logic::Paragraph>().AddSpace(count);
}
}
void Document::addPageBreak()
{
Logic::Paragraph paragraph;
paragraph.AddBreak("page");
Items->push_back(paragraph);
}
void Document::addText(const std::wstring& text)
{
Logic::Paragraph paragraph;
paragraph.AddText(Encoding::unicode2utf8(text));
Items->push_back(paragraph);
}
void Document::addText(const std::string& text)
{
Logic::Paragraph paragraph;
paragraph.AddText(text);
Items->push_back(paragraph);
}
void Document::addTextToLast(const std::wstring& text)
{
if (!Items->empty() && Items->back().is<Logic::Paragraph>())
{
Items->back().as<Logic::Paragraph>().AddText(Encoding::unicode2utf8(text));
}
}
void Document::addTextToLast(const std::string& text)
{
if (!Items->empty() && Items->back().is<Logic::Paragraph>())
{
Items->back().as<Logic::Paragraph>().AddText(text);
}
}
void Document::addHyperlink(const std::wstring& nameHref, const std::wstring& text)
{
Logic::Paragraph paragraph;
NSCommon::smart_ptr<OOX::File> hyperlink = NSCommon::smart_ptr<OOX::File>(new OOX::HyperLink(OOX::CPath(nameHref.c_str())));
const OOX::RId rId = add(hyperlink);
paragraph.AddHyperlink(rId, Encoding::unicode2utf8(text));
Items->push_back(paragraph);
}
void Document::addHyperlink(const std::string& nameHref, const std::string& text)
{
Logic::Paragraph paragraph;
NSCommon::smart_ptr<OOX::File> hyperlink = NSCommon::smart_ptr<OOX::File>(new OOX::HyperLink(OOX::CPath(Encoding::utf82unicode(nameHref).c_str())));
const OOX::RId rId = add(hyperlink);
paragraph.AddHyperlink(rId, text);
Items->push_back(paragraph);
}
void Document::addHyperlinkToLast(const std::wstring& nameHref, const std::wstring& text)
{
if (!Items->empty() && Items->back().is<Logic::Paragraph>())
{
NSCommon::smart_ptr<OOX::File> hyperlink = NSCommon::smart_ptr<OOX::File>(new OOX::HyperLink(OOX::CPath(nameHref.c_str())));
const OOX::RId rId = add(hyperlink);
Items->back().as<Logic::Paragraph>().AddHyperlink(rId, Encoding::unicode2utf8(text));
}
}
void Document::addHyperlinkToLast(const std::string& nameHref, const std::string& text)
{
if (!Items->empty() && Items->back().is<Logic::Paragraph>())
{
NSCommon::smart_ptr<OOX::File> hyperlink = NSCommon::smart_ptr<OOX::File>(new OOX::HyperLink(OOX::CPath(Encoding::utf82unicode(nameHref).c_str())));
const OOX::RId rId = add(hyperlink);
Items->back().as<Logic::Paragraph>().AddHyperlink(rId, text);
}
}
void Document::Commit(const OOX::CPath& path)
{
}
void Document::Finalize(const OOX::CPath& path, const OOX::CPath& directory, ContentTypes::File& content)
{
}
} // namespace OOX

View File

@@ -0,0 +1,88 @@
/*
* (c) Copyright Ascensio System SIA 2010-2014
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef OOX_DOCUMENT_FILE_INCLUDE_H_
#define OOX_DOCUMENT_FILE_INCLUDE_H_
#include "File.h"
#include "IFileContainer.h"
#include "property.h"
#include "Logic/TextItem.h"
#include "Logic/SectorProperty.h"
#include "Logic/Background.h"
#include "IFileBuilder.h"
namespace OOX
{
class Document : public OOX::File, public IFileContainer, public IFileBuilder
{
public:
Document();
Document(const OOX::CPath& filename);
virtual ~Document();
public:
virtual void read(const OOX::CPath& filename);
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const;
public:
virtual const FileType type() const;
virtual const OOX::CPath DefaultDirectory() const;
virtual const OOX::CPath DefaultFileName() const;
public:
virtual void Commit(const OOX::CPath& path);
virtual void Finalize(const OOX::CPath& path, const OOX::CPath& directory, ContentTypes::File& content);
public:
void addImage(const OOX::CPath& imagePath, const long width, const long height);
void addImage(const OOX::CPath& imagePath, const long xEmu, const std::string& hRelativeFrom, const long yEmu , const std::string& vRelativeFrom, const long widthEmu, const long heightEmu);
void addImageInBegin(const OOX::CPath& imagePath, const long width, const long height);
void addSpaceToLast(const int count);
void addPageBreak();
void addText(const std::wstring& text);
void addText(const std::string& text);
void addTextToLast(const std::wstring& text);
void addTextToLast(const std::string& text);
void addHyperlink(const std::wstring& nameHref, const std::wstring& text);
void addHyperlink(const std::string& nameHref, const std::string& text);
void addHyperlinkToLast(const std::wstring& nameHref, const std::wstring& text);
void addHyperlinkToLast(const std::string& nameHref, const std::string& text);
public:
property<Logic::SectorProperty> SectorProperty;
property<std::vector<Logic::TextItem> > Items;
nullable_property<Logic::Background> Background;
};
}
#endif // OOX_DOCUMENT_FILE_INCLUDE_H_

View File

@@ -0,0 +1,79 @@
/*
* (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_INCLUDE_H_
#define OOX_INCLUDE_H_
#include "Folder.h"
#include "Logic\Table.h"
#include "Logic\Sdt.h"
#include "Logic\BookmarkStart.h"
#include "Logic\BookmarkEnd.h"
#include "Logic\List.h"
#include "Logic\Text.h"
#include "Logic\Symbol.h"
#include "Logic\Tab.h"
#include "Logic\Break.h"
#include "Logic\Pict.h"
#include "Logic\Drawing.h"
#include "Logic\Inline.h"
#include "Logic\FootnoteReference.h"
#include "Logic\EndnoteReference.h"
#include "Logic\FootnoteRef.h"
#include "Logic\EndnoteRef.h"
#include "Logic\Separator.h"
#include "Logic\ContinuationSeparator.h"
#include "Logic\FldChar.h"
#include "Logic\InstrText.h"
#include "Logic\DelText.h"
#include "Logic\NullRun.h"
#include "Logic\ColorsTable.h"
#include "FileTypes.h"
#include "App.h"
#include "Core.h"
#include "Document.h"
#include "FontTable.h"
#include "Numbering.h"
#include "Styles.h"
#include "Settings/File.h"
#include "FootNote.h"
#include "EndNote.h"
#include "WebSettings.h"
#include "External\HyperLink.h"
#include "Media/Media.h"
#include "Header.h"
#include "Footer.h"
#include "Theme/File.h"
#endif // OOX_INCLUDE_H_

View File

@@ -0,0 +1,117 @@
/*
* (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 "precompiled_docxformat.h"
#include "EndNote.h"
#include "Log.h"
#include <algorithm>
#include "Exception/log_range_error.h"
#include "FileTypes.h"
namespace OOX
{
EndNote::EndNote()
{
}
EndNote::EndNote(const OOX::CPath& filename)
{
read(filename);
}
EndNote::~EndNote()
{
}
void EndNote::read(const OOX::CPath& filename)
{
IFileContainer::read(filename);
const XML::XDocument document(filename);
XML::Fill(Notes, document.Root, "endnote");
}
void EndNote::write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
{
}
const FileType EndNote::type() const
{
return FileTypes::EndNote;
}
const OOX::CPath EndNote::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const OOX::CPath EndNote::DefaultFileName() const
{
return type().DefaultFileName();
}
const EndNote::Note EndNote::find(const Logic::EndnoteReference& reference) const
{
const std::vector<EndNote::Note>& notes = Notes.get();
for (std::vector<EndNote::Note>::const_iterator iter = notes.begin(); iter != notes.end(); ++iter)
{
if (*(*iter).Id == (*reference.Id))
{
return (*iter);
}
}
throw log_range_error("endnote");
}
void EndNote::add(const EndNote::Note& endnote)
{
push_back(endnote);
}
void EndNote::push_back(const EndNote::Note& endnote)
{
Notes->push_back(endnote);
}
const size_t EndNote::size() const
{
return Notes->size();
}
} // namespace OOX

View File

@@ -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_ENDNOTE_INCLUDE_H_
#define OOX_ENDNOTE_INCLUDE_H_
#include "File.h"
#include "IFileContainer.h"
#include <vector>
#include "property.h"
#include "nullable_property.h"
#include "Logic/EndnoteReference.h"
#include "WritingElement.h"
#include "Logic/TextItem.h"
#include "Limit/SeparatorType.h"
namespace OOX
{
class EndNote : public OOX::File, public IFileContainer
{
public:
class Note : public WritingElement
{
public:
Note();
virtual ~Note();
explicit Note(const XML::XNode& node);
const Note& operator =(const XML::XNode& node);
public:
virtual void fromXML(const XML::XNode& node);
virtual const XML::XNode toXML() const;
public:
void push_back(const OOX::Logic::Paragraph& paragraph);
public:
nullable_property<std::string, Limit::SeparatorType> Type;
property<size_t> Id;
property<std::vector<Logic::TextItem> > Items;
};
public:
EndNote();
EndNote(const OOX::CPath& filename);
virtual ~EndNote();
public:
virtual void read(const OOX::CPath& filename);
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const;
public:
virtual const FileType type() const;
virtual const OOX::CPath DefaultDirectory() const;
virtual const OOX::CPath DefaultFileName() const;
public:
const EndNote::Note find(const Logic::EndnoteReference& reference) const;
void add(const EndNote::Note& endnote);
void push_back(const EndNote::Note& endnote);
const size_t size() const;
public:
property<std::vector<Note> > Notes;
};
}
#endif // OOX_ENDNOTE_INCLUDE_H_

View File

@@ -0,0 +1,87 @@
/*
* (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 "precompiled_docxformat.h"
#include "./../EndNote.h"
namespace OOX
{
EndNote::Note::Note()
{
}
EndNote::Note::~Note()
{
}
EndNote::Note::Note(const XML::XNode& node)
{
fromXML(node);
}
const EndNote::Note& EndNote::Note::operator =(const XML::XNode& node)
{
fromXML(node);
return *this;
}
void EndNote::Note::fromXML(const XML::XNode& node)
{
const XML::XElement element(node);
Type = element.attribute("type").value();
Id = element.attribute("id").value();
XML::Fill(Items, element , "p", "tbl");
}
const XML::XNode EndNote::Note::toXML() const
{
return XML::XElement();
}
void EndNote::Note::push_back(const OOX::Logic::Paragraph& paragraph)
{
Items->push_back(paragraph);
}
} // namespace OOX

View 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
*
*/
#include "precompiled_docxformat.h"
#include "External.h"
#include "../FileTypes.h"
namespace OOX
{
External::External()
{
}
External::External(const OOX::CPath& uri)
{
read(uri);
}
External::~External()
{
}
void External::read(const OOX::CPath& uri)
{
m_uri = uri;
}
void External::write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
{
}
const OOX::CPath External::Uri() const
{
return m_uri;
}
} // namespace OOX

View 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_EXTERNAL_INCLUDE_H_
#define OOX_EXTERNAL_INCLUDE_H_
#include "..\File.h"
namespace OOX
{
class External : public File
{
public:
External();
External(const OOX::CPath& uri);
~External();
public:
virtual void read(const OOX::CPath& uri);
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const;
public:
const OOX::CPath Uri() const;
inline std::wstring GetPath() { return std::wstring(m_uri.GetPath()); }
protected:
OOX::CPath m_uri;
};
}
#endif // OOX_EXTERNAL_INCLUDE_H_

View 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
*
*/
#include "precompiled_docxformat.h"
#include "ExternalAudio.h"
#include "..\FileTypes.h"
namespace OOX
{
ExternalAudio::ExternalAudio()
{
}
ExternalAudio::ExternalAudio(const OOX::CPath& uri)
{
read(uri);
}
ExternalAudio::~ExternalAudio()
{
}
const FileType ExternalAudio::type() const
{
return FileTypes::ExternalAudio;
}
const OOX::CPath ExternalAudio::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const OOX::CPath ExternalAudio::DefaultFileName() const
{
return type().DefaultFileName();
}
} // namespace OOX

View File

@@ -0,0 +1,54 @@
/*
* (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 OOX::CPath& uri);
~ExternalAudio();
public:
virtual const FileType type() const;
virtual const OOX::CPath DefaultDirectory() const;
virtual const OOX::CPath DefaultFileName() const;
};
}
#endif // OOX_EXTERNALAUDIO_INCLUDE_H_

View 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
*
*/
#include "precompiled_docxformat.h"
#include "ExternalImage.h"
#include "..\FileTypes.h"
namespace OOX
{
ExternalImage::ExternalImage()
{
}
ExternalImage::ExternalImage(const OOX::CPath& uri)
{
read(uri);
}
ExternalImage::~ExternalImage()
{
}
const FileType ExternalImage::type() const
{
return FileTypes::ExternalImage;
}
const OOX::CPath ExternalImage::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const OOX::CPath ExternalImage::DefaultFileName() const
{
return type().DefaultFileName();
}
} // namespace OOX

View File

@@ -0,0 +1,54 @@
/*
* (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 OOX::CPath& uri);
~ExternalImage();
public:
virtual const FileType type() const;
virtual const OOX::CPath DefaultDirectory() const;
virtual const OOX::CPath DefaultFileName() const;
};
}
#endif // OOX_EXTERNALIMAGE_INCLUDE_H_

View 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
*
*/
#include "precompiled_docxformat.h"
#include "ExternalVideo.h"
#include "..\FileTypes.h"
namespace OOX
{
ExternalVideo::ExternalVideo()
{
}
ExternalVideo::ExternalVideo(const OOX::CPath& uri)
{
read(uri);
}
ExternalVideo::~ExternalVideo()
{
}
const FileType ExternalVideo::type() const
{
return FileTypes::ExternalVideo;
}
const OOX::CPath ExternalVideo::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const OOX::CPath ExternalVideo::DefaultFileName() const
{
return type().DefaultFileName();
}
} // namespace OOX

View File

@@ -0,0 +1,54 @@
/*
* (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 OOX::CPath& uri);
~ExternalVideo();
public:
virtual const FileType type() const;
virtual const OOX::CPath DefaultDirectory() const;
virtual const OOX::CPath DefaultFileName() const;
};
}
#endif // OOX_EXTERNALVIDEO_INCLUDE_H_

View 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
*
*/
#include "precompiled_docxformat.h"
#include "HyperLink.h"
#include "..\FileTypes.h"
namespace OOX
{
HyperLink::HyperLink()
{
}
HyperLink::HyperLink(const OOX::CPath& uri)
{
read(uri);
}
HyperLink::~HyperLink()
{
}
const FileType HyperLink::type() const
{
return FileTypes::HyperLink;
}
const OOX::CPath HyperLink::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const OOX::CPath HyperLink::DefaultFileName() const
{
return type().DefaultFileName();
}
} // namespace OOX

View File

@@ -0,0 +1,54 @@
/*
* (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 OOX::CPath& uri);
~HyperLink();
public:
virtual const FileType type() const;
virtual const OOX::CPath DefaultDirectory() const;
virtual const OOX::CPath DefaultFileName() const;
};
}
#endif // OOX_HYPERLINK_INCLUDE_H_

View 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
*
*/
#include "precompiled_docxformat.h"
#include "File.h"
namespace OOX
{
File::File()
{
}
File::~File()
{
}
} // namespace OOX

View File

@@ -0,0 +1,64 @@
/*
* (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 <string>
#include "NamespaceOwn.h"
#include "ContentTypes/File.h"
#include "FileType.h"
#include "../.././../../Common/DocxFormat/Source/Base/Nullable.h"
#include "../.././../../Common/DocxFormat/Source/Xml/XmlUtils.h"
namespace OOX
{
class File : public NamespaceOwn
{
public:
File();
virtual ~File();
public:
virtual void read(const OOX::CPath& filename) = 0;
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const = 0;
public:
virtual const OOX::FileType type() const = 0;
virtual const OOX::CPath DefaultDirectory() const = 0;
virtual const OOX::CPath DefaultFileName() const = 0;
};
}
#endif // OOX_FILE_INCLUDE_H_

View File

@@ -0,0 +1,115 @@
/*
* (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 "precompiled_docxformat.h"
#include "FileFactory.h"
#include "File.h"
#include "FileTypes.h"
#include "Rels/RelationShip.h"
#include "App.h"
#include "Core.h"
#include "Document.h"
#include "Theme/File.h"
#include "Settings/File.h"
#include "FontTable.h"
#include "Styles.h"
#include "Item.h"
#include "FootNote.h"
#include "EndNote.h"
#include "WebSettings.h"
#include "Media/Media.h"
#include "External\HyperLink.h"
#include "External\ExternalVideo.h"
#include "External\ExternalAudio.h"
#include "External\ExternalImage.h"
#include "Header.h"
#include "Footer.h"
#include "Numbering.h"
#include "UnknowTypeFile.h"
namespace OOX
{
const NSCommon::smart_ptr<File> CreateFile(const OOX::CPath& path, const Rels::RelationShip& relation)
{
OOX::CPath filename = path / relation.filename();
if (relation.type() == FileTypes::App)
return NSCommon::smart_ptr<File>(new App(filename));
else if (relation.type() == FileTypes::Core)
return NSCommon::smart_ptr<File>(new Core(filename));
else if (relation.type() == FileTypes::Document)
return NSCommon::smart_ptr<File>(new Document(filename));
else if (relation.type() == FileTypes::Theme)
return NSCommon::smart_ptr<File>(new Theme::File(filename));
else if (relation.type() == FileTypes::Setting)
return NSCommon::smart_ptr<File>(new Settings::File(filename));
else if (relation.type() == FileTypes::FontTable)
return NSCommon::smart_ptr<File>(new FontTable(filename));
else if (relation.type() == FileTypes::Style)
return NSCommon::smart_ptr<File>(new Styles(filename));
else if (relation.type() == FileTypes::FootNote)
return NSCommon::smart_ptr<File>(new FootNote(filename));
else if (relation.type() == FileTypes::EndNote)
return NSCommon::smart_ptr<File>(new EndNote(filename));
else if (relation.type() == FileTypes::WebSetting)
return NSCommon::smart_ptr<File>(new WebSettings(filename));
else if (relation.type() == FileTypes::HyperLink)
return NSCommon::smart_ptr<File>(new HyperLink(relation.target()));
else if ((relation.type() == FileTypes::ExternalVideo) && (relation.isExternal()))
return NSCommon::smart_ptr<File>(new ExternalVideo(relation.target()));
else if ((relation.type() == FileTypes::ExternalAudio) && (relation.isExternal()))
return NSCommon::smart_ptr<File>(new ExternalAudio(relation.target()));
else if ((relation.type() == FileTypes::ExternalImage) && (relation.isExternal()))
return NSCommon::smart_ptr<File>(new ExternalImage(relation.target()));
else if (relation.type() == FileTypes::Image)
return NSCommon::smart_ptr<File>(new Image(filename));
else if (relation.type() == FileTypes::OleObject)
return NSCommon::smart_ptr<File>(new OleObject(filename));
else if (relation.type() == FileTypes::Audio)
return NSCommon::smart_ptr<File>(new Audio(filename));
else if (relation.type() == FileTypes::Video)
return NSCommon::smart_ptr<File>(new Video(filename));
else if (relation.type() == FileTypes::Numbering)
return NSCommon::smart_ptr<File>(new Numbering(filename));
else if (relation.type() == FileTypes::Header)
return NSCommon::smart_ptr<File>(new Header(filename));
else if (relation.type() == FileTypes::Footer)
return NSCommon::smart_ptr<File>(new Footer(filename));
return NSCommon::smart_ptr<File>(new UnknowTypeFile());
}
} // namespace OOX

View File

@@ -0,0 +1,46 @@
/*
* (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_FACTORY_INCLUDE_H_
#define OOX_FILE_FACTORY_INCLUDE_H_
#include "../../../../Common/DocxFormat/Source/Base/SmartPtr.h"
namespace OOX
{
class File;
namespace Rels {class RelationShip;}
const NSCommon::smart_ptr<File> CreateFile(const OOX::CPath& path, const Rels::RelationShip& relation);
}
#endif // OOX_FILE_FACTORY_INCLUDE_H_

View File

@@ -0,0 +1,91 @@
/*
* (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 "precompiled_docxformat.h"
#include "FileType.h"
namespace OOX
{
FileType::FileType( const OOX::CPath& defaultDirectory,
const OOX::CPath& defaultFileName,
const std::wstring& overrideType,
const std::wstring& relationType)
: m_defaultDirectory(defaultDirectory),
m_defaultFileName(defaultFileName),
m_overrideType(overrideType),
m_relationType(relationType)
{
}
FileType::~FileType()
{
}
const bool FileType::operator ==(const FileType& rhs) const
{
return m_relationType == rhs.m_relationType;
}
const std::wstring FileType::OverrideType() const
{
return m_overrideType;
}
const std::wstring FileType::RelationType() const
{
return m_relationType;
}
const OOX::CPath FileType::DefaultDirectory() const
{
return m_defaultDirectory;
}
const OOX::CPath FileType::DefaultFileName() const
{
return m_defaultFileName;
}
const bool operator ==(const std::wstring& type, const FileType& file)
{
return type == file.RelationType();
}
const bool operator ==(const FileType& file, const std::wstring& type)
{
return file.RelationType() == type;
}
} // namespace OOX

View 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 OOX_FILE_TYPE_INCLUDE_H_
#define OOX_FILE_TYPE_INCLUDE_H_
#include <string>
#include "../../../../Common/DocxFormat/Source/SystemUtility/SystemUtility.h"
namespace OOX
{
class FileType
{
public:
FileType(const OOX::CPath& defaultDirectory, const OOX::CPath& defaultFileName, const std::wstring& overrideType, const std::wstring& relationType);
~FileType();
public:
const bool operator ==(const FileType& rhs) const;
public:
const std::wstring OverrideType() const;
const std::wstring RelationType() const;
const OOX::CPath DefaultDirectory() const;
const OOX::CPath DefaultFileName() const;
private:
std::wstring m_overrideType;
std::wstring m_relationType;
OOX::CPath m_defaultDirectory;
OOX::CPath m_defaultFileName;
};
const bool operator ==(const std::wstring& type, const FileType& file);
const bool operator ==(const FileType& file, const std::wstring& type);
}
#endif // OOX_FILE_TYPE_INCLUDE_H_

View 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 OOX_FILE_TYPES_INCLUDE_H_
#define OOX_FILE_TYPES_INCLUDE_H_
#include "FileType.h"
namespace OOX
{
namespace FileTypes
{
const FileType App(OOX::CPath(L"docProps"), OOX::CPath(L"app.xml"), L"application/vnd.openxmlformats-officedocument.extended-properties+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties");
const FileType Core(OOX::CPath(L"docProps"), OOX::CPath(L"core.xml"), L"application/vnd.openxmlformats-package.core-properties+xml", L"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties");
const FileType Document(OOX::CPath(L"word"), OOX::CPath(L"document.xml"), L"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument");
const FileType Theme(OOX::CPath(L"theme"), OOX::CPath(L"theme.xml"), L"application/vnd.openxmlformats-officedocument.theme+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme");
const FileType Setting(OOX::CPath(L""), OOX::CPath(L"settings.xml"), L"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings");
const FileType FontTable(OOX::CPath(L""), OOX::CPath(L"fontTable.xml"), L"application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable");
const FileType Style(OOX::CPath(L""), OOX::CPath(L"styles.xml"), L"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles");
const FileType Item(OOX::CPath(L"customXml"), OOX::CPath(L"item.xml"), L"WARNING not implement", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml");
const FileType FootNote(OOX::CPath(L""), OOX::CPath(L"footnotes.xml"), L"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes");
const FileType EndNote(OOX::CPath(L""), OOX::CPath(L"endnotes.xml"), L"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes");
const FileType WebSetting(OOX::CPath(L""), OOX::CPath(L"webSettings.xml"), L"application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings");
const FileType Header(OOX::CPath(L""), OOX::CPath(L"header.xml"), L"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header");
const FileType Footer(OOX::CPath(L""), OOX::CPath(L"footer.xml"), L"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer");
const FileType Numbering(OOX::CPath(L""), OOX::CPath(L"numbering.xml"), L"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering");
const FileType ItemProp(OOX::CPath(L"customXml"), OOX::CPath(L"itemProps.xml"), L"application/vnd.openxmlformats-officedocument.customXmlProperties+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps");
const FileType HyperLink(OOX::CPath(L""), OOX::CPath(L""), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink");
const FileType ExternalImage(OOX::CPath(L""), OOX::CPath(L""), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image");
const FileType ExternalAudio(OOX::CPath(L""), OOX::CPath(L""), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio");
const FileType ExternalVideo(OOX::CPath(L""), OOX::CPath(L""), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/video");
const FileType Image(OOX::CPath(L"media"), OOX::CPath(L"image"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image");
const FileType Audio(OOX::CPath(L"media"), OOX::CPath(L"audio"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio");
const FileType Video(OOX::CPath(L"media"), OOX::CPath(L"video"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/video");
const FileType Data(OOX::CPath(L"diagrams"), OOX::CPath(L"data.xml"), L"application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData");
const FileType Layout(OOX::CPath(L"diagrams"), OOX::CPath(L"layout.xml"), L"application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramLayout");
const FileType Colors(OOX::CPath(L"diagrams"), OOX::CPath(L"colors.xml"), L"application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramColors");
const FileType QuickStyle(OOX::CPath(L"diagrams"), OOX::CPath(L"quickStyle.xml"), L"application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramQuickStyle");
const FileType Chart(OOX::CPath(L"charts"), OOX::CPath(L"chart.xml"), L"application/vnd.openxmlformats-officedocument.drawingml.chart+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart");
const FileType MicrosoftOfficeExcelWorksheet( OOX::CPath(L"embeddings"), OOX::CPath(L"Microsoft_Office_Excel_Worksheet.xlsx"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
const FileType MicrosoftOfficeExcel_97_2003_Worksheet( OOX::CPath(L"embeddings"), OOX::CPath(L"Microsoft_Office_Excel_97-2003_Worksheet.xls"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject");
const FileType MicrosoftOfficeExcelBinaryWorksheet( OOX::CPath(L"embeddings"), OOX::CPath(L"Microsoft_Office_Excel_Binary_Worksheet.xlsb"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
const FileType MicrosoftOfficeExcelMacro_EnabledWorksheet( OOX::CPath(L"embeddings"), OOX::CPath(L"Microsoft_Office_Excel_Macro-Enabled_Worksheet.xlsm"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
const FileType MicrosoftOfficeExcelChart( OOX::CPath(L"embeddings"), OOX::CPath(L"Microsoft_Office_Excel_Chart.xlsx"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject");
const FileType MicrosoftOfficeWordDocument( OOX::CPath(L"embeddings"), OOX::CPath(L"Microsoft_Office_Word_Document.docx"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
const FileType MicrosoftOfficeWord_97_2003_Document( OOX::CPath(L"embeddings"), OOX::CPath(L"Microsoft_Office_Word_97_-_2003_Document.doc"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject");
const FileType MicrosoftOfficeWordMacro_EnabledDocument( OOX::CPath(L"embeddings"), OOX::CPath(L"Microsoft_Office_Word_Macro-Enabled_Document.docm"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
const FileType MicrosoftOfficePowerPointPresentation( OOX::CPath(L"embeddings"), OOX::CPath(L"Microsoft_Office_PowerPoint_Presentation.pptx"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
const FileType MicrosoftOfficePowerPoint_97_2003_Presentation( OOX::CPath(L"embeddings"), OOX::CPath(L"Microsoft_Office_PowerPoint_97-2003_Presentation.xlsx"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject");
const FileType MicrosoftOfficePowerPointMacro_EnabledPresentation( OOX::CPath(L"embeddings"), OOX::CPath(L"Microsoft_Office_PowerPoint_Macro-Enabled_Presentation.pptm"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
const FileType MicrosoftOfficePowerPointSlide( OOX::CPath(L"embeddings"), OOX::CPath(L"Microsoft_Office_PowerPoint_Slide.sldx"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
const FileType MicrosoftOfficePowerPointMacro_EnabledSlide( OOX::CPath(L"embeddings"), OOX::CPath(L"Microsoft_Office_PowerPoint_Macro-Enabled_Slide.sldm"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
const FileType OleObject(OOX::CPath(L"embeddings"), OOX::CPath(L"oleObject.bin"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject");
const FileType Glossary(OOX::CPath(L"glossary"), OOX::CPath(L"document.xml"), L"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument");
const FileType Slide(OOX::CPath(L""), OOX::CPath(L"slide.xml"), L"application/vnd.openxmlformats-officedocument.presentationml.slide+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide");
const FileType SlideLayout(OOX::CPath(L""), OOX::CPath(L"slideLayout.xml"), L"application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout");
const FileType SlideMaster(OOX::CPath(L""), OOX::CPath(L"slideMaster.xml"), L"application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster");
const FileType NotesSlide(OOX::CPath(L""), OOX::CPath(L"notesSlide.xml"), L"application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide");
const FileType NotesMaster(OOX::CPath(L""), OOX::CPath(L"notesMaster.xml"), L"application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster");
const FileType HandoutMaster(OOX::CPath(L""), OOX::CPath(L"handoutMaster.xml"), L"application/vnd.openxmlformats-officedocument.presentationml.handoutMaster+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/handoutMaster");
const FileType Presentation(OOX::CPath(L"ppt"), OOX::CPath(L"presentation.xml"), L"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument");
const FileType PresProps(OOX::CPath(L""), OOX::CPath(L"presProps.xml"), L"application/vnd.openxmlformats-officedocument.presentationml.presProps+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps");
const FileType TableStyles(OOX::CPath(L""), OOX::CPath(L"tableStyles.xml"), L"application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles");
const FileType ViewProps(OOX::CPath(L""), OOX::CPath(L"viewProps.xml"), L"application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps");
const FileType ThemePPTX(OOX::CPath(L""), OOX::CPath(L"theme.xml"), L"application/vnd.openxmlformats-officedocument.theme+xml", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme");
const FileType VmlDrawing(OOX::CPath(L""), OOX::CPath(L"vmlDrawing.vml"), L"", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing");
const FileType Unknow(OOX::CPath(L""), OOX::CPath(L""), L"", L"");
}
}
#endif // OOX_FILE_TYPES_INCLUDE_H_

View File

@@ -0,0 +1,219 @@
/*
* (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 "precompiled_docxformat.h"
#include "Folder.h"
#include "Rels/File.h"
#include "Document.h"
namespace Docx
{
Folder::Folder()
{
}
Folder::Folder(const OOX::CPath& path)
{
read(path);
}
void Folder::read(const OOX::CPath& path)
{
OOX::Rels::File rels(path / L"/");
IFileContainer::read(rels, path);
}
void Folder::write(const OOX::CPath& path) const
{
OOX::CSystemUtility::CreateDirectories(path);
OOX::Rels::File rels;
OOX::ContentTypes::File content;
IFileContainer::write(rels, path, OOX::CPath(L""), content);
rels.write(path / L"/");
content.write(path);
}
void Folder::createFromTemplate(const OOX::CPath& path)
{
read(path);
}
void Folder::Commit(const OOX::CPath& path)
{
OOX::CSystemUtility::CreateDirectories(path);
IFileContainer::Commit(path);
}
void Folder::Finalize(const OOX::CPath& path)
{
OOX::CSystemUtility::CreateDirectories(path);
OOX::Rels::File rels;
OOX::ContentTypes::File content;
IFileContainer::Finalize(rels, path, OOX::CPath(L""), content);
rels.write(path / L"/");
content.write(path);
}
const bool Folder::isValid(const OOX::CPath& path) const
{
return true;
}
void Folder::extractPictures(const OOX::CPath& path)
{
OOX::CSystemUtility::CreateDirectories(path);
OOX::IFileContainer::extractPictures(path);
}
void Folder::extractPictures(const OOX::CPath& source, const OOX::CPath& path)
{
read(source);
extractPictures(path);
}
void Folder::addImage(const OOX::CPath& imagePath, const long width, const long height)
{
if (exist<OOX::Document>())
{
OOX::Document& document = find<OOX::Document>();
document.addImage(imagePath, width, height);
}
}
void Folder::addImageInBegin(const OOX::CPath& imagePath, const long width, const long height)
{
if (exist<OOX::Document>())
{
OOX::Document& document = find<OOX::Document>();
document.addImageInBegin(imagePath, width, height);
}
}
void Folder::addSpaceToLast(const int count)
{
if (exist<OOX::Document>())
{
OOX::Document& document = find<OOX::Document>();
document.addSpaceToLast(count);
}
}
void Folder::addPageBreak()
{
if (exist<OOX::Document>())
{
OOX::Document& document = find<OOX::Document>();
document.addPageBreak();
}
}
void Folder::addText(const std::wstring& text)
{
if (exist<OOX::Document>())
{
OOX::Document& document = find<OOX::Document>();
document.addText(text);
}
}
void Folder::addText(const std::string& text)
{
if (exist<OOX::Document>())
{
OOX::Document& document = find<OOX::Document>();
document.addText(text);
}
}
void Folder::addTextToLast(const std::wstring& text)
{
if (exist<OOX::Document>())
{
OOX::Document& document = find<OOX::Document>();
document.addTextToLast(text);
}
}
void Folder::addTextToLast(const std::string& text)
{
if (exist<OOX::Document>())
{
OOX::Document& document = find<OOX::Document>();
document.addTextToLast(text);
}
}
void Folder::addHyperlink(const std::wstring& nameHref, const std::wstring& text)
{
if (exist<OOX::Document>())
{
OOX::Document& document = find<OOX::Document>();
document.addHyperlink(nameHref, text);
}
}
void Folder::addHyperlink(const std::string& nameHref, const std::string& text)
{
if (exist<OOX::Document>())
{
OOX::Document& document = find<OOX::Document>();
document.addHyperlink(nameHref, text);
}
}
void Folder::addHyperlinkToLast(const std::wstring& nameHref, const std::wstring& text)
{
if (exist<OOX::Document>())
{
OOX::Document& document = find<OOX::Document>();
document.addHyperlinkToLast(nameHref, text);
}
}
void Folder::addHyperlinkToLast(const std::string& nameHref, const std::string& text)
{
if (exist<OOX::Document>())
{
OOX::Document& document = find<OOX::Document>();
document.addHyperlinkToLast(nameHref, text);
}
}
} // namespace Docx

View File

@@ -0,0 +1,79 @@
/*
* (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 DOCX_FOLDER_INCLUDE_H_
#define DOCX_FOLDER_INCLUDE_H_
#include "IFileContainer.h"
#include "RId.h"
namespace Docx
{
class Folder : public OOX::IFileContainer
{
public:
Folder();
Folder(const OOX::CPath& path);
public:
void read(const OOX::CPath& path);
void write(const OOX::CPath& path) const;
void createFromTemplate(const OOX::CPath& path);
public:
void Commit(const OOX::CPath& path);
void Finalize(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);
public:
void addImage(const OOX::CPath& imagePath, const long width, const long height);
void addImageInBegin(const OOX::CPath& imagePath, const long width, const long height);
void addSpaceToLast(const int count);
void addPageBreak();
void addText(const std::wstring& text);
void addText(const std::string& text);
void addTextToLast(const std::wstring& text);
void addTextToLast(const std::string& text);
void addHyperlink(const std::wstring& nameHref, const std::wstring& text);
void addHyperlink(const std::string& nameHref, const std::string& text);
void addHyperlinkToLast(const std::wstring& nameHref, const std::wstring& text);
void addHyperlinkToLast(const std::string& nameHref, const std::string& text);
};
}
#endif //Docx_FOLDER_INCLUDE_H_

View File

@@ -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
*
*/
#include "precompiled_docxformat.h"
#include "FontTable.h"
#include "FileTypes.h"
namespace OOX
{
FontTable::FontTable()
{
}
FontTable::FontTable(const OOX::CPath& filename)
{
read(filename);
}
FontTable::~FontTable()
{
}
void FontTable::read(const OOX::CPath& oPath)
{
m_fonts.clear();
XmlUtils::CXmlNode oFonts;
oFonts.FromXmlFile( oPath.GetPath(), true );
if ( _T("w:fonts") == oFonts.GetName() )
{
XmlUtils::CXmlNodes oFontList;
oFonts.GetNodes( _T("w:font"), oFontList );
for ( int nFontIndex = 0; nFontIndex < oFontList.GetCount(); ++nFontIndex )
{
XmlUtils::CXmlNode oFontNode;
if ( oFontList.GetAt( nFontIndex, oFontNode ) )
{
Font oFont;
oFont.fromXML( oFontNode );
m_fonts.push_back( oFont );
}
}
}
}
void FontTable::write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
{
}
const FileType FontTable::type() const
{
return FileTypes::FontTable;
}
const OOX::CPath FontTable::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const OOX::CPath FontTable::DefaultFileName() const
{
return type().DefaultFileName();
}
} // namespace OOX

View 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 OOX_FONTTABLE_INCLUDE_H_
#define OOX_FONTTABLE_INCLUDE_H_
#include <vector>
#include "File.h"
namespace OOX
{
class FontTable : public OOX::File
{
public:
class Font
{
public:
Font();
virtual ~Font();
explicit Font(XmlUtils::CXmlNode& node);
const Font& operator =(XmlUtils::CXmlNode& node);
public:
virtual void fromXML(XmlUtils::CXmlNode& node);
public:
NSCommon::nullable<std::wstring> m_name;
NSCommon::nullable<std::wstring> m_family;
NSCommon::nullable<std::wstring> m_charset;
NSCommon::nullable<std::wstring> m_pitch;
NSCommon::nullable<std::wstring> m_panose1;
NSCommon::nullable<std::wstring> m_usb0;
NSCommon::nullable<std::wstring> m_usb1;
NSCommon::nullable<std::wstring> m_usb2;
NSCommon::nullable<std::wstring> m_usb3;
NSCommon::nullable<std::wstring> m_csb0;
NSCommon::nullable<std::wstring> m_csb1;
};
public:
FontTable();
FontTable(const OOX::CPath& filename);
virtual ~FontTable();
public:
virtual void read(const OOX::CPath& filename);
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const;
public:
virtual const FileType type() const;
virtual const OOX::CPath DefaultDirectory() const;
virtual const OOX::CPath DefaultFileName() const;
public:
std::vector<Font> m_fonts;
};
}
#endif // OOX_FONTTABLE_INCLUDE_H_

View File

@@ -0,0 +1,96 @@
/*
* (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 "precompiled_docxformat.h"
#include "./../FontTable.h"
namespace OOX
{
FontTable::Font::Font()
{
m_name = std::wstring(_T("Arial"));
m_usb0 = std::wstring(_T("00000000"));
m_usb1 = std::wstring(_T("00000000"));
m_usb2 = std::wstring(_T("00000000"));
m_usb3 = std::wstring(_T("00000000"));
m_csb0 = std::wstring(_T("00000000"));
m_csb1 = std::wstring(_T("00000000"));
m_family = std::wstring(L"");
m_charset = std::wstring(L"");
m_pitch = std::wstring(L"");
m_panose1 = std::wstring(L"");
}
FontTable::Font::~Font()
{
}
FontTable::Font::Font(XmlUtils::CXmlNode& node)
{
fromXML(node);
}
const FontTable::Font& FontTable::Font::operator =(XmlUtils::CXmlNode& node)
{
fromXML(node);
return *this;
}
void FontTable::Font::fromXML(XmlUtils::CXmlNode& oNode)
{
if ( _T("w:font") == oNode.GetName() )
{
m_name = std::wstring(static_cast<const wchar_t*>(oNode.GetAttributeBase( _T("w:name"))));
XmlUtils::CXmlNode oChild;
if ( oNode.GetNode( _T("w:panose1"), oChild ) )
m_panose1 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val"))));
if ( oNode.GetNode( _T("w:charset"), oChild ) )
m_charset = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val"))));
if ( oNode.GetNode( _T("w:family"), oChild ) )
m_family = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val"))));
if ( oNode.GetNode( _T("w:pitch"), oChild ) )
m_pitch = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val"))));
if ( oNode.GetNode( _T("w:sig"), oChild ) )
{
m_usb0 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:usb0"))));
m_usb1 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:usb1"))));
m_usb2 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:usb2"))));
m_usb3 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:usb3"))));
m_csb0 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:csb0"))));
m_csb1 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:csb1"))));
}
}
}
} // namespace OOX

View File

@@ -0,0 +1,115 @@
/*
* (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 "precompiled_docxformat.h"
#include "FootNote.h"
#include "Log.h"
#include <algorithm>
#include "Exception/log_range_error.h"
#include "FileTypes.h"
namespace OOX
{
FootNote::FootNote()
{
}
FootNote::FootNote(const OOX::CPath& filename)
{
read(filename);
}
FootNote::~FootNote()
{
}
void FootNote::read(const OOX::CPath& filename)
{
IFileContainer::read(filename);
const XML::XDocument document(filename);
XML::Fill(Notes, document.Root, "footnote");
}
void FootNote::write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
{
}
const FileType FootNote::type() const
{
return FileTypes::FootNote;
}
const OOX::CPath FootNote::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const OOX::CPath FootNote::DefaultFileName() const
{
return type().DefaultFileName();
}
const FootNote::Note FootNote::find(const Logic::FootnoteReference& reference) const
{
const std::vector<FootNote::Note>& notes = Notes.get();
for (std::vector<FootNote::Note>::const_iterator iter = notes.begin(); iter != notes.end(); ++iter)
{
if (*(*iter).Id == (*reference.Id))
{
return (*iter);
}
}
throw log_range_error("footnote");
}
void FootNote::add(const FootNote::Note& footnote)
{
push_back(footnote);
}
void FootNote::push_back(const FootNote::Note& footnote)
{
Notes->push_back(footnote);
}
const size_t FootNote::size() const
{
return Notes->size();
}
} // namespace OOX

View File

@@ -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_FOOTNOTE_INCLUDE_H_
#define OOX_FOOTNOTE_INCLUDE_H_
#include "File.h"
#include "IFileContainer.h"
#include <vector>
#include "property.h"
#include "nullable_property.h"
#include "Logic/FootnoteReference.h"
#include "WritingElement.h"
#include "Logic/TextItem.h"
#include "Limit/SeparatorType.h"
namespace OOX
{
class FootNote : public OOX::File, public IFileContainer
{
public:
class Note : public WritingElement
{
public:
Note();
virtual ~Note();
explicit Note(const XML::XNode& node);
const Note& operator =(const XML::XNode& node);
public:
virtual void fromXML(const XML::XNode& node);
virtual const XML::XNode toXML() const;
public:
void push_back(const OOX::Logic::Paragraph& paragraph);
public:
nullable_property<std::string, Limit::SeparatorType> Type;
property<size_t> Id;
property<std::vector<Logic::TextItem> > Items;
};
public:
FootNote();
FootNote(const OOX::CPath& filename);
virtual ~FootNote();
public:
virtual void read(const OOX::CPath& filename);
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const;
public:
virtual const FileType type() const;
virtual const OOX::CPath DefaultDirectory() const;
virtual const OOX::CPath DefaultFileName() const;
public:
const FootNote::Note find(const Logic::FootnoteReference& reference) const;
void add(const FootNote::Note& note);
void push_back(const FootNote::Note& note);
const size_t size() const;
public:
property<std::vector<Note> > Notes;
};
}
#endif // OOX_FOOTNOTE_INCLUDE_H_

View File

@@ -0,0 +1,84 @@
/*
* (c) Copyright Ascensio System SIA 2010-2014
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "precompiled_docxformat.h"
#include "./../FootNote.h"
namespace OOX
{
FootNote::Note::Note()
{
}
FootNote::Note::~Note()
{
}
FootNote::Note::Note(const XML::XNode& node)
{
fromXML(node);
}
const FootNote::Note& FootNote::Note::operator =(const XML::XNode& node)
{
fromXML(node);
return *this;
}
void FootNote::Note::fromXML(const XML::XNode& node)
{
const XML::XElement element(node);
Type = element.attribute("type").value();
Id = element.attribute("id").value();
XML::Fill(Items, element , "p", "tbl");
}
const XML::XNode FootNote::Note::toXML() const
{
return XML::XElement();
}
void FootNote::Note::push_back(const OOX::Logic::Paragraph& paragraph)
{
Items->push_back(paragraph);
}
} // namespace OOX

View File

@@ -0,0 +1,109 @@
/*
* (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 "precompiled_docxformat.h"
#include "Footer.h"
#include "exception\not_implement.h"
#include "FileTypes.h"
namespace OOX
{
Footer::Footer()
{
}
Footer::Footer(const OOX::CPath& filename)
{
read(filename);
}
Footer::~Footer()
{
}
void Footer::read(const OOX::CPath& filename)
{
IFileContainer::read(filename);
const XML::XDocument document(filename);
XML::Fill(m_items, document.Root, "p", "tbl", "sdt");
}
void Footer::write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
{
}
const FileType Footer::type() const
{
return FileTypes::Footer;
}
const OOX::CPath Footer::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const OOX::CPath Footer::DefaultFileName() const
{
return type().DefaultFileName();
}
} // namespace OOX

View 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 OOX_FOOTER_INCLUDE_H_
#define OOX_FOOTER_INCLUDE_H_
#include <vector>
#include "File.h"
#include "IFileContainer.h"
#include "Logic/TextItem.h"
namespace OOX
{
class Footer : public OOX::File, public IFileContainer
{
public:
Footer();
Footer(const OOX::CPath& filename);
virtual ~Footer();
public:
virtual void read(const OOX::CPath& filename);
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const;
public:
virtual const FileType type() const;
virtual const OOX::CPath DefaultDirectory() const;
virtual const OOX::CPath DefaultFileName() const;
public:
std::vector<Logic::TextItem> m_items;
};
}
#endif // OOX_FOOTER_INCLUDE_H_

View File

@@ -0,0 +1,56 @@
/*
* (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 "precompiled_docxformat.h"
#include "FormatError.h"
#include "Log.h"
namespace OOX
{
FormatError::FormatError(const std::string& message)
: runtime_error(message)
{
Log::error(message);
}
FormatError::FormatError(const std::wstring& message)
: runtime_error("docx format error")
{
Log::error(message);
}
} // namespace OOX

View File

@@ -0,0 +1,49 @@
/*
* (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_FORMAT_ERROR_INCLUDE_H_
#define OOX_FORMAT_ERROR_INCLUDE_H_
#include <stdexcept>
#include <string>
namespace OOX
{
class FormatError : public std::runtime_error
{
public:
explicit FormatError(const std::string& message);
explicit FormatError(const std::wstring& message);
};
}
#endif // OOX_FORMAT_ERROR_INCLUDE_H_

View File

@@ -0,0 +1,109 @@
/*
* (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 "precompiled_docxformat.h"
#include "Header.h"
#include "exception\not_implement.h"
#include "FileTypes.h"
namespace OOX
{
Header::Header()
{
}
Header::Header(const OOX::CPath& filename)
{
read(filename);
}
Header::~Header()
{
}
void Header::read(const OOX::CPath& filename)
{
IFileContainer::read(filename);
const XML::XDocument document(filename);
XML::Fill(m_items, document.Root, "p", "tbl", "sdt");
}
void Header::write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
{
}
const FileType Header::type() const
{
return FileTypes::Header;
}
const OOX::CPath Header::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const OOX::CPath Header::DefaultFileName() const
{
return type().DefaultFileName();
}
} // namespace OOXFile

View 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 OOX_HEADER_INCLUDE_H_
#define OOX_HEADER_INCLUDE_H_
#include <vector>
#include "File.h"
#include "IFileContainer.h"
#include "Logic/TextItem.h"
namespace OOX
{
class Header : public OOX::File, public IFileContainer
{
public:
Header();
Header(const OOX::CPath& filename);
virtual ~Header();
public:
virtual void read(const OOX::CPath& filename);
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const;
public:
virtual const FileType type() const;
virtual const OOX::CPath DefaultDirectory() const;
virtual const OOX::CPath DefaultFileName() const;
public:
std::vector<Logic::TextItem> m_items;
};
}
#endif // OOX_HEADER_INCLUDE_H_

View 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
*
*/
#include "precompiled_docxformat.h"
#include "IFileBuilder.h"
namespace OOX
{
IFileBuilder::IFileBuilder()
{
}
IFileBuilder::~IFileBuilder()
{
}
} // namespace OOX

View File

@@ -0,0 +1,52 @@
/*
* (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 OOX::CPath& path) = 0;
virtual void Finalize(const OOX::CPath& path, const OOX::CPath& directory, ContentTypes::File& content) = 0;
};
}
#endif // OOX_FILE_BUILDER_INCLUDE_H_

View File

@@ -0,0 +1,261 @@
/*
* (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 "precompiled_docxformat.h"
#include "IFileContainer.h"
#include "Rels/File.h"
#include "FileFactory.h"
#include "ContentTypes/File.h"
#include "FileType.h"
#include "External/External.h"
#include "External/HyperLink.h"
#include "Media/Media.h"
#include "FileTypes.h"
namespace OOX
{
UnknowTypeFile IFileContainer::unknow;
void IFileContainer::read(const OOX::CPath& filename)
{
OOX::Rels::File rels(filename);
read(rels, OOX::CPath(filename.GetDirectory()));
}
void IFileContainer::read(const Rels::File& rels, const OOX::CPath& path)
{
#ifndef NODOCX
if (rels.Relations.IsInit())
{
for (std::vector<OOX::Rels::RelationShip>::const_iterator iter = rels.Relations.get().m_items.begin();
iter != rels.Relations.get().m_items.end();
++iter)
{
add((*iter).rId(), OOX::CreateFile(path, (*iter)));
}
}
#endif
}
void IFileContainer::write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
{
OOX::Rels::File rels;
const OOX::CPath current = filename.GetDirectory();
write(rels, current, directory, content);
rels.write(filename);
}
void IFileContainer::write(Rels::File& rels, const OOX::CPath& curdir, const OOX::CPath& directory, ContentTypes::File& content) const
{
}
void IFileContainer::Commit(const OOX::CPath& path)
{
}
void IFileContainer::Finalize(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content)
{
}
void IFileContainer::Finalize(Rels::File& rels, const OOX::CPath& curdir, const OOX::CPath& directory, ContentTypes::File& content)
{
}
void IFileContainer::extractPictures(const OOX::CPath& path) const
{
for (std::map<OOX::RId, NSCommon::smart_ptr<OOX::File>>::const_iterator iter = m_container.begin(); iter != m_container.end(); ++iter)
{
if (dynamic_cast<const Image*>((*iter).second.operator->()) != 0)
{
const Image& image = static_cast<const Image&>(*(*iter).second);
image.copy_to(path);
}
else if (dynamic_cast<const IFileContainer*>((*iter).second.operator->()) != 0)
{
const IFileContainer& container = dynamic_cast<const IFileContainer&>(*(*iter).second);
container.extractPictures(path);
}
}
}
Image& IFileContainer::image(const RId rId)
{
return const_cast<Image&>( static_cast<const IFileContainer*>(this)->image(rId) );
}
const Image& IFileContainer::image(const RId rId) const
{
if (m_container.count(rId))
{
if (OOX::File* file = ((OOX::File*)m_container.find(rId)->second.operator->()))
{
if (const Image * image = dynamic_cast<const Image*>(file))
return *image;
else
throw std::runtime_error("invalid rel type");
}
else
{
throw std::runtime_error("invalid rel");
}
}
else
{
throw std::runtime_error("invalid rId");
}
}
HyperLink& IFileContainer::hyperlink(const RId rId)
{
return dynamic_cast<HyperLink&>(*m_container[rId]);
}
const HyperLink& IFileContainer::hyperlink(const RId rId) const
{
return dynamic_cast<const HyperLink&>(*m_container.find(rId)->second);
}
OleObject& IFileContainer::oleObject(const RId rId)
{
return dynamic_cast<OleObject&>(*m_container[rId]);
}
const OleObject& IFileContainer::oleObject(const RId rId) const
{
return dynamic_cast<const OleObject&>(*m_container.find(rId)->second);
}
const bool IFileContainer::exist(const FileType& type) const
{
for (std::map<OOX::RId, NSCommon::smart_ptr<OOX::File>>::const_iterator iter = m_container.begin(); iter != m_container.end(); ++iter)
{
if ((*iter).second->type() == type)
return true;
}
return false;
}
const bool IFileContainer::exist(const RId& rId) const
{
return m_container.find(rId) != m_container.end();
}
const bool IFileContainer::isExternal(const OOX::RId& rId) const
{
if(m_container.find(rId) != m_container.end())
{
std::wstring type = m_container.find(rId)->second->type().RelationType();
std::wstring name = m_container.find(rId)->second->type().DefaultFileName().GetPath();
return (((type == OOX::FileTypes::ExternalAudio.RelationType()) || (type == OOX::FileTypes::ExternalImage.RelationType())
|| (type == OOX::FileTypes::ExternalVideo.RelationType())) && (name == L""));
}
return true;
}
const NSCommon::smart_ptr<OOX::File> IFileContainer::get(const FileType& type) const
{
for (std::map<OOX::RId, NSCommon::smart_ptr<OOX::File>>::const_iterator iter = m_container.begin(); iter != m_container.end(); ++iter)
{
if ((*iter).second->type() == type)
return (*iter).second;
}
return NSCommon::smart_ptr<OOX::File>(new UnknowTypeFile(unknow));
}
const RId IFileContainer::add(const NSCommon::smart_ptr<OOX::File>& file)
{
const RId rId = maxRId().next();
add(rId, file);
return rId;
}
void IFileContainer::add(const OOX::RId rId, const NSCommon::smart_ptr<OOX::File>& file)
{
IDictonary::add(rId, file);
}
File& IFileContainer::find(const FileType& type)
{
for (std::map<OOX::RId, NSCommon::smart_ptr<OOX::File>>::const_iterator iter = m_container.begin(); iter != m_container.end(); ++iter)
{
if ((*iter).second->type() == type)
return *((OOX::File*)(*iter).second.operator->());
}
return unknow;
}
const File& IFileContainer::find(const FileType& type) const
{
for (std::map<OOX::RId, NSCommon::smart_ptr<OOX::File>>::const_iterator iter = m_container.begin(); iter != m_container.end(); ++iter)
{
if ((*iter).second->type() == type)
return *(*iter).second.operator->();
}
return unknow;
}
NSCommon::smart_ptr<OOX::File> IFileContainer::operator [](const OOX::RId rId)
{
return m_container[rId];
}
const NSCommon::smart_ptr<OOX::File> IFileContainer::operator [](const OOX::RId rId) const
{
return m_container.find(rId)->second;
}
File& IFileContainer::operator [](const FileType& type)
{
return find(type);
}
const File& IFileContainer::operator [](const FileType& type) const
{
return find(type);
}
const RId IFileContainer::maxRId() const
{
RId rId;
for (std::map<OOX::RId, NSCommon::smart_ptr<OOX::File>>::const_iterator iter = m_container.begin(); iter != m_container.end(); ++iter)
{
if (rId < (*iter).first)
rId = (*iter).first;
}
return rId;
}
} // namespace OOX

View File

@@ -0,0 +1,135 @@
/*
* (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 "IDictonary.h"
#include "RId.h"
#include "UnknowTypeFile.h"
#include "IFileBuilder.h"
#include "../../../../Common/DocxFormat/Source/Base/SmartPtr.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 IDictonary<OOX::RId, NSCommon::smart_ptr<OOX::File> >
{
protected:
void read(const OOX::CPath& filename);
void read(const Rels::File& rels, const OOX::CPath& path);
void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const;
void write(Rels::File& rels, const OOX::CPath& current, const OOX::CPath& directory, ContentTypes::File& content) const;
protected:
void Commit(const OOX::CPath& path);
void Finalize(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content);
void Finalize(Rels::File& rels, const OOX::CPath& current, const OOX::CPath& directory, ContentTypes::File& content);
public:
typedef std::pair<const OOX::RId, NSCommon::smart_ptr<OOX::File> > RIdFilePair;
public:
void extractPictures(const OOX::CPath& path) const;
public:
Image& image(const RId rId);
const Image& image(const RId rId) const;
HyperLink& hyperlink(const RId rId);
const HyperLink& hyperlink(const RId rId) const;
OleObject& oleObject(const RId rId);
const 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;
const NSCommon::smart_ptr<OOX::File> get(const FileType& type) const;
const RId add(const NSCommon::smart_ptr<OOX::File>& file);
void add(const OOX::RId rId, const NSCommon::smart_ptr<OOX::File>& file);
File& find(const FileType& type);
const File& find(const FileType& type) const;
NSCommon::smart_ptr<OOX::File> operator [](const OOX::RId rId);
const NSCommon::smart_ptr<OOX::File> operator [](const OOX::RId rId) const;
File& operator [](const FileType& type);
const File& operator [](const FileType& type) const;
template<typename T> T& find();
template<typename T> const T& find() const;
protected:
static UnknowTypeFile unknow;
private:
const RId maxRId() const;
};
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()));
}
template<typename T>
const T& IFileContainer::find() const
{
T file;
return dynamic_cast<const T&>(find(file.type()));
}
}
#endif // OOX_IFILE_CONTAINER_INCLUDE_H_

View 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
*
*/
#include "precompiled_docxformat.h"
#include "Item.h"
#include "FileTypes.h"
namespace OOX
{
Item::Item()
{
}
Item::Item(const OOX::CPath& filename)
{
read(filename);
}
Item::~Item()
{
}
void Item::read(const OOX::CPath& filename)
{
const XML::XDocument document(filename);
SelectedStyle = document.Root.attribute("SelectedStyle").value();
StyleName = document.Root.attribute("StyleName").value();
}
void Item::write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
{
}
const FileType Item::type() const
{
return FileTypes::Item;
}
const OOX::CPath Item::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const OOX::CPath Item::DefaultFileName() const
{
return type().DefaultFileName();
}
} // namespace OOX

View File

@@ -0,0 +1,64 @@
/*
* (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_ITEM_INCLUDE_H_
#define OOX_ITEM_INCLUDE_H_
#include "File.h"
#include "nullable_property.h"
namespace OOX
{
class Item : public OOX::File
{
public:
Item();
Item(const OOX::CPath& filename);
virtual ~Item();
public:
virtual void read(const OOX::CPath& filename);
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const;
public:
virtual const FileType type() const;
virtual const OOX::CPath DefaultDirectory() const;
virtual const OOX::CPath DefaultFileName() const;
private:
nullable_property<std::string> SelectedStyle;
nullable_property<std::string> StyleName;
};
}
#endif // OOX_ITEM_INCLUDE_H_

View 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
*
*/
#include "precompiled_docxformat.h"
#include "ItemProps.h"
#include "FileTypes.h"
namespace OOX
{
ItemProps::ItemProps()
{
}
ItemProps::ItemProps(const OOX::CPath& filename)
{
read(filename);
}
ItemProps::~ItemProps()
{
}
void ItemProps::read(const OOX::CPath& filename)
{
const XML::XDocument document(filename);
ItemID = document.Root.attribute("itemID").value();
}
void ItemProps::write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const
{
}
const FileType ItemProps::type() const
{
return FileTypes::ItemProp;
}
const OOX::CPath ItemProps::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const OOX::CPath ItemProps::DefaultFileName() const
{
return type().DefaultFileName();
}
} // namespace OOX

View File

@@ -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_ITEM_PROPS_INCLUDE_H_
#define OOX_ITEM_PROPS_INCLUDE_H_
#include "File.h"
#include "property.h"
#include <string>
#include <vector>
#include "WritingElement.h"
namespace OOX
{
class ItemProps : public OOX::File, public WritingElement
{
public:
class SchemaRef : public WritingElement
{
public:
SchemaRef();
virtual ~SchemaRef();
explicit SchemaRef(const XML::XNode& node);
const SchemaRef& operator =(const XML::XNode& node);
public:
virtual void fromXML(const XML::XNode& node);
virtual const XML::XNode toXML() const;
public:
property<std::string> Uri;
};
class SchemaRefs : public WritingElement
{
public:
SchemaRefs();
virtual ~SchemaRefs();
explicit SchemaRefs(const XML::XNode& node);
const SchemaRefs& operator =(const XML::XNode& node);
public:
virtual void fromXML(const XML::XNode& node);
virtual const XML::XNode toXML() const;
public:
std::vector<SchemaRef> SchemaRef;
};
public:
ItemProps();
ItemProps(const OOX::CPath& filename);
virtual ~ItemProps();
public:
virtual void read(const OOX::CPath& filename);
virtual void write(const OOX::CPath& filename, const OOX::CPath& directory, ContentTypes::File& content) const;
public:
virtual const FileType type() const;
virtual const OOX::CPath DefaultDirectory() const;
virtual const OOX::CPath DefaultFileName() const;
private:
property<SchemaRefs> Refs;
property<std::string> ItemID;
};
}
#endif // OOX_ITEM_PROPS_INCLUDE_H_

View File

@@ -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
*
*/
#include "precompiled_docxformat.h"
#include "./../ItemProps.h"
namespace OOX
{
ItemProps::SchemaRef::SchemaRef()
{
}
ItemProps::SchemaRef::~SchemaRef()
{
}
ItemProps::SchemaRef::SchemaRef (const XML::XNode& node)
{
fromXML(node);
}
const ItemProps::SchemaRef& ItemProps::SchemaRef::operator =(const XML::XNode& node)
{
fromXML(node);
return *this;
}
void ItemProps::SchemaRef::fromXML(const XML::XNode& node)
{
const XML::XElement element(node);
Uri = element.attribute("uri").value();
}
const XML::XNode ItemProps::SchemaRef::toXML() const
{
return XML::XElement();
}
} // namespace OOX

View File

@@ -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
*
*/
#include "precompiled_docxformat.h"
#include "./../ItemProps.h"
namespace OOX
{
ItemProps::SchemaRefs::SchemaRefs()
{
}
ItemProps::SchemaRefs::~SchemaRefs()
{
}
ItemProps::SchemaRefs::SchemaRefs(const XML::XNode& node)
{
fromXML(node);
}
const ItemProps::SchemaRefs& ItemProps::SchemaRefs::operator =(const XML::XNode& node)
{
fromXML(node);
return *this;
}
void ItemProps::SchemaRefs::fromXML(const XML::XNode& node)
{
const XML::XElement element(node);
XML::Fill(SchemaRef, element);
}
const XML::XNode ItemProps::SchemaRefs::toXML() const
{
return XML::XElement();
}
} // namespace OOX

View File

@@ -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
*
*/
#include "precompiled_docxformat.h"
#include "BorderName.h"
namespace OOX
{
namespace Limit
{
BorderNameSet::BorderNameSet()
{
_list.insert("top");
_list.insert("left");
_list.insert("bottom");
_list.insert("right");
_list.insert("insideH");
_list.insert("insideV");
}
BorderName::BorderName()
{
}
BorderNameSet BorderName::_set;
const std::string BorderName::no_find() const
{
return "top";
}
void BorderName::operator()(std::string& _value, Parameter value)
{
if (_set._list.find(value) != _set._list.end())
_value = value;
else
_value = no_find();
}
}
} // namespace OOX

View File

@@ -0,0 +1,64 @@
/*
* (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_LIMIT_BORDER_NAME_INCLUDE_H_
#define OOX_LIMIT_BORDER_NAME_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class BorderNameSet
{
public:
BorderNameSet();
std::set<std::string> _list;
};
class BorderName : public setter::base_setter<std::string>
{
public:
BorderName();
void operator()(std::string& _value, Parameter value);
public:
static BorderNameSet _set;
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_BORDER_NAME_INCLUDE_H_

View File

@@ -0,0 +1,116 @@
/*
* (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 "precompiled_docxformat.h"
#include "BorderValue.h"
namespace OOX
{
namespace Limit
{
BorderValueSet::BorderValueSet()
{
_list.insert("single");
_list.insert("none");
_list.insert("nil");
_list.insert("candyCorn");
_list.insert("dashed");
_list.insert("dotDash");
_list.insert("dotDotDash");
_list.insert("double");
_list.insert("triple");
_list.insert("thinThickSmallGap");
_list.insert("thickThinSmallGap");
_list.insert("thinThickThinSmallGap");
_list.insert("thinThickMediumGap");
_list.insert("thickThinMediumGap");
_list.insert("thinThickThinMediumGap");
_list.insert("thinThickLargeGap");
_list.insert("thickThinLargeGap");
_list.insert("thinThickThinLargeGap");
_list.insert("wave");
_list.insert("doubleWave");
_list.insert("dashDotStroked");
_list.insert("threeDEmboss");
_list.insert("threeDEngrave");
_list.insert("outset");
_list.insert("inset");
}
BorderValue::BorderValue()
{
}
BorderValueSet BorderValue::_set;
const std::string BorderValue::no_find() const
{
return "none";
}
void BorderValue::operator()(std::string& _value, Parameter value)
{
if (_set._list.find(value) != _set._list.end())
_value = value;
else
_value = no_find();
}
}
} // namespace OOX

View 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 OOX_LIMIT_BORDER_VALUE_INCLUDE_H_
#define OOX_LIMIT_BORDER_VALUE_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class BorderValueSet
{
public:
BorderValueSet();
std::set<std::string> _list;
};
class BorderValue : public setter::base_setter<std::string>
{
public:
BorderValue();
void operator()(std::string& _value, Parameter value);
public:
static BorderValueSet _set;
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_BORDER_VALUE_INCLUDE_H_

View File

@@ -0,0 +1,56 @@
/*
* (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 "precompiled_docxformat.h"
#include "BreakClear.h"
namespace OOX
{
namespace Limit
{
BreakClear::BreakClear()
{
add("all");
add("left");
add("none");
add("right");
}
const std::string BreakClear::no_find() const
{
return "all";
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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_LIMIT_BREAK_CLEAR_INCLUDE_H_
#define OOX_LIMIT_BREAK_CLEAR_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class BreakClear : public setter::from<std::string>
{
public:
BreakClear();
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_BREAK_CLEAR_INCLUDE_H_

View File

@@ -0,0 +1,55 @@
/*
* (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 "precompiled_docxformat.h"
#include "BreakType.h"
namespace OOX
{
namespace Limit
{
BreakType::BreakType()
{
add("page");
add("column");
add("textWrapping");
}
const std::string BreakType::no_find() const
{
return "page";
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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_LIMIT_BREAK_TYPE_INCLUDE_H_
#define OOX_LIMIT_BREAK_TYPE_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class BreakType : public setter::from<std::string>
{
public:
BreakType();
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_BREAK_TYPE_INCLUDE_H_

View File

@@ -0,0 +1,55 @@
/*
* (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 "precompiled_docxformat.h"
#include "Cap.h"
namespace OOX
{
namespace Limit
{
Cap::Cap()
{
add("rnd");
add("sq");
add("flat");
}
const std::string Cap::no_find() const
{
return "rnd";
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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_LIMIT_CAP_INCLUDE_H_
#define OOX_LIMIT_CAP_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class Cap : public setter::from<std::string>
{
public:
Cap();
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_CAP_INCLUDE_H_

View File

@@ -0,0 +1,56 @@
/*
* (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 "precompiled_docxformat.h"
#include "Cmpd.h"
namespace OOX
{
namespace Limit
{
Cmpd::Cmpd()
{
add("sng");
add("thickThin");
add("tri");
add("dbl");
}
const std::string Cmpd::no_find() const
{
return "sng";
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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_LIMIT_CMPD_INCLUDE_H_
#define OOX_LIMIT_CMPD_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class Cmpd : public setter::from<std::string>
{
public:
Cmpd();
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_CMPD_INCLUDE_H_

View File

@@ -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
*
*/
#include "precompiled_docxformat.h"
#include "ComplexExt.h"
namespace OOX
{
namespace Limit
{
ComplexExt::ComplexExt()
{
add("view");
}
const std::string ComplexExt::no_find() const
{
return "view";
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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_LIMIT_COMPLEX_EXT_INCLUDE_H_
#define OOX_LIMIT_COMPLEX_EXT_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class ComplexExt : public setter::from<std::string>
{
public:
ComplexExt();
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_COMPLEX_EXT_INCLUDE_H_

View File

@@ -0,0 +1,54 @@
/*
* (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 "precompiled_docxformat.h"
#include "ConnectType.h"
namespace OOX
{
namespace Limit
{
ConnectType::ConnectType()
{
add("rect");
add("custom");
}
const std::string ConnectType::no_find() const
{
return "rect";
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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_LIMIT_CONNECT_TYPE_INCLUDE_H_
#define OOX_LIMIT_CONNECT_TYPE_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class ConnectType : public setter::from<std::string>
{
public:
ConnectType();
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_CONNECT_TYPE_INCLUDE_H_

View File

@@ -0,0 +1,58 @@
/*
* (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 "precompiled_docxformat.h"
#include "Dash.h"
namespace OOX
{
namespace Limit
{
Dash::Dash()
{
add("solid");
add("sysDash");
add("sysDot");
add("dash");
add("lgDash");
add("lgDashDot");
}
const std::string Dash::no_find() const
{
return "solid";
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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_LIMIT_DASH_INCLUDE_H_
#define OOX_LIMIT_DASH_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class Dash : public setter::from<std::string>
{
public:
Dash();
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_DASH_INCLUDE_H_

View File

@@ -0,0 +1,56 @@
/*
* (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 "precompiled_docxformat.h"
#include "DocGridType.h"
namespace OOX
{
namespace Limit
{
DocGridType::DocGridType()
{
add("Default");
add("lines");
add("linesAndChars");
add("snapToChars");
}
const std::string DocGridType::no_find() const
{
return "Default";
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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_LIMIT_DOC_GRID_TYPE_INCLUDE_H_
#define OOX_LIMIT_DOC_GRID_TYPE_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class DocGridType : public setter::from<std::string>
{
public:
DocGridType();
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_DOC_GRID_TYPE_INCLUDE_H_

View File

@@ -0,0 +1,57 @@
/*
* (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 "precompiled_docxformat.h"
#include "DrawingWrapType.h"
namespace OOX
{
namespace Limit
{
DrawingWrapType::DrawingWrapType()
{
add("wrapNone");
add("wrapSquare");
add("wrapTight");
add("wrapThrough");
add("wrapTopAndBottom");
}
const std::string DrawingWrapType::no_find() const
{
return "wrapTopAndBottom";
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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_LIMIT_DRAWINGWRAPTYPE_INCLUDE_H_
#define OOX_LIMIT_DRAWINGWRAPTYPE_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class DrawingWrapType : public setter::from<std::string>
{
public:
DrawingWrapType();
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_DRAWINGWRAPTYPE_INCLUDE_H_

View File

@@ -0,0 +1,55 @@
/*
* (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 "precompiled_docxformat.h"
#include "DropCap.h"
namespace OOX
{
namespace Limit
{
DropCap::DropCap()
{
add("drop");
add("margin");
add("none");
}
const std::string DropCap::no_find() const
{
return "none";
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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_LIMIT_DROP_CAP_INCLUDE_H_
#define OOX_LIMIT_DROP_CAP_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class DropCap : public setter::from<std::string>
{
public:
DropCap();
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_DROP_CAP_INCLUDE_H_

View File

@@ -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
*
*/
#include "precompiled_docxformat.h"
#include "Ext.h"
namespace OOX
{
namespace Limit
{
Ext::Ext()
{
add("edit");
}
const std::string Ext::no_find() const
{
return "edit";
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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_LIMIT_EXT_INCLUDE_H_
#define OOX_LIMIT_EXT_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class Ext : public setter::from<std::string>
{
public:
Ext();
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_EXT_INCLUDE_H_

View File

@@ -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
*
*/
#include "precompiled_docxformat.h"
#include "FillType.h"
namespace OOX
{
namespace Limit
{
FillType::FillType()
{
add("gradient");
}
const std::string FillType::no_find() const
{
return "gradient";
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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_LIMIT_FILL_TYPE_INCLUDE_H_
#define OOX_LIMIT_FILL_TYPE_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class FillType : public setter::from<std::string>
{
public:
FillType();
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_EXT_INCLUDE_H_

View File

@@ -0,0 +1,55 @@
/*
* (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 "precompiled_docxformat.h"
#include "FldCharType.h"
namespace OOX
{
namespace Limit
{
FldCharType::FldCharType()
{
add("begin");
add("end");
add("separate");
}
const std::string FldCharType::no_find() const
{
return "begin";
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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_LIMIT_FLD_CHAR_TYPE_INCLUDE_H_
#define OOX_LIMIT_FLD_CHAR_TYPE_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class FldCharType : public setter::from<std::string>
{
public:
FldCharType();
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_FLD_CHAR_TYPE_INCLUDE_H_

View File

@@ -0,0 +1,57 @@
/*
* (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 "precompiled_docxformat.h"
#include "FontCharset.h"
namespace OOX
{
namespace Limit
{
FontCharset::FontCharset()
{
add("CC");
add("00");
add("02");
add("80");
add("86");
}
const std::string FontCharset::no_find() const
{
return "CC";
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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_LIMIT_FONT_CHARSET_INCLUDE_H_
#define OOX_LIMIT_FONT_CHARSET_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class FontCharset : public setter::from<std::string>
{
public:
FontCharset();
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_FONT_CHARSET_INCLUDE_H_

View File

@@ -0,0 +1,58 @@
/*
* (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 "precompiled_docxformat.h"
#include "FontFamily.h"
namespace OOX
{
namespace Limit
{
FontFamily::FontFamily()
{
add("swiss");
add("roman");
add("decorative");
add("auto");
add("script");
add("modern");
}
const std::string FontFamily::no_find() const
{
return "swiss";
}
}
} // namespace OOX

View File

@@ -0,0 +1,55 @@
/*
* (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_LIMIT_FONT_FAMILY_INCLUDE_H_
#define OOX_LIMIT_FONT_FAMILY_INCLUDE_H_
#include "setter.h"
#include <string>
namespace OOX
{
namespace Limit
{
class FontFamily : public setter::from<std::string>
{
public:
FontFamily();
private:
virtual const std::string no_find() const;
};
}
}
#endif // OOX_LIMIT_FONT_FAMILY_INCLUDE_H_

View File

@@ -0,0 +1,219 @@
/*
* (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 "precompiled_docxformat.h"
#include "FontName.h"
namespace OOX
{
namespace Limit
{
FontName::FontName()
{
add("Calibri");
add("Times New Roman");
add("Agency FB");
add("Arial");
add("Algerian");
add("Arial Black");
add("Arial Narrow");
add("Arial Rounded MT Bold");
add("Arial Unicode MS");
add("Aston-F1");
add("Baskerville Old Face");
add("Bauhaus 93");
add("Bell MT");
add("Berlin Sans FB");
add("Berlin Sans FB Demi");
add("Bernard MT Condensed");
add("Blackadder ITC");
add("Bodoni MT");
add("Bodoni MT Black");
add("Bodoni MT Condensed");
add("Bodoni MT Poster Compressed");
add("Book Antiqua");
add("Bookman Old Style");
add("Bookshelf Symbol 7");
add("Bradley Hand ITC");
add("Britannic Bold");
add("Broadway");
add("Brush Script MT");
add("Californian FB");
add("Calisto MT");
add("Cambria");
add("Cambria Math");
add("Candara");
add("Castellar");
add("Centaur");
add("Century");
add("Century Gothic");
add("Century Schoolbook");
add("Chiller");
add("Colonna MT");
add("Comic Sans MS");
add("Consolas");
add("Constantia");
add("Cooper Black");
add("Copperplate Gothic Bold");
add("Copperplate Gothic Light");
add("Corbel");
add("Courier New");
add("Curlz MT");
add("Edwardian Script ITC");
add("Elephant");
add("Engravers MT");
add("Eras Bold ITC");
add("Eras Demi ITC");
add("Eras Light ITC");
add("Eras Medium ITC");
add("Estrangelo Edessa");
add("Felix Titling");
add("Footlight MT Light");
add("Forte");
add("Franklin Gothic Book");
add("Franklin Gothic Demi");
add("Franklin Gothic Demi Cond");
add("Franklin Gothic Heavy");
add("Franklin Gothic Medium");
add("Franklin Gothic Medium Cond");
add("Freestyle Script");
add("French Script MT");
add("Garamond");
add("Gautami");
add("Georgia");
add("Gigi");
add("Gill Sans MT");
add("Gill Sans MT Condensed");
add("Gill Sans MT Ext Condensed Bold");
add("Gill Sans Ultra Bold");
add("Gill Sans Ultra Bold Condensed");
add("Gloucester MT Extra Condensed");
add("Goudy Old Style");
add("Goudy Stout");
add("Haettenschweiler");
add("Harlow Solid Italic");
add("Harrington");
add("High Tower Text");
add("Impact");
add("Imprint MT Shadow");
add("Informal Roman");
add("Jokerman");
add("Juice ITC");
add("Kristen ITC");
add("Kunstler Script");
add("Latha");
add("Lucida Bright");
add("Lucida Calligraphy");
add("Lucida Console");
add("Lucida Fax");
add("Lucida Handwriting");
add("Lucida Sans");
add("Lucida Sans Typewriter");
add("Lucida Sans Unicode");
add("Magneto");
add("Maiandra GD");
add("Mangal");
add("Marlett");
add("Matura MT Script Capitals");
add("Microsoft Sans Serif");
add("Mistral");
add("Modern No. 20");
add("Monotype Corsiva");
add("MS Mincho");
add("MS Outlook");
add("MS Reference Sans Serif");
add("MS Reference Specialty");
add("MT Extra");
add("MV Boli");
add("Niagara Engraved");
add("Niagara Solid");
add("OCR A Extended");
add("Old English Text MT");
add("Onyx");
add("OpenSymbol");
add("Palace Script MT");
add("Palatino Linotype");
add("Papyrus");
add("Parchment");
add("Perpetua");
add("Perpetua Titling MT");
add("Playbill");
add("Poor Richard");
add("Pristina");
add("Raavi");
add("Rage Italic");
add("Ravie");
add("Rockwell");
add("Rockwell Condensed");
add("Rockwell Extra Bold");
add("Script MT Bold");
add("Segoe Print");
add("Segoe Script");
add("Segoe UI");
add("Showcard Gothic");
add("Shruti");
add("SimHei");
add("Snap ITC");
add("Stencil");
add("Sylfaen");
add("Symbol");
add("Tahoma");
add("Tempus Sans ITC");
add("Thorndale");
add("Trebuchet MS");
add("Tunga");
add("Tw Cen MT");
add("Tw Cen MT Condensed");
add("Tw Cen MT Condensed Extra Bold");
add("Verdana");
add("Viner Hand ITC");
add("Vivaldi");
add("Vladimir Script");
add("Webdings");
add("Wide Latin");
add("Wingdings");
add("Wingdings 2");
add("Wingdings 3");
}
const std::string FontName::no_find() const
{
return "Times New Roman";
}
}
} // namespace OOX

Some files were not shown because too many files have changed in this diff Show More