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,95 @@
/*
* (c) Copyright Ascensio System SIA 2010-2014
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "VideoFileErrorDescription.h"
class CAVSATLError
{
public:
CLSID m_clsid;
IID m_iid;
CAVSATLError(CLSID clsid, IID iid)
{
m_clsid = clsid;
m_iid = iid;
}
HRESULT Error(LONG Code)
{
LPCOLESTR lpszDesc;
HRESULT hRes;
switch(Code)
{
case NOERROR: return S_OK;
case BUSY: hRes=AVS_ERROR_BUSY;lpszDesc=c_pszErrorBusy;break;
case MEMORY: hRes=AVS_ERROR_MEMORY;lpszDesc=c_pszErrorMemory;break;
case FILEACCESS: hRes=AVS_ERROR_FILEACCESS;lpszDesc=c_pszErrorFileAccess;break;
case FILEFORMAT: hRes=AVS_ERROR_FILEFORMAT;lpszDesc=c_pszErrorFileFormat;break;
case VIDEOUNSUPPORTED: hRes=AVS_ERROR_VIDEOUNSUPPORTED;lpszDesc=c_pszErrorVideoUnsupported;break;
case AUDIOUNSUPPORTED: hRes=AVS_ERROR_AUDIOUNSUPPORTED;lpszDesc=c_pszErrorAudioUnsupported;break;
case INVALIDOPERATION: hRes=AVS_ERROR_INVALIDOPERATION;lpszDesc=c_pszErrorInvalidOperation;break;
case INVALIDARGUMENT: hRes=AVS_ERROR_INVALIDARGUMENT;lpszDesc=c_pszErrorInvalidArgument;break;
case CONTROLNOTINSTALLED: hRes=AVS_ERROR_CONTROLNOTINSTALLED;lpszDesc=c_pszErrorControlNotInstalled;break;
case INDEXOUTOFRANGE: hRes=AVS_ERROR_INDEXOUTOFRANGE;lpszDesc=c_pszErrorIndexOutOfRange;break;
case QT_CONTAINER: hRes=AVS_ERROR_QT_CONTAINER;lpszDesc=c_pszErrorQtContainer;break;
case QT_VIDEODESC: hRes=AVS_ERROR_QT_VIDEODESC;lpszDesc=c_pszErrorQtVideoDesc;break;
case QT_AUDIODESC: hRes=AVS_ERROR_QT_AUDIODESC;lpszDesc=c_pszErrorQtAudioDesc;break;
case QT_AUDIOCODEC: hRes=AVS_ERROR_QT_AUDIOCODEC;lpszDesc=c_pszErrorQtAudioCodec;break;
case QT_VIDEOCODEC: hRes=AVS_ERROR_QT_VIDEOCODEC;lpszDesc=c_pszErrorQtVideoCodec;break;
case AVI_CONTAINER: hRes=AVS_ERROR_AVI_CONTAINER;lpszDesc=c_pszErrorAviContainer;break;
case ACM_AUDIOCODEC: hRes=AVS_ERROR_ACM_AUDIOCODEC;lpszDesc=c_pszErrorAcmAudioCodec;break;
case ACM_VIDEOCODEC: hRes=AVS_ERROR_ACM_VIDEOCODEC;lpszDesc=c_pszErrorAcmVideoCodec;break;
case DVD_CONTENTPROTECT: hRes=AVS_ERROR_DVD_CONTENTPROTECT;lpszDesc=c_pszErrorDVDContentProtect;break;
case DVD_REGIONMISMATCH: hRes=AVS_ERROR_DVD_REGIONMISMATCH;lpszDesc=c_pszErrorDVDRegionMismatch;break;
case BLURAY_CONTENTPROTECT: hRes=AVS_ERROR_BLURAY_CONTENTPROTECT;lpszDesc=c_pszErrorBluRayContentProtect;break;
case BLURAY_REGIONMISMATCH: hRes=AVS_ERROR_BLURAY_REGIONMISMATCH;lpszDesc=c_pszErrorBluRayRegionMismatch;break;
case AUDIOOUTDRIVER: hRes=AVS_ERROR_AUDIOOUTDRIVER;lpszDesc=c_pszErrorAudioOutDriver;break;
case AUDIOINPDRIVER: hRes=AVS_ERROR_AUDIOINPDRIVER;lpszDesc=c_pszErrorAudioInpDriver;break;
case AUDIOMIXERDRIVER: hRes=AVS_ERROR_AUDIOMIXERDRIVER;lpszDesc=c_pszErrorAudioMixerDriver;break;
case ASPIDRIVER: hRes=AVS_ERROR_ASPIDRIVER;lpszDesc=c_pszErrorAspiDriver;break;
case STREAM : hRes=AVS_ERROR_STREAM;lpszDesc=c_pszErrorStream;break;
case FILEFORMATIDENTICAL: hRes=AVS_ERROR_FILEFORMATIDENTICAL;lpszDesc=c_pszErrorFileFormatIdentical;break;
case FILEOPENCANCEL: hRes=AVS_ERROR_FILEOPENCANCEL;lpszDesc=c_pszErrorFileOpenCancel;break;
case REMAKER_ERROR_OPEN_SRC_FILE: hRes=AVS_REMAKER_ERROR_OPEN_SRC_FILE;lpszDesc=c_pszErrorRemakerOpenSrcFile;break;
case REMAKER_ERROR_CREATE_DST_FILE: hRes=AVS_REMAKER_ERROR_CREATE_DST_FILE;lpszDesc=c_pszErrorRemakerCreateDstFile;break;
case REMAKER_ERROR_NO_EQUAL_VIDEO: hRes=AVS_ERROR_FILEOPENCANCEL;lpszDesc=c_pszErrorFileOpenCancel;break;
case REMAKER_ERROR_CONTAINER: hRes=AVS_ERROR_FILEOPENCANCEL;lpszDesc=c_pszErrorFileOpenCancel;break;
case UNEXPECTED:
default: hRes=AVS_ERROR_UNEXPECTED;lpszDesc=c_pszErrorUnexpected;break;
}
return AtlReportError(m_clsid, lpszDesc, m_iid, hRes);
}
};

View File

@@ -0,0 +1,80 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boost_system", "Projects\boost_system.vcproj", "{7A3C0AE1-9FA1-4F56-99C0-139192364F57}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boost_filesystem", "Projects\boost_filesystem.vcproj", "{3C7D3E76-9C62-4D0E-9645-8731700B1D70}"
ProjectSection(ProjectDependencies) = postProject
{7A3C0AE1-9FA1-4F56-99C0-139192364F57} = {7A3C0AE1-9FA1-4F56-99C0-139192364F57}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "Projects\Common.vcproj", "{873D625C-37E4-47C4-8120-2D9FC6A98765}"
ProjectSection(ProjectDependencies) = postProject
{CF068422-CD0A-484E-B4A9-A0CD108EBBB9} = {CF068422-CD0A-484E-B4A9-A0CD108EBBB9}
{56F6B346-D0EA-4149-88C4-B6D09E0E9BA6} = {56F6B346-D0EA-4149-88C4-B6D09E0E9BA6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XML", "Projects\XML.vcproj", "{CF068422-CD0A-484E-B4A9-A0CD108EBBB9}"
ProjectSection(ProjectDependencies) = postProject
{56F6B346-D0EA-4149-88C4-B6D09E0E9BA6} = {56F6B346-D0EA-4149-88C4-B6D09E0E9BA6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "Projects\DocxFormat.vcproj", "{67EB0D73-21A0-44C9-ADB2-109526E60429}"
ProjectSection(ProjectDependencies) = postProject
{CF068422-CD0A-484E-B4A9-A0CD108EBBB9} = {CF068422-CD0A-484E-B4A9-A0CD108EBBB9}
{56F6B346-D0EA-4149-88C4-B6D09E0E9BA6} = {56F6B346-D0EA-4149-88C4-B6D09E0E9BA6}
{873D625C-37E4-47C4-8120-2D9FC6A98765} = {873D625C-37E4-47C4-8120-2D9FC6A98765}
{7D2165DA-B528-4318-A03F-6E922547C09D} = {7D2165DA-B528-4318-A03F-6E922547C09D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utility", "Projects\Utility.vcproj", "{56F6B346-D0EA-4149-88C4-B6D09E0E9BA6}"
ProjectSection(ProjectDependencies) = postProject
{3C7D3E76-9C62-4D0E-9645-8731700B1D70} = {3C7D3E76-9C62-4D0E-9645-8731700B1D70}
{7A3C0AE1-9FA1-4F56-99C0-139192364F57} = {7A3C0AE1-9FA1-4F56-99C0-139192364F57}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeSvmFile", "..\..\ASCOfficeOdtFile\Source\OfficeSvmFile\OfficeSvmFile.vcproj", "{7D2165DA-B528-4318-A03F-6E922547C09D}"
ProjectSection(ProjectDependencies) = postProject
{3C7D3E76-9C62-4D0E-9645-8731700B1D70} = {3C7D3E76-9C62-4D0E-9645-8731700B1D70}
{7A3C0AE1-9FA1-4F56-99C0-139192364F57} = {7A3C0AE1-9FA1-4F56-99C0-139192364F57}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7A3C0AE1-9FA1-4F56-99C0-139192364F57}.Debug|Win32.ActiveCfg = Debug|Win32
{7A3C0AE1-9FA1-4F56-99C0-139192364F57}.Debug|Win32.Build.0 = Debug|Win32
{7A3C0AE1-9FA1-4F56-99C0-139192364F57}.Release|Win32.ActiveCfg = Release|Win32
{7A3C0AE1-9FA1-4F56-99C0-139192364F57}.Release|Win32.Build.0 = Release|Win32
{3C7D3E76-9C62-4D0E-9645-8731700B1D70}.Debug|Win32.ActiveCfg = Debug|Win32
{3C7D3E76-9C62-4D0E-9645-8731700B1D70}.Debug|Win32.Build.0 = Debug|Win32
{3C7D3E76-9C62-4D0E-9645-8731700B1D70}.Release|Win32.ActiveCfg = Release|Win32
{3C7D3E76-9C62-4D0E-9645-8731700B1D70}.Release|Win32.Build.0 = Release|Win32
{873D625C-37E4-47C4-8120-2D9FC6A98765}.Debug|Win32.ActiveCfg = Debug|Win32
{873D625C-37E4-47C4-8120-2D9FC6A98765}.Debug|Win32.Build.0 = Debug|Win32
{873D625C-37E4-47C4-8120-2D9FC6A98765}.Release|Win32.ActiveCfg = Release|Win32
{873D625C-37E4-47C4-8120-2D9FC6A98765}.Release|Win32.Build.0 = Release|Win32
{CF068422-CD0A-484E-B4A9-A0CD108EBBB9}.Debug|Win32.ActiveCfg = Debug|Win32
{CF068422-CD0A-484E-B4A9-A0CD108EBBB9}.Debug|Win32.Build.0 = Debug|Win32
{CF068422-CD0A-484E-B4A9-A0CD108EBBB9}.Release|Win32.ActiveCfg = Release|Win32
{CF068422-CD0A-484E-B4A9-A0CD108EBBB9}.Release|Win32.Build.0 = Release|Win32
{67EB0D73-21A0-44C9-ADB2-109526E60429}.Debug|Win32.ActiveCfg = Debug|Win32
{67EB0D73-21A0-44C9-ADB2-109526E60429}.Debug|Win32.Build.0 = Debug|Win32
{67EB0D73-21A0-44C9-ADB2-109526E60429}.Release|Win32.ActiveCfg = Release|Win32
{67EB0D73-21A0-44C9-ADB2-109526E60429}.Release|Win32.Build.0 = Release|Win32
{56F6B346-D0EA-4149-88C4-B6D09E0E9BA6}.Debug|Win32.ActiveCfg = Debug|Win32
{56F6B346-D0EA-4149-88C4-B6D09E0E9BA6}.Debug|Win32.Build.0 = Debug|Win32
{56F6B346-D0EA-4149-88C4-B6D09E0E9BA6}.Release|Win32.ActiveCfg = Release|Win32
{56F6B346-D0EA-4149-88C4-B6D09E0E9BA6}.Release|Win32.Build.0 = Release|Win32
{7D2165DA-B528-4318-A03F-6E922547C09D}.Debug|Win32.ActiveCfg = Debug|Win32
{7D2165DA-B528-4318-A03F-6E922547C09D}.Debug|Win32.Build.0 = Debug|Win32
{7D2165DA-B528-4318-A03F-6E922547C09D}.Release|Win32.ActiveCfg = Release|Win32
{7D2165DA-B528-4318-A03F-6E922547C09D}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,78 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boost_system", "Projects\boost_system2005.vcproj", "{3503791E-20B7-41C9-97D9-BAE92596D648}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boost_filesystem", "Projects\boost_filesystem2005.vcproj", "{F6A9ED1C-3D23-4246-9366-41373B2E49C6}"
ProjectSection(ProjectDependencies) = postProject
{3503791E-20B7-41C9-97D9-BAE92596D648} = {3503791E-20B7-41C9-97D9-BAE92596D648}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "Projects\Common2005.vcproj", "{399893AA-3617-4CD8-A980-7F15CDAFA3D2}"
ProjectSection(ProjectDependencies) = postProject
{C1587C15-6268-4451-9263-937E63A945F6} = {C1587C15-6268-4451-9263-937E63A945F6}
{7B9F3647-32D3-4F82-8CA5-A43E490E1457} = {7B9F3647-32D3-4F82-8CA5-A43E490E1457}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XML", "Projects\XML2005.vcproj", "{C1587C15-6268-4451-9263-937E63A945F6}"
ProjectSection(ProjectDependencies) = postProject
{3503791E-20B7-41C9-97D9-BAE92596D648} = {3503791E-20B7-41C9-97D9-BAE92596D648}
{7B9F3647-32D3-4F82-8CA5-A43E490E1457} = {7B9F3647-32D3-4F82-8CA5-A43E490E1457}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "Projects\DocxFormat2005.vcproj", "{A100103A-353E-45E8-A9B8-90B87CC5C0B0}"
ProjectSection(ProjectDependencies) = postProject
{C1587C15-6268-4451-9263-937E63A945F6} = {C1587C15-6268-4451-9263-937E63A945F6}
{918D1327-C6ED-43E6-AE22-84A3736F0E87} = {918D1327-C6ED-43E6-AE22-84A3736F0E87}
{399893AA-3617-4CD8-A980-7F15CDAFA3D2} = {399893AA-3617-4CD8-A980-7F15CDAFA3D2}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utility", "Projects\Utility2005.vcproj", "{7B9F3647-32D3-4F82-8CA5-A43E490E1457}"
ProjectSection(ProjectDependencies) = postProject
{F6A9ED1C-3D23-4246-9366-41373B2E49C6} = {F6A9ED1C-3D23-4246-9366-41373B2E49C6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeSvmFile", "..\..\ASCImageStudio3\ASCGraphics\OfficeSvmFile\OfficeSvmFile2005.vcproj", "{918D1327-C6ED-43E6-AE22-84A3736F0E87}"
ProjectSection(ProjectDependencies) = postProject
{F6A9ED1C-3D23-4246-9366-41373B2E49C6} = {F6A9ED1C-3D23-4246-9366-41373B2E49C6}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3503791E-20B7-41C9-97D9-BAE92596D648}.Debug|Win32.ActiveCfg = Debug|Win32
{3503791E-20B7-41C9-97D9-BAE92596D648}.Debug|Win32.Build.0 = Debug|Win32
{3503791E-20B7-41C9-97D9-BAE92596D648}.Release|Win32.ActiveCfg = Release|Win32
{3503791E-20B7-41C9-97D9-BAE92596D648}.Release|Win32.Build.0 = Release|Win32
{F6A9ED1C-3D23-4246-9366-41373B2E49C6}.Debug|Win32.ActiveCfg = Debug|Win32
{F6A9ED1C-3D23-4246-9366-41373B2E49C6}.Debug|Win32.Build.0 = Debug|Win32
{F6A9ED1C-3D23-4246-9366-41373B2E49C6}.Release|Win32.ActiveCfg = Release|Win32
{F6A9ED1C-3D23-4246-9366-41373B2E49C6}.Release|Win32.Build.0 = Release|Win32
{399893AA-3617-4CD8-A980-7F15CDAFA3D2}.Debug|Win32.ActiveCfg = Debug|Win32
{399893AA-3617-4CD8-A980-7F15CDAFA3D2}.Debug|Win32.Build.0 = Debug|Win32
{399893AA-3617-4CD8-A980-7F15CDAFA3D2}.Release|Win32.ActiveCfg = Release|Win32
{399893AA-3617-4CD8-A980-7F15CDAFA3D2}.Release|Win32.Build.0 = Release|Win32
{C1587C15-6268-4451-9263-937E63A945F6}.Debug|Win32.ActiveCfg = Debug|Win32
{C1587C15-6268-4451-9263-937E63A945F6}.Debug|Win32.Build.0 = Debug|Win32
{C1587C15-6268-4451-9263-937E63A945F6}.Release|Win32.ActiveCfg = Release|Win32
{C1587C15-6268-4451-9263-937E63A945F6}.Release|Win32.Build.0 = Release|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|Win32.ActiveCfg = Debug|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Debug|Win32.Build.0 = Debug|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|Win32.ActiveCfg = Release|Win32
{A100103A-353E-45E8-A9B8-90B87CC5C0B0}.Release|Win32.Build.0 = Release|Win32
{7B9F3647-32D3-4F82-8CA5-A43E490E1457}.Debug|Win32.ActiveCfg = Debug|Win32
{7B9F3647-32D3-4F82-8CA5-A43E490E1457}.Debug|Win32.Build.0 = Debug|Win32
{7B9F3647-32D3-4F82-8CA5-A43E490E1457}.Release|Win32.ActiveCfg = Release|Win32
{7B9F3647-32D3-4F82-8CA5-A43E490E1457}.Release|Win32.Build.0 = Release|Win32
{918D1327-C6ED-43E6-AE22-84A3736F0E87}.Debug|Win32.ActiveCfg = Debug|Win32
{918D1327-C6ED-43E6-AE22-84A3736F0E87}.Debug|Win32.Build.0 = Debug|Win32
{918D1327-C6ED-43E6-AE22-84A3736F0E87}.Release|Win32.ActiveCfg = Release|Win32
{918D1327-C6ED-43E6-AE22-84A3736F0E87}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,334 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="Common"
ProjectGUID="{873D625C-37E4-47C4-8120-2D9FC6A98765}"
RootNamespace="Common"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\Lib\Debug"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="./../Source/Utility"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
ProgramDataBaseFileName="$(IntDir)\common.pdb"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories=""
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\Lib\Release"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="./../Source/Utility"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
ProgramDataBaseFileName="$(IntDir)\common.pdb"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories=""
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\Source\Common\AbstractConverter.h"
>
</File>
<File
RelativePath="..\Source\Common\Align.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Common\Align.h"
>
</File>
<File
RelativePath="..\Source\Common\Color.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Common\Color.h"
>
</File>
<File
RelativePath="..\Source\Common\Common.h"
>
</File>
<File
RelativePath="..\Source\Common\Index.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Common\Index.h"
>
</File>
<File
RelativePath="..\Source\Common\NumFormat.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Common\NumFormat.h"
>
</File>
<File
RelativePath="..\Source\Common\Point.h"
>
</File>
<File
RelativePath="..\Source\Common\Position.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Common\Position.h"
>
</File>
<File
RelativePath="..\Source\Common\Size.h"
>
</File>
<File
RelativePath="..\Source\Common\Wrap.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Common\Wrap.h"
>
</File>
<File
RelativePath="..\Source\Common\ZIndex.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Common\ZIndex.h"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,361 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="Common"
ProjectGUID="{399893AA-3617-4CD8-A980-7F15CDAFA3D2}"
RootNamespace="Common"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\Lib\Debug"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="./../Source/Utility"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="precompiled_common.h"
ProgramDataBaseFileName="$(IntDir)\common.pdb"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories=""
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\Lib\Release"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="./../Source/Utility"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="precompiled_common.h"
ProgramDataBaseFileName="$(IntDir)\common.pdb"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories=""
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\Source\Common\AbstractConverter.h"
>
</File>
<File
RelativePath="..\Source\Common\Align.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Common\Align.h"
>
</File>
<File
RelativePath="..\Source\Common\Color.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Common\Color.h"
>
</File>
<File
RelativePath="..\Source\Common\Common.h"
>
</File>
<File
RelativePath="..\Source\Common\Index.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Common\Index.h"
>
</File>
<File
RelativePath="..\Source\Common\NumFormat.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Common\NumFormat.h"
>
</File>
<File
RelativePath="..\Source\Common\Point.h"
>
</File>
<File
RelativePath="..\Source\Common\Position.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Common\Position.h"
>
</File>
<File
RelativePath="..\Source\Common\precompiled_common.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Common\precompiled_common.h"
>
</File>
<File
RelativePath="..\Source\Common\Size.h"
>
</File>
<File
RelativePath="..\Source\Common\Wrap.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Common\Wrap.h"
>
</File>
<File
RelativePath="..\Source\Common\ZIndex.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Common\ZIndex.h"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,596 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="Utility"
ProjectGUID="{56F6B346-D0EA-4149-88C4-B6D09E0E9BA6}"
RootNamespace="Utility"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\Lib\Debug"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\Lib\Release"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Exception"
>
<File
RelativePath="..\Source\Utility\Exception\log_invalid_argument.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_invalid_argument.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_not_find.cpp"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_not_find.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_not_implement.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_not_implement.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_not_init_nullable.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_not_init_nullable.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_range_error.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_range_error.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_runtime_error.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_runtime_error.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\not_implement.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\not_implement.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\not_init_nullable.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\not_init_nullable.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\UnitError.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\UnitError.h"
>
</File>
</Filter>
<File
RelativePath="..\Source\Utility\codecvt.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\codecvt.h"
>
</File>
<File
RelativePath="..\Source\Utility\DateTime.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\DateTime.h"
>
</File>
<File
RelativePath="..\Source\Utility\Encoding.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Encoding.h"
>
</File>
<File
RelativePath="..\Source\Utility\FileNameUtility.cpp"
>
</File>
<File
RelativePath="..\Source\Utility\FileNameUtility.h"
>
</File>
<File
RelativePath="..\Source\Utility\Getter.h"
>
</File>
<File
RelativePath="..\Source\Utility\IDictonary.h"
>
</File>
<File
RelativePath="..\Source\Utility\IEnumerable.h"
>
</File>
<File
RelativePath="..\Source\Utility\IItemable.h"
>
</File>
<File
RelativePath="..\Source\Utility\Log.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Log.h"
>
</File>
<File
RelativePath="..\Source\Utility\LogDetails.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\LogDetails.h"
>
</File>
<File
RelativePath="..\Source\Utility\nullable.h"
>
</File>
<File
RelativePath="..\Source\Utility\nullable_property.h"
>
</File>
<File
RelativePath="..\Source\Utility\Parse.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Parse.h"
>
</File>
<File
RelativePath="..\Source\Utility\property.h"
>
</File>
<File
RelativePath="..\Source\Utility\Setter.h"
>
</File>
<File
RelativePath="..\Source\Utility\ToString.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\ToString.h"
>
</File>
<File
RelativePath="..\Source\Utility\TxtFile.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\TxtFile.h"
>
</File>
<File
RelativePath="..\Source\Utility\Unit.h"
>
</File>
<File
RelativePath="..\Source\Utility\UniversalUnit.cpp"
>
</File>
<File
RelativePath="..\Source\Utility\UniversalUnit.h"
>
</File>
<File
RelativePath="..\Source\Utility\Utility.h"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,599 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="Utility"
ProjectGUID="{7B9F3647-32D3-4F82-8CA5-A43E490E1457}"
RootNamespace="Utility"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\Lib\Debug"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="precompiled_utility.h"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\Lib\Release"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="precompiled_utility.h"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Exception"
>
<File
RelativePath="..\Source\Utility\Exception\log_invalid_argument.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_invalid_argument.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_not_find.cpp"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_not_find.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_not_implement.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_not_implement.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_not_init_nullable.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_not_init_nullable.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_range_error.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_range_error.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_runtime_error.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\log_runtime_error.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\not_implement.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\not_implement.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\not_init_nullable.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\not_init_nullable.h"
>
</File>
<File
RelativePath="..\Source\Utility\Exception\UnitError.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Common\Exception\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Exception\UnitError.h"
>
</File>
</Filter>
<File
RelativePath="..\Source\Utility\ASCStlUtils.h"
>
</File>
<File
RelativePath="..\Source\Utility\CallTraits.h"
>
</File>
<File
RelativePath="..\Source\Utility\codecvt.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\codecvt.h"
>
</File>
<File
RelativePath="..\Source\Utility\DateTime.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\DateTime.h"
>
</File>
<File
RelativePath="..\Source\Utility\Encoding.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Encoding.h"
>
</File>
<File
RelativePath="..\Source\Utility\Getter.h"
>
</File>
<File
RelativePath="..\Source\Utility\IDictonary.h"
>
</File>
<File
RelativePath="..\Source\Utility\IEnumerable.h"
>
</File>
<File
RelativePath="..\Source\Utility\IItemable.h"
>
</File>
<File
RelativePath="..\Source\Utility\Log.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Log.h"
>
</File>
<File
RelativePath="..\Source\Utility\nullable.h"
>
</File>
<File
RelativePath="..\Source\Utility\nullable_property.h"
>
</File>
<File
RelativePath="..\Source\Utility\Parse.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\Parse.h"
>
</File>
<File
RelativePath="..\Source\Utility\precompiled_utility.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\precompiled_utility.h"
>
</File>
<File
RelativePath="..\Source\Utility\property.h"
>
</File>
<File
RelativePath="..\Source\Utility\Setter.h"
>
</File>
<File
RelativePath="..\Source\Utility\ToString.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\ToString.h"
>
</File>
<File
RelativePath="..\Source\Utility\TxtFile.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Utility\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Utility\TxtFile.h"
>
</File>
<File
RelativePath="..\Source\Utility\Unit.h"
>
</File>
<File
RelativePath="..\Source\Utility\UniversalUnit.cpp"
>
</File>
<File
RelativePath="..\Source\Utility\UniversalUnit.h"
>
</File>
<File
RelativePath="..\Source\Utility\Utility.h"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,232 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="boost_filesystem"
ProjectGUID="{3C7D3E76-9C62-4D0E-9645-8731700B1D70}"
RootNamespace="boost_filesystem"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\Lib\Debug"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
ProgramDataBaseFileName="$(IntDir)\boost_filesytem.pdb"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)\libboost_filesystem-vc90-mt-gd-1_38.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\Lib\Release"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
ProgramDataBaseFileName="$(IntDir)\boost_filesytem.pdb"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)\libboost_filesystem-vc90-mt-1_38.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\Source\boost_filesystem\operations.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\boost_filesystem\path.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\boost_filesystem\portability.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\boost_filesystem\utf8_codecvt_facet.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\boost_filesystem\utf8_codecvt_facet.hpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,231 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="boost_filesystem"
ProjectGUID="{F6A9ED1C-3D23-4246-9366-41373B2E49C6}"
RootNamespace="boost_filesystem"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\Lib\Debug"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
ProgramDataBaseFileName="$(IntDir)\boost_filesytem.pdb"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)\libboost_filesystem-vc80-mt-gd-1_38.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\Lib\Release"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
ProgramDataBaseFileName="$(IntDir)\boost_filesytem.pdb"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)\libboost_filesystem-vc80-mt-1_38.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\Source\boost_filesystem\operations.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\boost_filesystem\path.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\boost_filesystem\portability.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\boost_filesystem\utf8_codecvt_facet.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_Filesystem\"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\boost_filesystem\utf8_codecvt_facet.hpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,168 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="boost_system"
ProjectGUID="{7A3C0AE1-9FA1-4F56-99C0-139192364F57}"
RootNamespace="boost_system"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\Lib\Debug"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
ProgramDataBaseFileName="$(IntDir)\boost_system.pdb"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)\libboost_system-vc90-mt-gd-1_38.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\Lib\Release"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
ProgramDataBaseFileName="$(IntDir)\boost_system.pdb"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)\libboost_system-vc90-mt-1_38.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\Source\boost_system\error_code.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_System\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_System\"
/>
</FileConfiguration>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="boost_system"
ProjectGUID="{3503791E-20B7-41C9-97D9-BAE92596D648}"
RootNamespace="boost_system"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\Lib\Debug"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
ProgramDataBaseFileName="$(IntDir)\boost_system.pdb"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)\libboost_system-vc80-mt-gd-1_38.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\Lib\Release"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
ProgramDataBaseFileName="$(IntDir)\boost_system.pdb"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)\libboost_system-vc80-mt-1_38.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\Source\boost_system\error_code.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_System\"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\Boost_System\"
/>
</FileConfiguration>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

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 ABSTRACT_CONVERTER_INCLUDE_H_
#define ABSTRACT_CONVERTER_INCLUDE_H_
template<class Input, class Output>
class AbstractConverter
{
public:
AbstractConverter(const OOX::CPath& originPath)
{
m_origin.read(originPath);
}
public:
const bool isInputValid(const OOX::CPath& path) const
{
return m_input.isValid(path);
}
const bool isOriginValid(const OOX::CPath& path) const
{
return m_origin.isValid(path);
}
const bool isOutputValid(const OOX::CPath& path) const
{
return m_output.isValid(path);
}
void read(const OOX::CPath& path)
{
m_input.read(path);
}
void write(const OOX::CPath& path) const
{
m_output.write(path);
}
protected:
typedef AbstractConverter base;
protected:
Input m_input;
Output m_output;
Output m_origin;
};
#endif // ABSTRACT_CONVERTER_INCLUDE_H_

View File

@@ -0,0 +1,137 @@
/*
* (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_common.h"
#include "Align.h"
namespace Common
{
Align::Align()
: m_type(right)
{
}
const Align::Type Align::type() const
{
return m_type;
}
const Align Align::Right()
{
return Align(right);
}
const Align Align::Left()
{
return Align(left);
}
const Align Align::Center()
{
return Align(center);
}
const Align Align::Both()
{
return Align(both);
}
const bool Align::isRight() const
{
return m_type == right;
}
const bool Align::isLeft() const
{
return m_type == left;
}
const bool Align::isCenter() const
{
return m_type == center;
}
const bool Align::isBoth() const
{
return m_type == both;
}
void Align::setRight()
{
m_type = right;
}
void Align::setLeft()
{
m_type = left;
}
void Align::setCenter()
{
m_type = center;
}
void Align::setBoth()
{
m_type = both;
}
Align::Align(const Align::Type type)
: m_type(type)
{
}
void Align::fromBase(const Align& align)
{
m_type = align.m_type;
}
} // namespace Common

View File

@@ -0,0 +1,82 @@
/*
* (c) Copyright Ascensio System SIA 2010-2014
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef COMMON_ALIGN_INCLUDE_H_
#define COMMON_ALIGN_INCLUDE_H_
namespace Common
{
class Align
{
public:
Align();
enum Type
{
right,
left,
center,
both
};
public:
const Type type() const;
public:
static const Align Right();
static const Align Left();
static const Align Center();
static const Align Both();
public:
const bool isRight() const;
const bool isLeft() const;
const bool isCenter() const;
const bool isBoth() const;
public:
void setRight();
void setLeft();
void setCenter();
void setBoth();
protected:
Type m_type;
protected:
Align(const Type type);
void fromBase(const Align& align);
};
}
#endif // COMMON_ALIGN_INCLUDE_H_

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
*
*/
#include "precompiled_common.h"
#include "Color.h"
namespace Common
{
Color::Color()
: Red(0x00),
Green(0x00),
Blue(0x00)
{
}
Color::Color(const int red, const int green, const int blue)
: Red(red),
Green(green),
Blue(blue)
{
}
void Color::fromBase(const Color& color)
{
Red = color.Red;
Green = color.Green;
Blue = color.Blue;
}
} // namespace Common

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
*
*/
#pragma once
#ifndef COMMON_COLOR_INCLUDE_H_
#define COMMON_COLOR_INCLUDE_H_
#include "property.h"
namespace Common
{
class Color
{
public:
Color();
Color(const int red, const int green, const int blue);
public:
property<int, setter::between<int, 0, 255> > Red;
property<int, setter::between<int, 0, 255> > Green;
property<int, setter::between<int, 0, 255> > Blue;
protected:
void fromBase(const Color& color);
};
}
#endif // COMMON_COLOR_INCLUDE_H_

