Exemple #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);
	}

}
Exemple #2
0
void AddinUdf::load(CFRecord& record)
{
	record.skipNunBytes(4); // reserved
	record >> udfName;

	unsigned short cb;
	record >> cb;
	record.skipNunBytes(cb); // unused
}
Exemple #3
0
void FtGboData::load(CFRecord& record)
{
	record.skipNunBytes(4); // reserved

	record >> accel;
	record.skipNunBytes(2); // reserved
	unsigned short flags;
	record >> flags;
	fNo3d = GETBIT(flags, 0);
}
void PictFmlaEmbedInfo::load(CFRecord& record)
{
	record.skipNunBytes(1); // reserved

	unsigned char cbClass;
	record >> cbClass;
	record.skipNunBytes(1); // reserved

	strClass.setSize(cbClass);
	record >> strClass;
}
Exemple #5
0
void PtgRefErr3d::loadFields(CFRecord& record)
{
	global_info = record.getGlobalWorkbookInfo();

	record >> ixti;
	record.skipNunBytes(4); // unused
}
Exemple #6
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());
}
Exemple #7
0
void RecalcId::readFields(CFRecord& record)
{
	unsigned short rt;
	record >> rt;
	record.skipNunBytes(2); // reserved
	record >> dwBuild;
}
Exemple #8
0
void SortData::readFields(CFRecord& record)
{
	record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
	
	unsigned short flags;
	record >> 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())
	{
		#pragma message("############################ frtRefHeader skipped here")
		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);
	}

}
void DVParsedFormula::load(CFRecord& record)
{
	unsigned short cce;
	record >> cce;
	record.skipNunBytes(2); // unused
	rgce.load(record, cce);
}
Exemple #10
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());
}
Exemple #11
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());

}
Exemple #12
0
void Continue::readFields(CFRecord& record)
{
	m_iDataSize = record.getDataSize();
	m_pData		= new char[m_iDataSize];	
	memcpy(m_pData, record.getData(), m_iDataSize);

	record.skipNunBytes(m_iDataSize);
}
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());
}
Exemple #14
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);
}
Exemple #15
0
void MulRk::readFields(CFRecord& record)
{
	global_info_ = record.getGlobalWorkbookInfo();

// A little hack to extract colLast before it is used
	record.skipNunBytes(record.getDataSize() - sizeof(unsigned short));
	record >> colLast;
	record.resetPointerToBegin();
//------------------
	record >> rw >> colFirst;
	for(unsigned short i = colFirst; i <= colLast; ++i)
	{
		RkRec rec;
		record >> rec;
		rgrkrec.push_back(RkRecPtr(new RkRec(rec)));
		cells.push_back(CellPtr(new Cell(rw, i, rec.get_ixfe())));
	}

	record.skipNunBytes(sizeof(unsigned short));
}
Exemple #16
0
void OleDbConn::readFields(CFRecord& record)
{
	unsigned short flags;

	record >> frtHeaderOld >> flags >> cst;
	
	fPasswd	= GETBIT(flags, 0);
	fLocal	= GETBIT(flags, 1);

	record.skipNunBytes(4); //reserved2
}
Exemple #17
0
void Index::readFields(CFRecord& record)
{
	record.skipNunBytes(4); // reserved
	record >> rwMic >> rwMac >> ibXF;
	
	while(!record.isEOF())
	{
		FilePointerPtr element(new FilePointer);
		record >> *element;
		rgibRw.push_back(element);
	}
}
Exemple #18
0
void MDXSet::readFields(CFRecord& record)
{
	record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
	record >> istrConnName >> tfnSrc >> sso >> istrSetDef >> cistr;
	while(!record.isEOF())
	{
		MDXStrIndexPtr element(new MDXStrIndex);
		record >> *element;
		rgistr.push_back(element);
	}
}
Exemple #19
0
void RevExtern::load(CFRecord& record)
{
	unsigned char book_type = *record.getCurData<unsigned char>();
	if(0x01 == book_type)
	{
		record.skipNunBytes(2); // current worksheet chosen
	}
	else
	{
		record >> book;
	}
	record >> itabFirst >> itabLast;
}
void LbsDropData::load(CFRecord& record)
{
	unsigned short flags;
	record >> flags >> cLine >> dxMin >> str;
	wStyle = GETBITS(flags, 0, 1);
	fFiltered = GETBIT(flags, 3);

	if(0 != (str.getStructSize() & 1))
	{
		record.skipNunBytes(1); // padding
	}

}
Exemple #21
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
}
Exemple #22
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);
			}
		}		
	}
}
Exemple #23
0
void XFExtNoFRT::load(CFRecord& record)
{
	if (record.isEOF()) return;

	record.skipNunBytes(6); // reserved
	unsigned short cexts;
	record >> cexts;
	
	for(unsigned short i = 0; i < cexts; ++i)
	{
		if (record.checkFitReadSafe(4) == false)
			break;
		ExtProp prop;
		record >> prop;
		rgExt.push_back(prop);
	}
}
void CFMultistate::load(CFRecord& record)
{
	record.skipNunBytes(2); // unused
	record.skipNunBytes(1); // reserved
	record >> cStates >> iIconSet;
	unsigned char flags;
	record >> flags;
	fIconOnly = GETBIT(flags, 0);
	fReverse = GETBIT(flags, 2);

	for(unsigned char i = 0; i < cStates; ++i)
	{
		CFMStateItemPtr item(new CFMStateItem);
		item->load(record);
		rgStates.push_back(item);
	}
}
Exemple #25
0
void RevName::load(CFRecord& record)
{
	unsigned char book_type = *record.getCurData<unsigned char>();
	if(0x01 == book_type)
	{
		record.skipNunBytes(2); // current worksheet chosen
	}
	else
	{
		record >> book;
	}
	record >> fExtern;
	if(fExtern)
	{
		record >> externName;
	}
	else
	{
Exemple #26
0
void FtNts::load(CFRecord& record)
{
	unsigned short ft, cb;
	record >> ft >> cb;

	if ( ft != 0x000d && cb != 0x0016)
	{
		record.RollRdPtrBack(4);
		return;
	}
	fExist = true;

	_GUID_ guid_num;
	record >> guid_num >> fSharedNote;
	
	guid = STR::guid2bstr(guid_num);
	
	record.skipNunBytes(4);
}
Exemple #27
0
void FtCmo::load(CFRecord& record)
{
	record.skipNunBytes(4); // reserved

	record >> ot >> id;
	
	if (record.getGlobalWorkbookInfo()->Version < 0x0600)
	{
		unsigned char flags;
		record >> flags;
		
		fLocked			= GETBIT(flags, 0);
		fDefaultSize	= GETBIT(flags, 2);
		fPublished		= GETBIT(flags, 3);
		fPrint			= GETBIT(flags, 4);
		fDisabled		= GETBIT(flags, 7);
		
		fUIObj			= false;
		fRecalcObj		= false;
		fRecalcObjAlways = false;
	}
Exemple #28
0
void Row::readFields(CFRecord& record)
{
	global_info_ = record.getGlobalWorkbookInfo();
	record >> rw >> colMic >> colMac >> miyRw;

	record.skipNunBytes(4); // reserved / unused

	unsigned short flags;
	record >> flags;
	
	iOutLevel	= GETBITS(flags, 0, 2);
	fCollapsed	= GETBIT(flags, 4);
	fDyZero		= GETBIT(flags, 5);
	fUnsynced	= GETBIT(flags, 6);
	fGhostDirty = GETBIT(flags, 7);

	record >> flags;

	ixfe_val	= GETBITS(flags, 0, 11);
	fExAsc		= GETBIT(flags, 12);
	fExDes		= GETBIT(flags, 13);
	fPhonetic	= GETBIT(flags, 14);
}
Exemple #29
0
void FtSbs::load(CFRecord& record)
{
	unsigned short ft, cb;
	record >> ft >> cb;

	if ( ft != 0x000c && cb != 0x0014)
	{
		record.RollRdPtrBack(4);
		return;
	}
	fExist = true;

	record.skipNunBytes(4); // unused1

	unsigned short flags;

	record >> iVal >> iMin >> iMax >> dInc >> dPage >> fHoriz >> dxScroll >> flags;

	fDraw			= GETBIT(flags, 0);
	fDrawSliderOnly = GETBIT(flags, 1);
	fTrackElevator	= GETBIT(flags, 2);
	fNo3d			= GETBIT(flags, 3);
}
Exemple #30
0
void FeatHdr::readFields(CFRecord& record)
{
	FrtHeader frtHeader(rt_FeatHdr);
	record >> frtHeader;
	record >> isf;
	record.skipNunBytes(1); // reserved
	record >> cbHdrData;
	if(cbHdrData)
	{
		switch(isf)
		{
			case 0x0002://ISFPROTECTION:
				record >> protection;
				break;
			case 0x0004://ISFFACTOID:
				if(is_contained_in_Globals)
				{
					record >> prop;
				}
				break;
		}
	}

}