mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-21 11:00:49 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53593 954022d7-b5bf-4e40-9824-e11837661b57
78 lines
1.3 KiB
C++
78 lines
1.3 KiB
C++
|
|
// auto inserted precompiled begin
|
|
#include "precompiled_xml.h"
|
|
// auto inserted precompiled end
|
|
|
|
#include "Comment.h"
|
|
#include "Lexigraph.h"
|
|
#include "Encoding.h"
|
|
|
|
|
|
namespace XML
|
|
{
|
|
namespace Private
|
|
{
|
|
|
|
Comment::Comment()
|
|
{
|
|
}
|
|
|
|
|
|
Comment::Comment(const std::string& value)
|
|
: Value(value)
|
|
{
|
|
}
|
|
|
|
|
|
Comment::~Comment()
|
|
{
|
|
}
|
|
|
|
|
|
const bool Comment::isElement() const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
|
|
const bool Comment::isText() const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
|
|
const bool Comment::isComment() const
|
|
{
|
|
return true;
|
|
}
|
|
|
|
|
|
const std::string Comment::ToString() const
|
|
{
|
|
return "<!--" + Private::Lexigraph::toSource(Value.ToString()) + "-->";
|
|
}
|
|
|
|
|
|
const std::wstring Comment::ToWString() const
|
|
{
|
|
return L"<!--" + Private::Lexigraph::toSource(Value.ToWString()) + L"-->";
|
|
}
|
|
|
|
|
|
void Comment::SaveToStringList(std::list<std::string>& strList)const
|
|
{
|
|
strList.push_back("<!--");
|
|
strList.push_back(Private::Lexigraph::toSource(Value.ToString()));
|
|
strList.push_back("-->");
|
|
}
|
|
|
|
|
|
void Comment::SaveToWStringList(std::list<std::wstring>& strList)const
|
|
{
|
|
strList.push_back(L"<!--");
|
|
strList.push_back(Private::Lexigraph::toSource(Value.ToWString()));
|
|
strList.push_back(L"-->");
|
|
}
|
|
|
|
} // namespace Private
|
|
} // namespace XML
|