Example #1
0
void ExtRst::load(CFRecord& record)
{
	record.skipNunBytes(2); // reserved
	record >> cb;
	size_t data_start = record.getRdPtr();
	record >> phs;

	rphssub.sz = cb;

	record >> rphssub;
	for(unsigned short i = 0; i < rphssub.getRunsNumber(); ++i)
	{
		PhRuns run;
		record >> run;
		rgphruns.push_back(run);

	}
	size_t data_end = record.getRdPtr();
	if(data_end - data_start != cb)
	{
		//ОШИБКА - нехватило Continue records - нужно найти место где именно и подзагрузить
		if ((data_end - data_start)  < cb )
			record.skipNunBytes( cb - (data_end - data_start)); // trash for unknown reason
		else
			record.RollRdPtrBack((data_end - data_start) - cb);
	}

}
Example #2
0
void DXFN12List::load(CFRecord& record)
{
	size_t pos_record = record.getRdPtr();
	
	if (size == 0xffffffff) size = record.getDataSize() - pos_record;

	if (size > 0)
	{
		bExist = true;
		record >> dxfn;
		size -= (record.getRdPtr() - pos_record);
	}
Example #3
0
void AutoFilter::readFields(CFRecord& record)
{
	size_t pos_record = record.getRdPtr();

	if (size == 0xffffffff) size = record.getDataSize() - pos_record;

	if (size > 0)
	{
		bExist = true;
	}

	m_bAutoFilter12 = false;

	unsigned short flags;
	record >> iEntry >> flags;
	
	wJoin		= GETBITS(flags, 0, 1);
	
	fSimple1	= GETBIT(flags, 2);
	fSimple2	= GETBIT(flags, 3);
	fTopN		= GETBIT(flags, 4);
	fTop		= GETBIT(flags, 5); //top(1) or bottom(0)
	fPercent	= GETBIT(flags, 6);
	
	wTopN		= GETBITS(flags, 7, 15);

	unsigned short	_iEntry		= iEntry;
	unsigned char	_wJoin		= wJoin;			
	unsigned short	_wTopN		= wTopN;			
	
	if (fTopN != 1)
	{
		record >> doper1;			
		record >> doper2;
	}
Example #4
0
void ScenMan::readFields(CFRecord& record)
{
#pragma message("####################### ScenMan record is not implemented")
	Log::error("ScenMan record is not implemented.");

	record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
Example #5
0
void ContinueBigName::readFields(CFRecord& record)
{
#pragma message("####################### ContinueBigName record is not implemented")
	Log::error("ContinueBigName record is not implemented.");

	record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
Example #6
0
void FrtWrapper::readFields(CFRecord& record)
{
#pragma message("####################### FrtWrapper record is not implemented")
	Log::error("FrtWrapper record is not implemented.");
	
	record.skipNunBytes(record.getDataSize() - record.getRdPtr());

}
Example #7
0
void DbOrParamQry::readFields(CFRecord& record)
{
#pragma message("####################### DbOrParamQry record is not implemented")
	Log::error("DbOrParamQry record is not implemented.");
	//record >> some_value;

	record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
Example #8
0
void SXDBB::readFields(CFRecord& record)
{
	size = record.getDataSize() - record.getRdPtr();

	blob = boost::shared_array<unsigned char>(new unsigned char[size]);

	memcpy(blob.get(), record.getCurData<unsigned char>(), size);

	record.skipNunBytes(size);
}
Example #9
0
void SxIsxoper::readFields(CFRecord& record)
{
	int size = (record.getDataSize() - record.getRdPtr()) / 2;

	for (int i = 0; i < size; i++)
	{
		unsigned short val;
		record >> val; 
		rgSxIsxoper.push_back(val);
	}
}
Example #10
0
void SXPI::readFields(CFRecord& record)
{
	int size = (record.getDataSize() - record.getRdPtr()) / sizeof(SXPI_Item);

	for (int i = 0; i < size; i++)
	{
		SXPI_Item item;
		record >> item.isxvd >> item.isxvi >> item.idObj;

		m_arItems.push_back(item);
	}
}
Example #11
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);
			}
		}		
	}
}
Example #12
0
void ObjFmla::load(CFRecord& record)
{
	unsigned short cbFmla;
	record >> cbFmla;
	size_t start_ptr = record.getRdPtr();

	if(0 != cbFmla)
	{
		bFmlaExist = true;

		fmla.load(record);

		if(is_part_of_FtPictFmla_ && fmla.HasPtgTbl())
		{
			record >> embedInfo;
			bInfoExist = true;
		}
Example #13
0
void Qsif::readFields(CFRecord& record)
{
	unsigned short flags1, flags2;
	record >> frtHeaderOld >> flags1 >> flags2 >> idField;

	fUserIns	= GETBIT(flags1, 0);
	fFillDown	= GETBIT(flags1, 1);
	fSortDes	= GETBIT(flags1, 2);
	iSortKey	= GETBITS(flags1, 3, 10);
	fRowNums	= GETBIT(flags1, 11);
	fSorted		= GETBIT(flags1, 13);

	fClipped	= GETBIT(flags2, 0);

	if (record.getRdPtr() >= record.getDataSize())
		return;

	record >> idList >> rgbTitle;
}
Example #14
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
}