diff --git a/ASCOfficeOdtFile/ASCOfficeOdtFile2005.sln b/ASCOfficeOdtFile/ASCOfficeOdtFile2005.sln
index 6b5b3d735f..6ed57a99c5 100644
--- a/ASCOfficeOdtFile/ASCOfficeOdtFile2005.sln
+++ b/ASCOfficeOdtFile/ASCOfficeOdtFile2005.sln
@@ -31,26 +31,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdtFormat", "Projects\OdtFo
{399893AA-3617-4CD8-A980-7F15CDAFA3D2} = {399893AA-3617-4CD8-A980-7F15CDAFA3D2}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\Common\ASCDocxFormat\Projects\DocxFormat2005.vcproj", "{A100103A-353E-45E8-A9B8-90B87CC5C0B0}"
- ProjectSection(WebsiteProperties) = preProject
- Debug.AspNetCompiler.Debug = "True"
- Release.AspNetCompiler.Debug = "False"
- EndProjectSection
- ProjectSection(ProjectDependencies) = postProject
- {C1587C15-6268-4451-9263-937E63A945F6} = {C1587C15-6268-4451-9263-937E63A945F6}
- {7B9F3647-32D3-4F82-8CA5-A43E490E1457} = {7B9F3647-32D3-4F82-8CA5-A43E490E1457}
- {399893AA-3617-4CD8-A980-7F15CDAFA3D2} = {399893AA-3617-4CD8-A980-7F15CDAFA3D2}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XML", "..\Common\ASCDocxFormat\Projects\XML2005.vcproj", "{C1587C15-6268-4451-9263-937E63A945F6}"
- ProjectSection(WebsiteProperties) = preProject
- Debug.AspNetCompiler.Debug = "True"
- Release.AspNetCompiler.Debug = "False"
- EndProjectSection
- ProjectSection(ProjectDependencies) = postProject
- {7B9F3647-32D3-4F82-8CA5-A43E490E1457} = {7B9F3647-32D3-4F82-8CA5-A43E490E1457}
- EndProjectSection
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\Common\ASCDocxFormat\Projects\Common2005.vcproj", "{399893AA-3617-4CD8-A980-7F15CDAFA3D2}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
@@ -61,13 +41,25 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\Common\ASCDocx
{7B9F3647-32D3-4F82-8CA5-A43E490E1457} = {7B9F3647-32D3-4F82-8CA5-A43E490E1457}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utility", "..\Common\ASCDocxFormat\Projects\Utility2005.vcproj", "{7B9F3647-32D3-4F82-8CA5-A43E490E1457}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficeOdtFileTest", "ASCOfficeOdtFileTest\ASCOfficeOdfFileTest.vcproj", "{C2882DDD-07E6-4314-AD4B-48F43F38D722}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficeOdtFileTest", "ASCOfficeOdtFileTest\ASCOfficeOdfFileTest.vcproj", "{C2882DDD-07E6-4314-AD4B-48F43F38D722}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XML", "Projects\XML2005.vcproj", "{C1587C15-6268-4451-9263-937E63A945F6}"
+ ProjectSection(WebsiteProperties) = preProject
+ Debug.AspNetCompiler.Debug = "True"
+ Release.AspNetCompiler.Debug = "False"
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utility", "Projects\Utility2005.vcproj", "{7B9F3647-32D3-4F82-8CA5-A43E490E1457}"
+ ProjectSection(WebsiteProperties) = preProject
+ Debug.AspNetCompiler.Debug = "True"
+ Release.AspNetCompiler.Debug = "False"
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "Projects\DocxFormat2005.vcproj", "{A100103A-353E-45E8-A9B8-90B87CC5C0B0}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
@@ -98,36 +90,36 @@ Global
{4F34ADFD-D168-420C-A497-7EF74155EFBE}.Release|Win32.Build.0 = Release|Win32
{4F34ADFD-D168-420C-A497-7EF74155EFBE}.ReleaseASC|Win32.ActiveCfg = Release|Win32
{4F34ADFD-D168-420C-A497-7EF74155EFBE}.ReleaseASC|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
- {A100103A-353E-45E8-A9B8-90B87CC5C0B0}.ReleaseASC|Win32.ActiveCfg = Release|Win32
- {A100103A-353E-45E8-A9B8-90B87CC5C0B0}.ReleaseASC|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
- {C1587C15-6268-4451-9263-937E63A945F6}.ReleaseASC|Win32.ActiveCfg = Release|Win32
- {C1587C15-6268-4451-9263-937E63A945F6}.ReleaseASC|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
{399893AA-3617-4CD8-A980-7F15CDAFA3D2}.ReleaseASC|Win32.ActiveCfg = Release|Win32
{399893AA-3617-4CD8-A980-7F15CDAFA3D2}.ReleaseASC|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
- {7B9F3647-32D3-4F82-8CA5-A43E490E1457}.ReleaseASC|Win32.ActiveCfg = Release|Win32
- {7B9F3647-32D3-4F82-8CA5-A43E490E1457}.ReleaseASC|Win32.Build.0 = Release|Win32
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.Debug|Win32.ActiveCfg = Debug|Win32
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.Debug|Win32.Build.0 = Debug|Win32
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.Release|Win32.ActiveCfg = Release|Win32
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.Release|Win32.Build.0 = Release|Win32
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.ReleaseASC|Win32.ActiveCfg = Release|Win32
{C2882DDD-07E6-4314-AD4B-48F43F38D722}.ReleaseASC|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
+ {C1587C15-6268-4451-9263-937E63A945F6}.ReleaseASC|Win32.ActiveCfg = Release|Win32
+ {C1587C15-6268-4451-9263-937E63A945F6}.ReleaseASC|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
+ {7B9F3647-32D3-4F82-8CA5-A43E490E1457}.ReleaseASC|Win32.ActiveCfg = Release|Win32
+ {7B9F3647-32D3-4F82-8CA5-A43E490E1457}.ReleaseASC|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
+ {A100103A-353E-45E8-A9B8-90B87CC5C0B0}.ReleaseASC|Win32.ActiveCfg = Release|Win32
+ {A100103A-353E-45E8-A9B8-90B87CC5C0B0}.ReleaseASC|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/ASCOfficeOdtFile/Projects/Docx2Odt2005.vcproj b/ASCOfficeOdtFile/Projects/Docx2Odt2005.vcproj
index 06ec2aaf3c..62cb938691 100644
--- a/ASCOfficeOdtFile/Projects/Docx2Odt2005.vcproj
+++ b/ASCOfficeOdtFile/Projects/Docx2Odt2005.vcproj
@@ -40,7 +40,7 @@
Name="VCCLCompilerTool"
AdditionalOptions="-Zm2000"
Optimization="0"
- AdditionalIncludeDirectories=".\..\..\Common;.\..\..\Common\ASCDocxFormat\Source\Utility;.\..\..\Common\ASCDocxFormat\Source\XML;.\..\..\Common\ASCDocxFormat\Source\Common;.\..\..\Common\ASCDocxFormat\Source\DocxFormat;.\..\Source\OdtFormat;.\..\..\Common\ASCDocxFormat\Source\;.\..\Source\"
+ AdditionalIncludeDirectories=".\..\..\Common;.\..\Source\Utility;.\..\Source\XML;.\..\Source\Common;.\..\Source\DocxFormat;.\..\Source\OdtFormat;.\..\Source\"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -105,7 +105,7 @@
AdditionalOptions="-Zm512"
Optimization="2"
EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories=".\..\..\Common;.\..\..\Common\ASCDocxFormat\Source\Utility;.\..\..\Common\ASCDocxFormat\Source\XML;.\..\..\Common\ASCDocxFormat\Source\Common;.\..\..\Common\ASCDocxFormat\Source\DocxFormat;.\..\Source\OdtFormat;.\..\..\Common\ASCDocxFormat\Source\;.\..\Source\"
+ AdditionalIncludeDirectories=".\..\..\Common;.\..\Source\Utility;.\..\Source\XML;.\..\Source\Common;.\..\Source\DocxFormat;.\..\Source\OdtFormat;.\..\Source\"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
diff --git a/ASCOfficeOdtFile/Projects/DocxFormat2005.vcproj b/ASCOfficeOdtFile/Projects/DocxFormat2005.vcproj
new file mode 100644
index 0000000000..f5473e7afb
--- /dev/null
+++ b/ASCOfficeOdtFile/Projects/DocxFormat2005.vcproj
@@ -0,0 +1,5645 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ASCOfficeOdtFile/Source/Common/AbstractConverter.h b/ASCOfficeOdtFile/Source/Common/AbstractConverter.h
new file mode 100644
index 0000000000..e741ea04ec
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/AbstractConverter.h
@@ -0,0 +1,53 @@
+#pragma once
+#ifndef ABSTRACT_CONVERTER_INCLUDE_H_
+#define ABSTRACT_CONVERTER_INCLUDE_H_
+
+#include
+#include
+
+
+template
+class AbstractConverter : private boost::noncopyable
+{
+public:
+ AbstractConverter(const boost::filesystem::wpath& originPath)
+ {
+ m_origin.read(originPath);
+ }
+
+public:
+ const bool isInputValid(const boost::filesystem::wpath& path) const
+ {
+ return m_input.isValid(path);
+ }
+
+ const bool isOriginValid(const boost::filesystem::wpath& path) const
+ {
+ return m_origin.isValid(path);
+ }
+
+ const bool isOutputValid(const boost::filesystem::wpath& path) const
+ {
+ return m_output.isValid(path);
+ }
+
+ void read(const boost::filesystem::wpath& path)
+ {
+ m_input.read(path);
+ }
+
+ void write(const boost::filesystem::wpath& 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_
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/Align.cpp b/ASCOfficeOdtFile/Source/Common/Align.cpp
new file mode 100644
index 0000000000..4cd90cf3cc
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/Align.cpp
@@ -0,0 +1,107 @@
+
+// auto inserted precompiled begin
+#include "precompiled_common.h"
+// auto inserted precompiled end
+
+#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
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/Align.h b/ASCOfficeOdtFile/Source/Common/Align.h
new file mode 100644
index 0000000000..871a53b3f5
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/Align.h
@@ -0,0 +1,51 @@
+#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);
+ };
+} // namespace Common
+
+#endif // COMMON_ALIGN_INCLUDE_H_
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/Color.cpp b/ASCOfficeOdtFile/Source/Common/Color.cpp
new file mode 100644
index 0000000000..823071a96c
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/Color.cpp
@@ -0,0 +1,35 @@
+
+// auto inserted precompiled begin
+#include "precompiled_common.h"
+// auto inserted precompiled end
+
+#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
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/Color.h b/ASCOfficeOdtFile/Source/Common/Color.h
new file mode 100644
index 0000000000..fb2e846c0a
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/Color.h
@@ -0,0 +1,26 @@
+#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 > Red;
+ property > Green;
+ property > Blue;
+
+ protected:
+ void fromBase(const Color& color);
+ };
+} // namespace Common
+
+#endif // COMMON_COLOR_INCLUDE_H_
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/Common.h b/ASCOfficeOdtFile/Source/Common/Common.h
new file mode 100644
index 0000000000..bd8c961638
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/Common.h
@@ -0,0 +1,16 @@
+#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_
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/Index.cpp b/ASCOfficeOdtFile/Source/Common/Index.cpp
new file mode 100644
index 0000000000..231aa8dbc1
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/Index.cpp
@@ -0,0 +1,89 @@
+
+// auto inserted precompiled begin
+#include "precompiled_common.h"
+// auto inserted precompiled end
+
+#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
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/Index.h b/ASCOfficeOdtFile/Source/Common/Index.h
new file mode 100644
index 0000000000..e913d9e3af
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/Index.h
@@ -0,0 +1,47 @@
+#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);
+ };
+} // namespace Common
+
+#endif // COMMON_INDEX_INCLUDE_H_
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/NumFormat.cpp b/ASCOfficeOdtFile/Source/Common/NumFormat.cpp
new file mode 100644
index 0000000000..758e194a3a
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/NumFormat.cpp
@@ -0,0 +1,179 @@
+
+// auto inserted precompiled begin
+#include "precompiled_common.h"
+// auto inserted precompiled end
+
+#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
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/NumFormat.h b/ASCOfficeOdtFile/Source/Common/NumFormat.h
new file mode 100644
index 0000000000..db438f8e25
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/NumFormat.h
@@ -0,0 +1,68 @@
+#pragma once
+#ifndef COMMON_NUM_FORMAT_INCLUDE_H_
+#define COMMON_NUM_FORMAT_INCLUDE_H_
+
+
+namespace Common
+{
+ class NumFormat
+ {
+ public:
+ NumFormat();
+
+ //TODO: Add other types
+ 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);
+ };
+} // namespace Common
+
+#endif // COMMON_NUM_FORMAT_INCLUDE_H_
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/Point.h b/ASCOfficeOdtFile/Source/Common/Point.h
new file mode 100644
index 0000000000..285bc50168
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/Point.h
@@ -0,0 +1,71 @@
+#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 Point
+ {
+ public:
+ Point() {};
+
+ template
+ Point(const XType& x, const YType& y)
+ : X(x), Y(y)
+ {
+ }
+
+ template
+ Point(const OtherUnit& rhs)
+ : X(rhs.X), Y(rhs.Y)
+ {
+ }
+
+ template
+ const Point& operator =(const OtherUnit& rhs)
+ {
+ X = ths.X;
+ Y = ths.Y;
+ return *this;
+ }
+
+ public:
+ property X;
+ property Y;
+ };
+} // namespace Common
+
+
+namespace XML
+{
+ template
+ const Common::Point XElement2Point(const XML::XElement& element, const std::string& x, const std::string& y)
+ {
+ Common::Point point;
+ point.X = element.attribute(x).value().ToString();
+ point.Y = element.attribute(y).value().ToString();
+ return point;
+ }
+
+ template
+ const nullable > XElement2NullablePoint(const XML::XElement& element, const std::string& x, const std::string& y)
+ {
+ nullable > 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;
+ }
+} // namespace XML
+
+#endif // COMMON_POINT_INCLUDE_H_
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/Position.cpp b/ASCOfficeOdtFile/Source/Common/Position.cpp
new file mode 100644
index 0000000000..b0b337b16c
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/Position.cpp
@@ -0,0 +1,71 @@
+
+// auto inserted precompiled begin
+#include "precompiled_common.h"
+// auto inserted precompiled end
+
+#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
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/Position.h b/ASCOfficeOdtFile/Source/Common/Position.h
new file mode 100644
index 0000000000..9f6fa30351
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/Position.h
@@ -0,0 +1,43 @@
+#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);
+ };
+} // namespace Common
+
+#endif // COMMON_POSITION_INCLUDE_H_
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/Size.h b/ASCOfficeOdtFile/Source/Common/Size.h
new file mode 100644
index 0000000000..db2e6cc170
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/Size.h
@@ -0,0 +1,71 @@
+#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 Size
+ {
+ public:
+ Size() {}
+
+ template
+ Size(const HeightType& height, WidthType width)
+ : Height(height), Width(width)
+ {
+ }
+
+ template
+ Size(const OtherUnit& rhs)
+ : Height(rhs.Height), Width(rhs.Width)
+ {
+ }
+
+ template
+ const Size& operator =(const OtherUnit& rhs)
+ {
+ Height = ths.Height;
+ Width = ths.Width;
+ return *this;
+ }
+
+ public:
+ property Height;
+ property Width;
+ };
+} // namespace Common
+
+
+namespace XML
+{
+ template
+ const Common::Size XElement2Size(const XML::XElement& element, const std::string& height, const std::string& width)
+ {
+ Common::Size size;
+ size.Height = element.attribute(height).value().ToString();
+ size.Width = element.attribute(width).value().ToString();
+ return size;
+ }
+
+ template
+ const nullable > XElement2NullableSize(const XML::XElement& element, const std::string& height, const std::string& width)
+ {
+ nullable > 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;
+ }
+} // namespace XML
+
+#endif // COMMON_SIZE_INCLUDE_H_
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/Wrap.cpp b/ASCOfficeOdtFile/Source/Common/Wrap.cpp
new file mode 100644
index 0000000000..a89505e546
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/Wrap.cpp
@@ -0,0 +1,107 @@
+
+// auto inserted precompiled begin
+#include "precompiled_common.h"
+// auto inserted precompiled end
+
+#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
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/Wrap.h b/ASCOfficeOdtFile/Source/Common/Wrap.h
new file mode 100644
index 0000000000..b7b4483d4b
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/Wrap.h
@@ -0,0 +1,51 @@
+#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);
+ };
+} // namespace Common
+
+#endif // COMMON_WRAP_INCLUDE_H_
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/ZIndex.cpp b/ASCOfficeOdtFile/Source/Common/ZIndex.cpp
new file mode 100644
index 0000000000..9e1c5d3882
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/ZIndex.cpp
@@ -0,0 +1,29 @@
+
+// auto inserted precompiled begin
+#include "precompiled_common.h"
+// auto inserted precompiled end
+
+#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
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/ZIndex.h b/ASCOfficeOdtFile/Source/Common/ZIndex.h
new file mode 100644
index 0000000000..6048e12efe
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/ZIndex.h
@@ -0,0 +1,24 @@
+#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 Index;
+
+ protected:
+ void fromBase(const ZIndex& zIndex);
+ };
+} // namespace Common
+
+#endif // COMMON_Z_INDEX_INCLUDE_H_
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/Common/precompiled_common.cpp b/ASCOfficeOdtFile/Source/Common/precompiled_common.cpp
new file mode 100644
index 0000000000..f2f02a3088
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/precompiled_common.cpp
@@ -0,0 +1,5 @@
+
+// auto inserted precompiled begin
+#include "precompiled_common.h"
+// auto inserted precompiled end
+
diff --git a/ASCOfficeOdtFile/Source/Common/precompiled_common.h b/ASCOfficeOdtFile/Source/Common/precompiled_common.h
new file mode 100644
index 0000000000..dc99046065
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/Common/precompiled_common.h
@@ -0,0 +1,8 @@
+#pragma once
+
+#include
+#include
+
+#include "unit.h"
+#include "property.h"
+#include "nullable_property.h"
diff --git a/ASCOfficeOdtFile/Source/DocxFormat/App.cpp b/ASCOfficeOdtFile/Source/DocxFormat/App.cpp
new file mode 100644
index 0000000000..b64a5e1c16
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/DocxFormat/App.cpp
@@ -0,0 +1,112 @@
+
+// auto inserted precompiled begin
+#include "precompiled_docxformat.h"
+// auto inserted precompiled end
+
+#include "App.h"
+#include "FileTypes.h"
+
+
+namespace OOX
+{
+
+ App::App()
+ {
+ }
+
+
+ App::App(const boost::filesystem::wpath& filename)
+ {
+ read(filename);
+ }
+
+
+ App::~App()
+ {
+ }
+
+
+ void App::read(const boost::filesystem::wpath& filename)
+ {
+ const XML::XDocument document(filename);
+
+ m_template = document.Root.element("Template").text();
+ m_totalTime = document.Root.element("TotalTime").text();
+ Pages = document.Root.element("Pages").text();
+ Words = document.Root.element("Words").text();
+ Characters = document.Root.element("Characters").text();
+ m_appllication= document.Root.element("Application").text();
+ m_docSecurity = document.Root.element("DocSecurity").text();
+ m_lines = document.Root.element("Lines").text();
+ Paragraphs = document.Root.element("Paragraphs").text();
+ m_scaleCrop = document.Root.element("ScaleCrop").text();
+ m_company = document.Root.element("Company").text();
+ m_linksUpToDate = document.Root.element("LinksUpToDate").text();
+ CharactersWithSpaces = document.Root.element("CharactersWithSpaces").text();
+ m_shareDoc = document.Root.element("SharedDoc").text();
+ m_hyperLinksChanged = document.Root.element("HyperlinksChanged").text();
+ m_appVersion = document.Root.element("AppVersion").text();
+ }
+
+
+ void App::write(const boost::filesystem::wpath& filename, const boost::filesystem::wpath& directory, ContentTypes::File& content) const
+ {
+ XML::XElement element = XML::XElement("Properties",
+ XML::XNamespace("xmlns", "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"));
+ if (m_template.is_init())
+ element.Add(XML::XElement("Template", XML::XText(m_template)));
+ if (m_totalTime.is_init())
+ element.Add(XML::XElement("TotalTime", XML::XText(m_totalTime)));
+ if (Pages.is_init())
+ element.Add(XML::XElement("Pages", XML::XText(Pages)));
+ if (Words.is_init())
+ element.Add(XML::XElement("Words", XML::XText(Words)));
+ if (Characters.is_init())
+ element.Add(XML::XElement("Characters", XML::XText(Characters)));
+ if (m_appllication.is_init())
+ element.Add(XML::XElement("Application", XML::XText(m_appllication)));
+ if (m_docSecurity.is_init())
+ element.Add(XML::XElement("DocSecurity", XML::XText(m_docSecurity)));
+ if (m_template.is_init())
+ element.Add(XML::XElement("Lines", XML::XText(m_lines)));
+ if (Paragraphs.is_init())
+ element.Add(XML::XElement("Paragraphs", XML::XText(Paragraphs)));
+ if (m_scaleCrop.is_init())
+ element.Add(XML::XElement("ScaleCrop", XML::XText(m_scaleCrop)));
+ if (m_company.is_init())
+ element.Add(XML::XElement("Company", XML::XText(m_company)));
+ if (m_linksUpToDate.is_init())
+ element.Add(XML::XElement("LinksUpToDate", XML::XText(m_linksUpToDate)));
+ if (CharactersWithSpaces.is_init())
+ element.Add(XML::XElement("CharactersWithSpaces", XML::XText(CharactersWithSpaces)));
+ if (m_shareDoc.is_init())
+ element.Add(XML::XElement("SharedDoc", XML::XText(m_shareDoc)));
+ if (m_hyperLinksChanged.is_init())
+ element.Add(XML::XElement("HyperlinksChanged", XML::XText(m_hyperLinksChanged)));
+ if (m_appVersion.is_init())
+ element.Add(XML::XElement("AppVersion", XML::XText(m_appVersion)));
+ element.Save(filename);
+
+
+ content.registration(type().OverrideType(), directory, filename);
+ }
+
+
+ const FileType App::type() const
+ {
+ return FileTypes::App;
+ }
+
+
+ const boost::filesystem::wpath App::DefaultDirectory() const
+ {
+ return type().DefaultDirectory();
+ }
+
+
+ const boost::filesystem::wpath App::DefaultFileName() const
+ {
+ return type().DefaultFileName();
+ }
+
+} // namespace OOX
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/DocxFormat/App.h b/ASCOfficeOdtFile/Source/DocxFormat/App.h
new file mode 100644
index 0000000000..2230cfdf63
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/DocxFormat/App.h
@@ -0,0 +1,51 @@
+#pragma once
+#ifndef OOX_APP_INCLUDE_H_
+#define OOX_APP_INCLUDE_H_
+
+#include "File.h"
+#include "property.h"
+#include "nullable.h"
+
+
+namespace OOX
+{
+ class App : public OOX::File
+ {
+ public:
+ App();
+ App(const boost::filesystem::wpath& filename);
+ virtual ~App();
+
+ public:
+ virtual void read(const boost::filesystem::wpath& filename);
+ virtual void write(const boost::filesystem::wpath& filename, const boost::filesystem::wpath& directory, ContentTypes::File& content) const;
+
+ public:
+ virtual const FileType type() const;
+ virtual const boost::filesystem::wpath DefaultDirectory() const;
+ virtual const boost::filesystem::wpath DefaultFileName() const;
+
+ public:
+ nullable_property > Pages;
+ nullable_property > Words;
+ nullable_property > Paragraphs;
+ nullable_property > Characters;
+ nullable_property > CharactersWithSpaces;
+
+ private:
+ nullable m_template;
+ nullable m_totalTime;
+ nullable m_appllication;
+ nullable m_docSecurity;
+ nullable m_lines;
+ nullable m_paragraphs;
+ nullable m_scaleCrop;
+ nullable m_company;
+ nullable m_linksUpToDate;
+ nullable m_shareDoc;
+ nullable m_hyperLinksChanged;
+ nullable m_appVersion;
+ };
+} // namespace OOX
+
+#endif // OOX_APP_INCLUDE_H_
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/Default.cpp b/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/Default.cpp
new file mode 100644
index 0000000000..18ff6ec4d8
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/Default.cpp
@@ -0,0 +1,69 @@
+
+// auto inserted precompiled begin
+#include "precompiled_docxformat.h"
+// auto inserted precompiled end
+
+#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 ContentTypes
+} // namespace OOX
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/Default.h b/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/Default.h
new file mode 100644
index 0000000000..554d2f0f15
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/Default.h
@@ -0,0 +1,35 @@
+#pragma once
+#ifndef OOX_CONTENT_TYPES_DEFAULT_INCLUDE_H_
+#define OOX_CONTENT_TYPES_DEFAULT_INCLUDE_H_
+
+#include "./../WritingElement.h"
+#include
+
+
+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;
+ };
+ } // namespace ContentTypes
+} // namespace OOX
+
+#endif // OOX_CONTENT_TYPES_DEFAULT_INCLUDE_H_
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/DefaultTable.cpp b/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/DefaultTable.cpp
new file mode 100644
index 0000000000..615b0c7084
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/DefaultTable.cpp
@@ -0,0 +1,55 @@
+
+// auto inserted precompiled begin
+#include "precompiled_docxformat.h"
+// auto inserted precompiled end
+
+#include "DefaultTable.h"
+#include
+
+
+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 boost::filesystem::wpath& path)
+ {
+ const std::wstring extension = path.extension().substr(1);
+ if (std::find(begin(), end(), extension) == end())
+ m_items.push_back(extension);
+ }
+
+ } // namespace ContentTypes
+} // namespace OOX
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/DefaultTable.h b/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/DefaultTable.h
new file mode 100644
index 0000000000..41ec3783e0
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/DefaultTable.h
@@ -0,0 +1,31 @@
+#pragma once
+#ifndef OOX_CONTENT_TYPES_DEFAULT_TABLE_INCLUDE_H_
+#define OOX_CONTENT_TYPES_DEFAULT_TABLE_INCLUDE_H_
+
+#include "./../WritingVector.h"
+#include "Default.h"
+#include
+
+
+namespace OOX
+{
+ namespace ContentTypes
+ {
+ class DefaultTable : public WritingVector
+ {
+ 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 boost::filesystem::wpath& path);
+ };
+ } // namespace ContentTypes
+} // namespace OOX
+
+#endif // OOX_CONTENT)TYPES_DEFAULT_TABLE_INCLUDE_H_
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/ExtensionTable.cpp b/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/ExtensionTable.cpp
new file mode 100644
index 0000000000..a865bd879c
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/ExtensionTable.cpp
@@ -0,0 +1,59 @@
+
+// auto inserted precompiled begin
+#include "precompiled_docxformat.h"
+// auto inserted precompiled end
+
+#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::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 ContentTypes
+} // namespace OOX
\ No newline at end of file
diff --git a/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/ExtensionTable.h b/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/ExtensionTable.h
new file mode 100644
index 0000000000..f6e5c9ebc8
--- /dev/null
+++ b/ASCOfficeOdtFile/Source/DocxFormat/ContentTypes/ExtensionTable.h
@@ -0,0 +1,26 @@
+#pragma once
+#ifndef OOX_CONTENT_TYPES_EXTENSION_TABLE_INCLUDE_H_
+#define OOX_CONTENT_TYPES_EXTENSION_TABLE_INCLUDE_H_
+
+#include
+#include
+#include