mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 01:11:43 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62950 954022d7-b5bf-4e40-9824-e11837661b57
50 lines
972 B
C++
50 lines
972 B
C++
|
|
#include "office_body.h"
|
|
|
|
#include <boost/foreach.hpp>
|
|
|
|
#include <cpdoccore/xml/xmlchar.h>
|
|
#include <cpdoccore/xml/attributes.h>
|
|
|
|
#include <cpdoccore/xml/simple_xml_writer.h>
|
|
|
|
namespace cpdoccore {
|
|
namespace odf_writer {
|
|
|
|
using xml::xml_char_wc;
|
|
|
|
// office:body
|
|
//////////////////////////////////////////////////////////////////////////////////////////////////
|
|
const wchar_t * office_body::ns = L"office";
|
|
const wchar_t * office_body::name = L"body";
|
|
|
|
office_body::office_body()
|
|
{}
|
|
|
|
void office_body::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
|
{
|
|
CP_CREATE_ELEMENT(content_);
|
|
}
|
|
|
|
|
|
void office_body::add_child_element( const office_element_ptr & child_element)
|
|
{
|
|
content_ = child_element;
|
|
}
|
|
|
|
|
|
void office_body::serialize(std::wostream & _Wostream)
|
|
{
|
|
CP_XML_WRITER(_Wostream)
|
|
{
|
|
CP_XML_NODE_SIMPLE()
|
|
{
|
|
if (content_)content_->serialize(CP_XML_STREAM());
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|