mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-20 01:04:34 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53593 954022d7-b5bf-4e40-9824-e11837661b57
77 lines
1.1 KiB
C++
77 lines
1.1 KiB
C++
|
|
// auto inserted precompiled begin
|
|
#include "precompiled_docxformat.h"
|
|
// auto inserted precompiled end
|
|
|
|
#include "Text.h"
|
|
|
|
|
|
namespace OOX
|
|
{
|
|
namespace Logic
|
|
{
|
|
|
|
Text::Text()
|
|
{
|
|
}
|
|
|
|
|
|
Text::~Text()
|
|
{
|
|
}
|
|
|
|
|
|
Text::Text(const std::string& text)
|
|
{
|
|
fromTxt(text);
|
|
}
|
|
|
|
|
|
Text::Text(const XML::XNode& node)
|
|
{
|
|
fromXML(node);
|
|
}
|
|
|
|
|
|
const Text& Text::operator =(const XML::XNode& node)
|
|
{
|
|
fromXML(node);
|
|
return *this;
|
|
}
|
|
|
|
|
|
const Text& Text::operator =(const std::string& text)
|
|
{
|
|
fromTxt(text);
|
|
return *this;
|
|
}
|
|
|
|
|
|
void Text::fromXML(const XML::XNode& node)
|
|
{
|
|
const XML::XElement element(node);
|
|
m_text = element.text();
|
|
}
|
|
|
|
|
|
void Text::fromTxt(const std::string& text)
|
|
{
|
|
m_text = text;
|
|
}
|
|
|
|
|
|
const XML::XNode Text::toXML() const
|
|
{
|
|
XML::XElement element = XML::XElement(ns.w + "t", XML::XText(m_text));
|
|
element.Space = true;
|
|
return element;
|
|
}
|
|
|
|
|
|
const std::string Text::toTxt() const
|
|
{
|
|
return m_text;
|
|
}
|
|
|
|
} // namespace Logic
|
|
} // namespace OOX
|