Пример #1
0
void SortData::readFields(CFRecord& record)
{
	unsigned short flags;

	record >> frtHeader >> flags;

	fCol			= GETBIT(flags, 0);
	fCaseSensitive	= GETBIT(flags, 1);
	fAltMethod		= GETBIT(flags, 2);
	sfp				= GETBITS(flags, 3, 5);
	
	RFX rfx_orig;
	record >> rfx_orig >> cconditions;
	rfx = static_cast<std::wstring >(rfx_orig);
	
	record >> idParent;
	
	std::list<CFRecordPtr>& recs = continue_records[rt_ContinueFrt12];
	while(!recs.empty())
	{
		record.appendRawData(recs.front()->getData() + 12, recs.front()->getDataSize() - 12);
		recs.pop_front();
	}
	
	for(unsigned int i = 0; i < cconditions; ++i)
	{
		SortCond12Ptr sort_cond(new SortCond12);
		record >> *sort_cond;
		sortCond12Array.push_back(sort_cond);
	}

}
Пример #2
0
void MsoDrawingGroup::readFields(CFRecord& record)
{
	std::list<CFRecordPtr>& recs = continue_records[rt_Continue];
	while(!recs.empty())
	{
		record.appendRawData(recs.front());
		recs.pop_front();
	}

	record >> rgChildRec;
}
Пример #3
0
void AutoFilter12::readFields(CFRecord& record)
{
	_UINT16 flags;
	_UINT32 unused2;
	
	record >> frtRefHeader >> iEntry >> fHideArrow >> ft >> cft >> cCriteria >> cDateGroupings >> flags >> unused2 >> idList;

	_GUID_ guid_num;
	record >> guid_num;
	guidSview = STR::guid2bstr(guid_num);

	record.skipNunBytes(record.getDataSize() - record.getRdPtr());
//-------------------------------------------------------------------------------------------------------
	std::list<CFRecordPtr>& recs = continue_records[rt_ContinueFrt12];
	size_t size = recs.size();

	switch(ft)
	{
	case 0x00000000://not exist
		break;
	case 0x00000001: rgb = BiffStructurePtr(new DXFN12List); //color
		break;
	case 0x00000002: rgb = BiffStructurePtr(new DXFN12List); //font
		break;
	case 0x00000003: rgb = BiffStructurePtr(new AF12CellIcon); //icon
		break;
	}
	if (rgb)
		rgb->load(record);

	while( !recs.empty() )
	{
		record.appendRawData(recs.front());
		recs.pop_front();

		//
		FrtRefHeader frtRefHeaderContinue;
		record >> frtRefHeaderContinue;
		if (frtRefHeaderContinue.rt == 0x087F)
		{		
			if ( ft == 0 && cCriteria > 0)
			{
				AF12CriteriaPtr item(new AF12Criteria);
				item->load(record);
				
				arAF12Criteries.push_back(item);
			}
		}		
	}
}
Пример #4
0
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
}