mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-19 05:57:25 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53593 954022d7-b5bf-4e40-9824-e11837661b57
63 lines
1.1 KiB
C++
63 lines
1.1 KiB
C++
|
|
// auto inserted precompiled begin
|
|
#include "precompiled_docxformat.h"
|
|
// auto inserted precompiled end
|
|
|
|
#include "Column.h"
|
|
|
|
|
|
namespace OOX
|
|
{
|
|
namespace Logic
|
|
{
|
|
|
|
Column::Column()
|
|
{
|
|
}
|
|
|
|
|
|
Column::~Column()
|
|
{
|
|
}
|
|
|
|
|
|
Column::Column(const XML::XNode& node)
|
|
{
|
|
fromXML(node);
|
|
}
|
|
|
|
|
|
const Column& Column::operator =(const XML::XNode& node)
|
|
{
|
|
fromXML(node);
|
|
return *this;
|
|
}
|
|
|
|
|
|
void Column::fromXML(const XML::XNode& node)
|
|
{
|
|
const XML::XElement element(node);
|
|
//if(element.attribute("w").exist())
|
|
//{
|
|
int width = element.attribute("w").value().ToInt();
|
|
Width = UniversalUnit(width, UniversalUnit::Dx);
|
|
//}
|
|
if(element.attribute("space").exist())
|
|
{
|
|
int space = element.attribute("space").value().ToInt();
|
|
Space = UniversalUnit(space, UniversalUnit::Dx);
|
|
}
|
|
}
|
|
|
|
|
|
const XML::XNode Column::toXML() const
|
|
{
|
|
return
|
|
XML::XElement(ns.w + "col",
|
|
XML::XAttribute(ns.w + "w", Width) +
|
|
XML::XAttribute(ns.w + "space", Space)
|
|
);
|
|
}
|
|
|
|
} // namespace Logic
|
|
} // namespace OOX
|