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@63606 954022d7-b5bf-4e40-9824-e11837661b57
68 lines
1.3 KiB
C++
68 lines
1.3 KiB
C++
|
|
#include "CompositeObject.h"
|
|
#include "BinProcessor.h"
|
|
|
|
|
|
namespace XLS
|
|
{;
|
|
|
|
CompositeObject::CompositeObject()
|
|
{
|
|
}
|
|
|
|
|
|
CompositeObject::~CompositeObject()
|
|
{
|
|
}
|
|
|
|
/*
|
|
const bool CompositeObject::doSomething(BinProcessor& proc)
|
|
{
|
|
MSXML2::IXMLDOMElementPtr own_tag = XMLSTUFF::createElement(getClassName(), parent);
|
|
|
|
BinReaderProcessor reader_proc(reader, own_tag, is_mandatory);
|
|
if(loadContent(reader_proc))
|
|
{
|
|
return true;
|
|
}
|
|
parent->removeChild(own_tag); // When nothing was read for this composite. For example, if loadFirstMandatory returns false
|
|
return false;
|
|
}
|
|
|
|
*/
|
|
|
|
const bool CompositeObject::read(CFStreamCacheReader& reader, BaseObject* parent, const bool is_mandatory)
|
|
{
|
|
BinReaderProcessor reader_proc(reader, this, is_mandatory);
|
|
if(loadContentRead(reader_proc))
|
|
{
|
|
parent->add_child(this->clone());
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
|
|
|
|
|
|
const bool CompositeObject::loadContentRead(BinReaderProcessor& proc)
|
|
{
|
|
return loadContent(proc);
|
|
}
|
|
|
|
|
|
|
|
const bool ABNFParenthesis::read(CFStreamCacheReader& reader, BaseObject* parent, const bool is_mandatory)
|
|
{
|
|
BinReaderProcessor reader_proc(reader, parent, is_mandatory);
|
|
bool res = loadContentRead(reader_proc);
|
|
|
|
//parent->add_child(this);
|
|
return res;
|
|
};
|
|
|
|
|
|
|
|
} // namespace XLS
|