예제 #1
0
파일: BookExt.cpp 프로젝트: ONLYOFFICE/core
void BookExt::readFields(CFRecord& record)
{
	FrtHeader header(rt_BookExt);
	record >> header;

	record >> cb;
	_UINT32 flags;
	
	if (record.loadAnyData(flags))
	{	
		fDontAutoRecover		= GETBIT(flags, 0);
		fHidePivotList			= GETBIT(flags, 1);
		fFilterPrivacy			= GETBIT(flags, 2);
		fEmbedFactoids			= GETBIT(flags, 3);
		mdFactoidDisplay		= GETBITS(flags, 4, 5);
		fSavedDuringRecovery	= GETBIT(flags, 6);
		fCreatedViaMinimalSave	= GETBIT(flags, 7);
		fOpenedViaDataRecovery	= GETBIT(flags, 8);
		fOpenedViaSafeLoad		= GETBIT(flags, 9);
	}
	else return;


	if(cb > 20)
	{
		record >> grbit1;
	}
예제 #2
0
파일: Pls.cpp 프로젝트: ONLYOFFICE/core
void Pls::readFields(CFRecord& record)
{
	record.skipNunBytes(2); // reserved
	
	if (record.loadAnyData(rgb) == false) return;

	if (continue_records.size() > 0)
	{
		std::list<CFRecordPtr>& recs = continue_records[rt_Continue];

		if (recs.size())
		{
			while( !recs.empty() )
			{
				record.appendRawData(recs.front()->getData(), recs.front()->getDataSize());
				recs.pop_front();
			}
		}
	}

	int size			= record.getDataSize() - 2;
	const BYTE* data	= (BYTE*)record.getData() + 2;
	
	boost::shared_array<BYTE> buffer(new BYTE[size]);
    memcpy(buffer.get(), data, size);
	
	bin_data_id = -1;

	GlobalWorkbookInfo* globla_info = record.getGlobalWorkbookInfo().get();
	if (globla_info)
	{
		globla_info->bin_data.push_back(std::pair<boost::shared_array<BYTE>, size_t>(buffer, size));

		bin_data_id = globla_info->bin_data.size() - 1;
	}

	record.skipNunBytes(record.getDataSize() - record.getRdPtr()); // avoid size inconsistency warning
}
예제 #3
0
void SecurityDescriptor::load(CFRecord& record)
{
	record.loadAnyData(sd);
}
예제 #4
0
void CFExTemplateParams::load(CFRecord& record)
{
	record.loadAnyData(data);
}