mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-14 03:46:15 +08:00
42 lines
797 B
C++
42 lines
797 B
C++
#include "PageLayout.h"
|
|
|
|
namespace Odp
|
|
{
|
|
namespace Styles
|
|
{
|
|
PageLayout::PageLayout()
|
|
{
|
|
}
|
|
|
|
PageLayout::~PageLayout()
|
|
{
|
|
}
|
|
|
|
PageLayout::PageLayout(const XML::XNode& node)
|
|
{
|
|
fromXML(node);
|
|
}
|
|
|
|
const PageLayout& PageLayout::operator =(const XML::XNode& node)
|
|
{
|
|
fromXML(node);
|
|
return *this;
|
|
}
|
|
|
|
void PageLayout::fromXML(const XML::XNode& node)
|
|
{
|
|
const XML::XElement element(node);
|
|
Name = element.attribute("name").value();
|
|
Properties = element.element("page-layout-properties");
|
|
}
|
|
|
|
const XML::XNode PageLayout::toXML() const
|
|
{
|
|
return
|
|
XML::XElement(ns.style + "page-layout",
|
|
XML::XAttribute(ns.style + "name", Name) +
|
|
XML::Write(Properties)
|
|
);
|
|
}
|
|
} // namespace Styles;
|
|
} // namespace Odt
|