mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-18 23:25:17 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53593 954022d7-b5bf-4e40-9824-e11837661b57
67 lines
1.2 KiB
C++
67 lines
1.2 KiB
C++
|
|
// auto inserted precompiled begin
|
|
#include "precompiled_docxformat.h"
|
|
// auto inserted precompiled end
|
|
|
|
#include "Header.h"
|
|
#include "exception\not_implement.h"
|
|
#include "FileTypes.h"
|
|
|
|
|
|
namespace OOX
|
|
{
|
|
|
|
Header::Header()
|
|
{
|
|
}
|
|
|
|
|
|
Header::Header(const boost::filesystem::wpath& filename)
|
|
{
|
|
read(filename);
|
|
}
|
|
|
|
|
|
Header::~Header()
|
|
{
|
|
}
|
|
|
|
|
|
void Header::read(const boost::filesystem::wpath& filename)
|
|
{
|
|
IFileContainer::read(filename);
|
|
|
|
const XML::XDocument document(filename);
|
|
XML::Fill(Items, document.Root, "p", "tbl", "sdt");
|
|
}
|
|
|
|
|
|
void Header::write(const boost::filesystem::wpath& filename, const boost::filesystem::wpath& directory, ContentTypes::File& content) const
|
|
{
|
|
XML::XElement(ns.w + "hdr",
|
|
XML::Write(Items)
|
|
).Save(filename);
|
|
|
|
content.registration(type().OverrideType(), directory, filename);
|
|
IFileContainer::write(filename, directory, content);
|
|
}
|
|
|
|
|
|
const FileType Header::type() const
|
|
{
|
|
return FileTypes::Header;
|
|
}
|
|
|
|
|
|
const boost::filesystem::wpath Header::DefaultDirectory() const
|
|
{
|
|
return type().DefaultDirectory();
|
|
}
|
|
|
|
|
|
const boost::filesystem::wpath Header::DefaultFileName() const
|
|
{
|
|
return type().DefaultFileName();
|
|
}
|
|
|
|
} // namespace OOXFile
|