View File

@@ -0,0 +1,47 @@
/*
* (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 COMMON_COMMON_INCLUDE_H_
#define COMMON_COMMON_INCLUDE_H_
#include "Align.h"
#include "Color.h"
#include "Index.h"
#include "Point.h"
#include "Size.h"
#include "NumFormat.h"
#include "Position.h"
#include "Wrap.h"
#include "ZIndex.h"
#endif // COMMON_COMMON_INCLUDE_H_

View File

@@ -0,0 +1,119 @@
/*
* (c) Copyright Ascensio System SIA 2010-2014
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "precompiled_common.h"
#include "Index.h"
namespace Common
{
Index::Index()
: m_type(normal)
{
}
const Index::Type Index::type() const
{
return m_type;
}
const Index Index::Super()
{
return Index(super);
}
const Index Index::Normal()
{
return Index(normal);
}
const Index Index::Sub()
{
return Index(sub);
}
const bool Index::isSuper() const
{
return m_type == super;
}
const bool Index::isNormal() const
{
return m_type == normal;
}
const bool Index::isSub() const
{
return m_type == sub;
}
void Index::setSuper()
{
m_type = super;
}
void Index::setNormal()
{
m_type = normal;
}
void Index::setSub()
{
m_type = sub;
}
Index::Index(const Index::Type type)
: m_type(type)
{
}
void Index::fromBase(const Index& index)
{
m_type = index.m_type;
}
} // namespace Common

View File

@@ -0,0 +1,78 @@
/*
* (c) Copyright Ascensio System SIA 2010-2014
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef COMMON_INDEX_INCLUDE_H_
#define COMMON_INDEX_INCLUDE_H_
namespace Common
{
class Index
{
public:
Index();
enum Type
{
super,
normal,
sub
};
public:
const Type type() const;
public:
static const Index Super();
static const Index Normal();
static const Index Sub();
public:
const bool isSuper() const;
const bool isNormal() const;
const bool isSub() const;
public:
void setSuper();
void setNormal();
void setSub();
protected:
Type m_type;
protected:
Index(const Type type);
void fromBase(const Index& index);
};
}
#endif // COMMON_INDEX_INCLUDE_H_

View File

@@ -0,0 +1,178 @@
/*
* (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_common.h"
#include "NumFormat.h"
namespace Common
{
NumFormat::NumFormat() : m_type(decimal)
{
}
const NumFormat::Type NumFormat::type() const
{
return m_type;
}
const NumFormat NumFormat::UpperLetter()
{
return NumFormat(upperLetter);
}
const NumFormat NumFormat::LowerLetter()
{
return NumFormat(lowerLetter);
}
const NumFormat NumFormat::UpperRoman()
{
return NumFormat(upperRoman);
}
const NumFormat NumFormat::LowerRoman()
{
return NumFormat(lowerRoman);
}
const NumFormat NumFormat::Decimal()
{
return NumFormat(decimal);
}
const NumFormat NumFormat::Symbol()
{
return NumFormat(symbol);
}
const NumFormat NumFormat::Bullet()
{
return NumFormat(bullet);
}
const NumFormat NumFormat::Chicago()
{
return NumFormat(chicago);
}
const bool NumFormat::isUpperLetter() const
{
return m_type == upperLetter;
}
const bool NumFormat::isLowerLetter() const
{
return m_type == lowerLetter;
}
const bool NumFormat::isUpperRoman() const
{
return m_type == upperRoman;
}
const bool NumFormat::isLowerRoman() const
{
return m_type == lowerRoman;
}
const bool NumFormat::isDecimal() const
{
return m_type == decimal;
}
const bool NumFormat::isSymbol() const
{
return m_type == symbol;
}
const bool NumFormat::isBullet() const
{
return m_type == bullet;
}
const bool NumFormat::isChicago() const
{
return m_type == chicago;
}
void NumFormat::setUpperLetter()
{
m_type = upperLetter;
}
void NumFormat::setLowerLetter()
{
m_type = lowerLetter;
}
void NumFormat::setUpperRoman()
{
m_type = upperRoman;
}
void NumFormat::setLowerRoman()
{
m_type = lowerRoman;
}
void NumFormat::setDecimal()
{
m_type = decimal;
}
void NumFormat::setSymbol()
{
m_type = symbol;
}
void NumFormat::setBullet()
{
m_type = bullet;
}
void NumFormat::setChicago()
{
m_type = chicago;
}
NumFormat::NumFormat(const NumFormat::Type type) : m_type(type)
{
}
void NumFormat::fromBase(const NumFormat& numFormat)
{
m_type = numFormat.m_type;
}
} // namespace Common

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 COMMON_NUM_FORMAT_INCLUDE_H_
#define COMMON_NUM_FORMAT_INCLUDE_H_
namespace Common
{
class NumFormat
{
public:
NumFormat();
enum Type
{
upperLetter,
lowerLetter,
upperRoman,
lowerRoman,
decimal,
symbol,
bullet,
chicago
};
public:
const Type type() const;
public:
static const NumFormat UpperLetter();
static const NumFormat LowerLetter();
static const NumFormat UpperRoman();
static const NumFormat LowerRoman();
static const NumFormat Decimal();
static const NumFormat Symbol();
static const NumFormat Bullet();
static const NumFormat Chicago();
public:
const bool isUpperLetter() const;
const bool isLowerLetter() const;
const bool isUpperRoman() const;
const bool isLowerRoman() const;
const bool isDecimal() const;
const bool isSymbol() const;
const bool isBullet() const;
const bool isChicago() const;
public:
void setUpperLetter();
void setLowerLetter();
void setUpperRoman();
void setLowerRoman();
void setDecimal();
void setSymbol();
void setBullet();
void setChicago();
protected:
Type m_type;
protected:
NumFormat(const Type type);
void fromBase(const NumFormat& numFormat);
};
}
#endif // COMMON_NUM_FORMAT_INCLUDE_H_

View File

@@ -0,0 +1,102 @@
/*
* (c) Copyright Ascensio System SIA 2010-2014
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef COMMON_POINT_INCLUDE_H_
#define COMMON_POINT_INCLUDE_H_
#include "Unit.h"
#include "property.h"
#include "nullable_property.h"
#include "XML.h"
namespace Common
{
template<class Unit>
class Point
{
public:
Point() {};
template<typename XType, typename YType>
Point(const XType& x, const YType& y)
: X(x), Y(y)
{
}
template<typename OtherUnit>
Point(const OtherUnit& rhs)
: X(rhs.X), Y(rhs.Y)
{
}
template<typename OtherUnit>
const Point& operator =(const OtherUnit& rhs)
{
X = ths.X;
Y = ths.Y;
return *this;
}
public:
property<Unit> X;
property<Unit> Y;
};
}
namespace XML
{
template<class Unit>
const Common::Point<Unit> XElement2Point(const XML::XElement& element, const std::string& x, const std::string& y)
{
Common::Point<Unit> point;
point.X = element.attribute(x).value().ToString();
point.Y = element.attribute(y).value().ToString();
return point;
}
template<class Unit>
const nullable__<Common::Point<Unit> > XElement2NullablePoint(const XML::XElement& element, const std::string& x, const std::string& y)
{
nullable__<Common::Point<Unit> > point;
if (element.attribute(x).exist() || element.attribute(y).exist())
point.init();
if (element.attribute(x).exist())
point->X = element.attribute(x).value().ToString();
if (element.attribute(y).exist())
point->Y = element.attribute(y).value().ToString();
return point;
}
}
#endif // COMMON_POINT_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
*
*/
#include "precompiled_common.h"
#include "Position.h"
namespace Common
{
Position::Position()
: m_type(foreground)
{
}
const Position::Type Position::type() const
{
return m_type;
}
const Position Position::Background()
{
return Position(background);
}
const Position Position::Foreground()
{
return Position(foreground);
}
const bool Position::isBackground() const
{
return m_type == background;
}
const bool Position::isForeground() const
{
return m_type == foreground;
}
void Position::setBackground()
{
m_type = background;
}
void Position::setForeground()
{
m_type = foreground;
}
Position::Position(const Position::Type type)
: m_type(type)
{
}
void Position::fromBase(const Position& position)
{
m_type = position.m_type;
}
} // namespace Common

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
*
*/
#pragma once
#ifndef COMMON_POSITION_INCLUDE_H_
#define COMMON_POSITION_INCLUDE_H_
namespace Common
{
class Position
{
public:
Position();
enum Type
{
background,
foreground
};
public:
const Type type() const;
public:
static const Position Background();
static const Position Foreground();
public:
const bool isBackground() const;
const bool isForeground() const;
public:
void setBackground();
void setForeground();
protected:
Type m_type;
protected:
Position(const Type type);
void fromBase(const Position& position);
};
}
#endif // COMMON_POSITION_INCLUDE_H_

