Commit 6138139c authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

исправлен проект - подключен "старый" DocxFormat (тот который с AVS - без вытирания буста)

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53593 954022d7-b5bf-4e40-9824-e11837661b57
parent 4f5f69f8
......@@ -31,7 +31,7 @@ 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}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\Common\ASCDocxFormat\Projects\Common2005.vcproj", "{399893AA-3617-4CD8-A980-7F15CDAFA3D2}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
......@@ -39,35 +39,27 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\Common\ASC
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}"
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
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}"
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
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}") = "Utility", "..\Common\ASCDocxFormat\Projects\Utility2005.vcproj", "{7B9F3647-32D3-4F82-8CA5-A43E490E1457}"
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}") = "ASCOfficeOdtFileTest", "ASCOfficeOdtFileTest\ASCOfficeOdfFileTest.vcproj", "{C2882DDD-07E6-4314-AD4B-48F43F38D722}"
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
......
......@@ -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"
......
This diff is collapsed.
......@@ -39,7 +39,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".\..\..\Common\ASCDocxFormat\Source\Utility;.\..\..\Common\ASCDocxFormat\Source\XML;.\..\..\Common\ASCDocxFormat\Source\Common;./../../ASCOfficeODFFile/include/cpdoccore/common"
AdditionalIncludeDirectories=".\..\..\Common;.\..\Source\Utility;.\..\Source\XML;.\..\Source\Common;.\..\"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
......@@ -104,7 +104,7 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories=".\..\..\Common;.\..\..\Common\ASCDocxFormat\Source\Utility;.\..\..\Common\ASCDocxFormat\Source\XML;.\..\..\Common\ASCDocxFormat\Source\Common"
AdditionalIncludeDirectories=".\..\..\Common;.\..\Source\Utility;.\..\Source\XML;.\..\Source\Common;.\..\"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
......
This diff is collapsed.
This diff is collapsed.
#pragma once
#ifndef ABSTRACT_CONVERTER_INCLUDE_H_
#define ABSTRACT_CONVERTER_INCLUDE_H_
#include <boost/utility.hpp>
#include <boost/filesystem.hpp>
template<class Input, class Output>
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
// 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
#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
// 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
#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);
};
} // namespace Common
#endif // COMMON_COLOR_INCLUDE_H_
\ No newline at end of file
#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
// 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
#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
// 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
#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
#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 Common
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;
}
} // namespace XML
#endif // COMMON_POINT_INCLUDE_H_
\ No newline at end of file
// 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
#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
#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 Common
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;
}
} // namespace XML
#endif // COMMON_SIZE_INCLUDE_H_
\ No newline at end of file
// 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
#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
// 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
#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);
};
} // namespace Common
#endif // COMMON_Z_INDEX_INCLUDE_H_
\ No newline at end of file
// auto inserted precompiled begin
#include "precompiled_common.h"
// auto inserted precompiled end
#pragma once
#include <boost/utility.hpp>
#include <boost/filesystem.hpp>
#include "unit.h"
#include "property.h"
#include "nullable_property.h"
// 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
#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<int, setter::only_positive<int> > Pages;
nullable_property<int, setter::only_positive<int> > Words;
nullable_property<int, setter::only_positive<int> > Paragraphs;
nullable_property<int, setter::only_positive<int> > Characters;
nullable_property<int, setter::only_positive<int> > CharactersWithSpaces;
private:
nullable<std::string> m_template;
nullable<int> m_totalTime;
nullable<std::string> m_appllication;
nullable<int> m_docSecurity;
nullable<int> m_lines;
nullable<int> m_paragraphs;
nullable<bool> m_scaleCrop;
nullable<std::string> m_company;
nullable<bool> m_linksUpToDate;
nullable<bool> m_shareDoc;
nullable<bool> m_hyperLinksChanged;
nullable<std::string> m_appVersion;
};
} // namespace OOX
#endif // OOX_APP_INCLUDE_H_
\ No newline at end of file
// 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
#pragma once
#ifndef OOX_CONTENT_TYPES_DEFAULT_INCLUDE_H_
#define OOX_CONTENT_TYPES_DEFAULT_INCLUDE_H_
#include "./../WritingElement.h"
#include <string>
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
// auto inserted precompiled begin
#include "precompiled_docxformat.h"
// auto inserted precompiled end
#include "DefaultTable.h"
#include <boost/foreach.hpp>
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
#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 <boost/filesystem.hpp>
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 boost::filesystem::wpath& path);
};
} // namespace ContentTypes
} // namespace OOX
#endif // OOX_CONTENT)TYPES_DEFAULT_TABLE_INCLUDE_H_
\ No newline at end of file
// 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<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 ContentTypes
} // namespace OOX
\ No newline at end of file
#pragma once
#ifndef OOX_CONTENT_TYPES_EXTENSION_TABLE_INCLUDE_H_
#define OOX_CONTENT_TYPES_EXTENSION_TABLE_INCLUDE_H_
#include <boost/utility.hpp>
#include <string>
#include <map>
namespace OOX
{
namespace ContentTypes
{
class ExtensionTable : private boost::noncopyable
{
public:
ExtensionTable();
const std::string& operator[] (const std::wstring& extention) const;
private:
std::map<std::wstring, std::string> m_table;
};
} // namespace ContentTypes
} // namespace OOX
#endif // OOX_CONTENT_TYPES_EXTENSION_TABLE_INCLUDE_H_
\ No newline at end of file
// auto inserted precompiled begin
#include "precompiled_docxformat.h"
// auto inserted precompiled end
#include "File.h"
#include "./../FileTypes.h"
namespace OOX
{
namespace ContentTypes
{
static const boost::filesystem::wpath s_filename = L"[Content_Types].xml";
File::File()
{
}
File::File(const boost::filesystem::wpath& path)
{
read(path);
}
File::~File()
{
}
void File::read(const boost::filesystem::wpath& path)
{
const XML::XDocument document(path / s_filename);
Default = document.Root;
Override = document.Root;
}
void File::write(const boost::filesystem::wpath& path) const
{
XML::XElement("Types",
XML::XNamespace("xmlns", "http://schemas.openxmlformats.org/package/2006/content-types") +
XML::Write(Default) +
XML::Write(Override)
).Save(path / s_filename);
}
const bool File::isValid() const
{
return true;
}
void File::registration(const std::string& type, const boost::filesystem::wpath& directory, const boost::filesystem::wpath& filename)
{
Override->add(type, directory / filename.filename());
Default->add(directory / filename.filename());
}
} // namespace ContentTypes
} // namespace OOX
\ No newline at end of file
#pragma once
#ifndef OOX_CONTENT_TYPES_FILE_INCLUDE_H_
#define OOX_CONTENT_TYPES_FILE_INCLUDE_H_
#include "property.h"
#include <vector>
#include "OverrideTable.h"
#include "DefaultTable.h"
#include "./../FileType.h"
namespace OOX
{
namespace ContentTypes
{
class File
{
public:
File();
File(const boost::filesystem::wpath& path);
virtual ~File();
public:
virtual void read(const boost::filesystem::wpath& path);
virtual void write(const boost::filesystem::wpath& path) const;
virtual const bool isValid() const;
public:
void registration(const std::string& type, const boost::filesystem::wpath& directory, const boost::filesystem::wpath& filename);
public:
property<OverrideTable> Override;
property<DefaultTable> Default;
};
} // namespace ContentTypes
} // namespace OOX
#endif // DOCX_CONTENT_TYPES_FILE_INCLUDE_H_
\ No newline at end of file
// auto inserted precompiled begin
#include "precompiled_docxformat.h"
// auto inserted precompiled end
#include "Override.h"
namespace OOX
{
namespace ContentTypes
{
Override::Override(const std::string& type, const boost::filesystem::wpath& 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 = element.attribute("PartName").value();
m_type = element.attribute("ContentType").value();
}
const XML::XNode Override::toXML() const
{
return
XML::XElement("Override",
XML::XAttribute("PartName", L"/" + m_part.string()) +
XML::XAttribute("ContentType", m_type)
);
}
const std::string Override::type() const
{
return m_type;
}
const boost::filesystem::wpath Override::filename() const
{
return m_part;
}
} // namespace ContentTypes
} // namespace OOX
\ No newline at end of file
#pragma once
#ifndef OOX_CONTENT_TYPES_OVERRIDE_INCLUDE_H_
#define OOX_CONTENT_TYPES_OVERRIDE_INCLUDE_H_
#include "./../WritingElement.h"
#include "property.h"
#include <string>
#include <boost/filesystem.hpp>
namespace OOX
{
namespace ContentTypes
{
class Override : public WritingElement
{
public:
Override(const std::string& type, const boost::filesystem::wpath& 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 boost::filesystem::wpath filename() const;
private:
std::string m_type;
boost::filesystem::wpath m_part;
};
} // namespace ContentTypes
} // namespace OOX
#endif // OOX_CONTENT_TYPES_OVERRIDE_INCLUDE_H_
\ No newline at end of file
// auto inserted precompiled begin
#include "precompiled_docxformat.h"
// auto inserted precompiled end
#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 boost::filesystem::wpath& path)
{
m_items.push_back(Override(type, path));
}
} // namespace ContentTypes
} // namespace OOX
\ No newline at end of file
#pragma once
#ifndef OOX_CONTENT_TYPES_OVERRIDE_TABLE_INCLUDE_H_
#define OOX_CONTENT_TYPES_OVERRIDE_TABLE_INCLUDE_H_
#include "./../WritingVector.h"
#include "Override.h"
#include <boost/filesystem.hpp>
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 boost::filesystem::wpath& path);
};
} // namespace ContentTypes
} // namespace OOX
#endif // OOX_CONTENT_TYPES_OVERRIDE_TABLE_INCLUDE_H_
\ No newline at end of file
// auto inserted precompiled begin
#include "precompiled_docxformat.h"
// auto inserted precompiled end
#include "Core.h"
#include "FileTypes.h"
namespace OOX
{
Core::Core()
{
}
Core::Core(const boost::filesystem::wpath& filename)
{
read(filename);
}
Core::~Core()
{
}
void Core::read(const boost::filesystem::wpath& filename)
{
const XML::XDocument document(filename);
m_title = document.Root.element("title").text();
m_subject = document.Root.element("subject").text();
m_creator = document.Root.element("creator").text();
m_keywords = document.Root.element("keywords").text();
m_description = document.Root.element("description").text();
m_lastModifiedBy = document.Root.element("lastModifiedBy").text();
m_revision = 1;
}
void Core::write(const boost::filesystem::wpath& filename, const boost::filesystem::wpath& directory, ContentTypes::File& content) const
{
XML::XElement(ns.cp + "coreProperties",
XML::XElement(ns.dc + "title", XML::XText(m_title)) +
XML::XElement(ns.dc + "subject", XML::XText(m_subject)) +
XML::XElement(ns.dc + "creator", XML::XText(m_creator)) +
XML::XElement(ns.cp + "keywords", XML::XText(m_keywords)) +
XML::XElement(ns.dc + "description", XML::XText(m_description)) +
XML::XElement(ns.cp + "lastModifiedBy", XML::XText(m_lastModifiedBy)) +
XML::XElement(ns.cp + "revision", XML::XText(m_revision)) +
XML::WriteIf(XML::XElement(ns.dcterms + "created",
XML::XAttribute(ns.xsi + "type", "dcterms:W3CDTF") +
XML::XText(m_created)),
m_created.is_init()
) +
XML::WriteIf(XML::XElement(ns.dcterms + "modified",
XML::XAttribute(ns.xsi + "type", "dcterms:W3CDTF") +
XML::XText(m_modified)),
m_modified.is_init()
)
).Save(filename);
content.registration(type().OverrideType(), directory, filename);
}
const FileType Core::type() const
{
return FileTypes::Core;
}
const boost::filesystem::wpath Core::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const boost::filesystem::wpath Core::DefaultFileName() const
{
return type().DefaultFileName();
}
} // namespace OOX
\ No newline at end of file
#pragma once
#ifndef OOX_CORE_INCLUDE_H_
#define OOX_CORE_INCLUDE_H_
#include "File.h"
#include "DateTime.h"
#include "nullable.h"
#include "property.h"
namespace OOX
{
class Core : public OOX::File
{
public:
Core();
Core(const boost::filesystem::wpath& filename);
virtual ~Core();
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;
private:
nullable<std::string> m_title;
nullable<std::string> m_subject;
nullable<std::string> m_creator;
nullable<std::string> m_keywords;
nullable<std::string> m_description;
nullable<std::string> m_lastModifiedBy;
nullable<int> m_revision;
nullable<OOX::DateTime> m_created;
nullable<OOX::DateTime> m_modified;
};
} // namespace OOX
#endif // OOX_CORE_INCLUDE_H_
\ No newline at end of file
// auto inserted precompiled begin
#include "precompiled_docxformat.h"
// auto inserted precompiled end
#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
\ No newline at end of file
#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;
};
} // namespace OOX
#endif // OOX_DATE_TIME_INCLUDE_H_
\ No newline at end of file
// auto inserted precompiled begin
#include "precompiled_docxformat.h"
// auto inserted precompiled end
#include "Document.h"
#include "FileTypes.h"
#include "Media/Image.h"
#include "Logic/Paragraph.h"
#include "Encoding.h"
#include "External/HyperLink.h"
namespace OOX
{
Document::Document()
{
}
Document::Document(const boost::filesystem::wpath& filename)
{
read(filename);
}
Document::~Document()
{
}
void Document::read(const boost::filesystem::wpath& 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 boost::filesystem::wpath& filename, const boost::filesystem::wpath& directory, ContentTypes::File& content) const
{
XML::XElement(ns.w + "document",
XML::Write(Background) +
XML::XElement(ns.w + "body",
XML::Write(Items) +
XML::Write(SectorProperty)
)
).Save(filename);
content.registration(type().OverrideType(), directory, filename);
IFileContainer::write(filename, directory, content);
}
const FileType Document::type() const
{
return FileTypes::Document;
}
const boost::filesystem::wpath Document::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const boost::filesystem::wpath Document::DefaultFileName() const
{
return type().DefaultFileName();
}
void Document::addImage(const boost::filesystem::wpath& imagePath, const long width, const long height)
{
Image* image = new Image(imagePath);
const RId rId = add(boost::shared_ptr<OOX::File>(image));
Logic::Paragraph paragraph(rId, imagePath, width, height);
Items->push_back(paragraph);
}
void Document::addImage(const boost::filesystem::wpath& 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(boost::shared_ptr<OOX::File>(image));
Logic::Paragraph paragraph(rId, imagePath, xEmu, hRelativeFrom, yEmu, vRelativeFrom, widthEmu, heightEmu);
Items->push_back(paragraph);
}
void Document::addImageInBegin(const boost::filesystem::wpath& imagePath, const long width, const long height)
{
Items->clear();
Image* image = new Image(imagePath);
const RId rId = add(boost::shared_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;
boost::shared_ptr<OOX::File> hyperlink = boost::shared_ptr<OOX::File>(new OOX::HyperLink(nameHref));
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;
boost::shared_ptr<OOX::File> hyperlink = boost::shared_ptr<OOX::File>(new OOX::HyperLink(Encoding::utf82unicode(nameHref)));
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>())
{
boost::shared_ptr<OOX::File> hyperlink = boost::shared_ptr<OOX::File>(new OOX::HyperLink(nameHref));
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>())
{
boost::shared_ptr<OOX::File> hyperlink = boost::shared_ptr<OOX::File>(new OOX::HyperLink(Encoding::utf82unicode(nameHref)));
const OOX::RId rId = add(hyperlink);
Items->back().as<Logic::Paragraph>().AddHyperlink(rId, text);
}
}
void Document::Commit(const boost::filesystem::wpath& path)
{
std::string xmlString;
if ( !boost::filesystem::exists(path) )
{
XML::Private::XDeclaration xDeclaration;
Namespaces namespaces;
xmlString = xDeclaration.ToString();
xmlString += "<w:document ";
xmlString += ( namespaces.w->ToString() + " " );
xmlString += ( namespaces.wp->ToString() + " " );
xmlString += ( namespaces.a->ToString() + " " );
xmlString += ( namespaces.pic->ToString() + " " );
xmlString += ( namespaces.r->ToString() + " " );
xmlString += ( namespaces.v->ToString() + " " );
xmlString += namespaces.w10->ToString();
xmlString += ">";
if ( Background.is_init() )
{
xmlString += XML::Write(Background).ToString();
}
xmlString += "<w:body>";
}
xmlString += XML::Write(Items).ToString();
std::ofstream file(path.string().c_str(), std::ios_base::app);
if (!file.bad())
{
file <<xmlString;
file.close();
Items->clear();
}
}
void Document::Finalize(const boost::filesystem::wpath& path, const boost::filesystem::wpath& directory, ContentTypes::File& content)
{
std::string xmlString;
if ( !boost::filesystem::exists(path) )
{
XML::Private::XDeclaration xDeclaration;
Namespaces namespaces;
xmlString = xDeclaration.ToString();
xmlString += "<w:document ";
xmlString += ( namespaces.w->ToString() + " " );
xmlString += ( namespaces.wp->ToString() + " " );
xmlString += ( namespaces.a->ToString() + " " );
xmlString += ( namespaces.pic->ToString() + " " );
xmlString += ( namespaces.r->ToString() + " " );
xmlString += ( namespaces.v->ToString() + " " );
xmlString += namespaces.w10->ToString();
xmlString += ">";
if ( Background.is_init() )
{
xmlString += XML::Write(Background).ToString();
}
xmlString += "<w:body>";
}
xmlString += XML::Write(Items).ToString();
xmlString += XML::Write(SectorProperty).ToString();
xmlString += ( "</w:body>" );
xmlString += ( "</w:document>" );
std::ofstream file(path.string().c_str(), std::ios_base::app);
if (!file.bad())
{
file <<xmlString;
file.close();
Items->clear();
}
content.registration(type().OverrideType(), directory, path);
IFileContainer::Finalize(path, directory, content);
}
} // namespace OOX
\ No newline at end of file
#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 boost::filesystem::wpath& filename);
virtual ~Document();
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:
virtual void Commit(const boost::filesystem::wpath& path);
virtual void Finalize(const boost::filesystem::wpath& path, const boost::filesystem::wpath& directory, ContentTypes::File& content);
public:
void addImage(const boost::filesystem::wpath& imagePath, const long width, const long height);
void addImage(const boost::filesystem::wpath& imagePath, const long xEmu, const std::string& hRelativeFrom, const long yEmu , const std::string& vRelativeFrom, const long widthEmu, const long heightEmu);
void addImageInBegin(const boost::filesystem::wpath& 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;
//private:
// std::map<int, int> ListsAndCounts;
};
} // namespace OOX
#endif // OOX_DOCUMENT_FILE_INCLUDE_H_
\ No newline at end of file
#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\Image.h"
#include "Media\OleObject.h"
#include "Header.h"
#include "Footer.h"
#include "Theme/File.h"
#endif // OOX_INCLUDE_H_
\ No newline at end of file
// auto inserted precompiled begin
#include "precompiled_docxformat.h"
// auto inserted precompiled end
#include "EndNote.h"
#include "Log.h"
#include <algorithm>
#include <boost/bind.hpp>
#include "Exception/log_range_error.h"
#include "FileTypes.h"
namespace OOX
{
EndNote::EndNote()
{
}
EndNote::EndNote(const boost::filesystem::wpath& filename)
{
read(filename);
}
EndNote::~EndNote()
{
}
void EndNote::read(const boost::filesystem::wpath& filename)
{
IFileContainer::read(filename);
const XML::XDocument document(filename);
XML::Fill(Notes, document.Root, "endnote");
}
void EndNote::write(const boost::filesystem::wpath& filename, const boost::filesystem::wpath& directory, ContentTypes::File& content) const
{
XML::XElement(ns.w + "endnotes",
XML::Write(Notes)
).Save(filename);
content.registration(type().OverrideType(), directory, filename);
IFileContainer::write(filename, directory, content);
}
const FileType EndNote::type() const
{
return FileTypes::EndNote;
}
const boost::filesystem::wpath EndNote::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const boost::filesystem::wpath EndNote::DefaultFileName() const
{
return type().DefaultFileName();
}
const EndNote::Note EndNote::find(const Logic::EndnoteReference& reference) const
{
std::vector<EndNote::Note>::const_iterator it = std::find_if(Notes->begin(), Notes->end(),
boost::bind(&Note::Id, _1) == *reference.Id);
if (it == Notes->end())
throw log_range_error("endnote");
return *it;
}
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
\ No newline at end of file
#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 boost::filesystem::wpath& filename);
virtual ~EndNote();
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:
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;
};
} // namespace OOX
#endif // OOX_ENDNOTE_INCLUDE_H_
\ No newline at end of file
// auto inserted precompiled begin
#include "precompiled_docxformat.h"
// auto inserted precompiled end
#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(ns.w + "endnote",
XML::XAttribute(ns.w + "type", Type) +
XML::XAttribute(ns.w + "id", Id) +
XML::Write(Items)
);
}
void EndNote::Note::push_back(const OOX::Logic::Paragraph& paragraph)
{
Items->push_back(paragraph);
}
} // namespace OOX
\ No newline at end of file
// auto inserted precompiled begin
#include "precompiled_docxformat.h"
// auto inserted precompiled end
#include "External.h"
#include "../FileTypes.h"
namespace OOX
{
External::External()
{
}
External::External(const boost::filesystem::wpath& uri)
{
read(uri);
}
External::~External()
{
}
void External::read(const boost::filesystem::wpath& uri)
{
m_uri = uri;
}
void External::write(const boost::filesystem::wpath& filename, const boost::filesystem::wpath& directory, ContentTypes::File& content) const
{
}
const boost::filesystem::wpath External::Uri() const
{
return m_uri;
}
} // namespace OOX
\ No newline at end of file
#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 boost::filesystem::wpath& uri);
~External();
public:
virtual void read(const boost::filesystem::wpath& uri);
virtual void write(const boost::filesystem::wpath& filename, const boost::filesystem::wpath& directory, ContentTypes::File& content) const;
public:
const boost::filesystem::wpath Uri() const;
protected:
boost::filesystem::wpath m_uri;
};
} // namespace OOX
#endif // OOX_EXTERNAL_INCLUDE_H_
\ No newline at end of file
// auto inserted precompiled begin
#include "precompiled_docxformat.h"
// auto inserted precompiled end
#include "ExternalAudio.h"
#include "..\FileTypes.h"
namespace OOX
{
ExternalAudio::ExternalAudio()
{
}
ExternalAudio::ExternalAudio(const boost::filesystem::wpath& uri)
{
read(uri);
}
ExternalAudio::~ExternalAudio()
{
}
const FileType ExternalAudio::type() const
{
return FileTypes::ExternalAudio;
}
const boost::filesystem::wpath ExternalAudio::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const boost::filesystem::wpath ExternalAudio::DefaultFileName() const
{
return type().DefaultFileName();
}
} // namespace OOX
\ No newline at end of file
#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 boost::filesystem::wpath& uri);
~ExternalAudio();
public:
virtual const FileType type() const;
virtual const boost::filesystem::wpath DefaultDirectory() const;
virtual const boost::filesystem::wpath DefaultFileName() const;
};
} // namespace OOX
#endif // OOX_EXTERNALAUDIO_INCLUDE_H_
\ No newline at end of file
This diff is collapsed.
#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 boost::filesystem::wpath& uri);
~ExternalImage();
public:
virtual const FileType type() const;
virtual const boost::filesystem::wpath DefaultDirectory() const;
virtual const boost::filesystem::wpath DefaultFileName() const;
};
} // namespace OOX
#endif // OOX_EXTERNALIMAGE_INCLUDE_H_
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment