Files
core/ASCOfficeOdtFile/Source/DocxFormat/Item.cpp
Elen.Subbotina 6138139c4e исправлен проект - подключен "старый" DocxFormat (тот который с AVS - без вытирания буста)
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53593 954022d7-b5bf-4e40-9824-e11837661b57
2016-05-20 22:37:54 +03:00

65 lines
1.2 KiB
C++

// auto inserted precompiled begin
#include "precompiled_docxformat.h"
// auto inserted precompiled end
#include "Item.h"
#include "FileTypes.h"
namespace OOX
{
Item::Item()
{
}
Item::Item(const boost::filesystem::wpath& filename)
{
read(filename);
}
Item::~Item()
{
}
void Item::read(const boost::filesystem::wpath& filename)
{
const XML::XDocument document(filename);
SelectedStyle = document.Root.attribute("SelectedStyle").value();
StyleName = document.Root.attribute("StyleName").value();
}
void Item::write(const boost::filesystem::wpath& filename, const boost::filesystem::wpath& directory, ContentTypes::File& content) const
{
XML::XElement(ns.b + "Sources",
XML::XAttribute("SelectedStyle", SelectedStyle) +
XML::XAttribute("StyleName", StyleName)
).Save(filename);
content.registration(type().OverrideType(), directory, filename);
}
const FileType Item::type() const
{
return FileTypes::Item;
}
const boost::filesystem::wpath Item::DefaultDirectory() const
{
return type().DefaultDirectory();
}
const boost::filesystem::wpath Item::DefaultFileName() const
{
return type().DefaultFileName();
}
} // namespace OOX