View File

@@ -0,0 +1,102 @@
/*
* (c) Copyright Ascensio System SIA 2010-2014
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef COMMON_SIZE_INCLUDE_H_
#define COMMON_SIZE_INCLUDE_H_
#include "Unit.h"
#include "property.h"
#include "nullable_property.h"
#include "XML.h"
namespace Common
{
template<class Unit>
class Size
{
public:
Size() {}
template<typename HeightType, typename WidthType>
Size(const HeightType& height, WidthType width)
: Height(height), Width(width)
{
}
template<typename OtherUnit>
Size(const OtherUnit& rhs)
: Height(rhs.Height), Width(rhs.Width)
{
}
template<typename OtherUnit>
const Size& operator =(const OtherUnit& rhs)
{
Height = ths.Height;
Width = ths.Width;
return *this;
}
public:
property<Unit> Height;
property<Unit> Width;
};
}
namespace XML
{
template<class Unit>
const Common::Size<Unit> XElement2Size(const XML::XElement& element, const std::string& height, const std::string& width)
{
Common::Size<Unit> size;
size.Height = element.attribute(height).value().ToString();
size.Width = element.attribute(width).value().ToString();
return size;
}
template<class Unit>
const nullable__<Common::Size<Unit> > XElement2NullableSize(const XML::XElement& element, const std::string& height, const std::string& width)
{
nullable__<Common::Size<Unit> > size;
if (element.attribute(height).exist() || element.attribute(width).exist())
size.init();
if (element.attribute(height).exist())
size->Height = element.attribute(height).value().ToString();
if (element.attribute(width).exist())
size->Width = element.attribute(width).value().ToString();
return size;
}
}
#endif // COMMON_SIZE_INCLUDE_H_

View File

@@ -0,0 +1,137 @@
/*
* (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_common.h"
#include "Wrap.h"
namespace Common
{
Wrap::Wrap()
: m_type(square)
{
}
const Wrap::Type Wrap::type() const
{
return m_type;
}
const Wrap Wrap::Square()
{
return Wrap(square);
}
const Wrap Wrap::Tight()
{
return Wrap(tight);
}
const Wrap Wrap::TopAndBottom()
{
return Wrap(topAndBottom);
}
const Wrap Wrap::None()
{
return Wrap(none);
}
const bool Wrap::isSquare() const
{
return m_type == square;
}
const bool Wrap::isTight() const
{
return m_type == tight;
}
const bool Wrap::isTopAndBottom() const
{
return m_type == topAndBottom;
}
const bool Wrap::isNone() const
{
return m_type == none;
}
void Wrap::setSquare()
{
m_type = square;
}
void Wrap::setTight()
{
m_type = tight;
}
void Wrap::setTopAndBottom()
{
m_type = topAndBottom;
}
void Wrap::setNone()
{
m_type = none;
}
Wrap::Wrap(const Wrap::Type type)
: m_type(type)
{
}
void Wrap::fromBase(const Wrap& wrap)
{
m_type = wrap.m_type;
}
} // namespace Common

View File

@@ -0,0 +1,82 @@
/*
* (c) Copyright Ascensio System SIA 2010-2014
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef COMMON_WRAP_INCLUDE_H_
#define COMMON_WRAP_INCLUDE_H_
namespace Common
{
class Wrap
{
public:
Wrap();
enum Type
{
square,
tight,
topAndBottom,
none
};
public:
const Type type() const;
public:
static const Wrap Square();
static const Wrap Tight();
static const Wrap TopAndBottom();
static const Wrap None();
public:
const bool isSquare() const;
const bool isTight() const;
const bool isTopAndBottom() const;
const bool isNone() const;
public:
void setSquare();
void setTight();
void setTopAndBottom();
void setNone();
protected:
Type m_type;
protected:
Wrap(const Type type);
void fromBase(const Wrap& wrap);
};
}
#endif // COMMON_WRAP_INCLUDE_H_

View File

@@ -0,0 +1,59 @@
/*
* (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_common.h"
#include "ZIndex.h"
namespace Common
{
ZIndex::ZIndex()
: Index(0)
{
}
ZIndex::ZIndex(const int& index)
: Index(index)
{
}
void ZIndex::fromBase(const ZIndex& zIndex)
{
Index = zIndex.Index;
}
} // namespace Common

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 COMMON_Z_INDEX_INCLUDE_H_
#define COMMON_Z_INDEX_INCLUDE_H_
#include "property.h"
namespace Common
{
class ZIndex
{
public:
ZIndex();
ZIndex(const int& index);
public:
property<int> Index;
protected:
void fromBase(const ZIndex& zIndex);
};
}
#endif // COMMON_Z_INDEX_INCLUDE_H_

View File

@@ -0,0 +1,35 @@
/*
* (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_common.h"

View File

@@ -0,0 +1,36 @@
/*
* (c) Copyright Ascensio System SIA 2010-2014
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "unit.h"
#include "property.h"
#include "nullable_property.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 "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

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