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
81 lines
1.2 KiB
C++
81 lines
1.2 KiB
C++
|
|
// auto inserted precompiled begin
|
|
#include "precompiled_docxformat.h"
|
|
// auto inserted precompiled end
|
|
|
|
#include "Symbol.h"
|
|
|
|
|
|
namespace OOX
|
|
{
|
|
namespace Logic
|
|
{
|
|
|
|
Symbol::Symbol()
|
|
{
|
|
}
|
|
|
|
|
|
Symbol::~Symbol()
|
|
{
|
|
}
|
|
|
|
|
|
Symbol::Symbol(const std::string& text)
|
|
{
|
|
fromTxt(text);
|
|
}
|
|
|
|
|
|
Symbol::Symbol(const XML::XNode& node)
|
|
{
|
|
fromXML(node);
|
|
}
|
|
|
|
|
|
const Symbol& Symbol::operator =(const XML::XNode& node)
|
|
{
|
|
fromXML(node);
|
|
return *this;
|
|
}
|
|
|
|
|
|
const Symbol& Symbol::operator =(const std::string& text)
|
|
{
|
|
fromTxt(text);
|
|
return *this;
|
|
}
|
|
|
|
|
|
void Symbol::fromXML(const XML::XNode& node)
|
|
{
|
|
const XML::XElement element(node);
|
|
Font = element.attribute("font").value();
|
|
Char = element.attribute("char").value();
|
|
}
|
|
|
|
|
|
void Symbol::fromTxt(const std::string& text)
|
|
{
|
|
//TODO
|
|
}
|
|
|
|
|
|
const XML::XNode Symbol::toXML() const
|
|
{
|
|
return
|
|
XML::XElement(ns.w + "sym",
|
|
XML::XAttribute(ns.w + "font", Font) +
|
|
XML::XAttribute(ns.w + "char", Char)
|
|
);
|
|
}
|
|
|
|
|
|
const std::string Symbol::toTxt() const
|
|
{
|
|
//TODO
|
|
return "";
|
|
}
|
|
|
|
} // namespace Logic
|
|
} // namespace OOX
|