void Row::writeFields(CFRecord& record) { if(1 == in_block_position) { record.registerDelayedFilePointerSource(rt_DBCell); // For DBCell::dbRtrw } record << rw << colMic << colMac << miyRw; record.reserveNunBytes(4); // reserved / unused unsigned short flags = 0x0100; SETBITS(flags, 0, 2, iOutLevel); SETBIT(flags, 4, fCollapsed); SETBIT(flags, 5, fDyZero); SETBIT(flags, 6, fUnsynced); SETBIT(flags, 7, fGhostDirty); record << flags; flags = 0; SETBITS(flags, 0, 11, ixfe_val); SETBIT(flags, 12, fExAsc); SETBIT(flags, 13, fExDes); SETBIT(flags, 14, fPhonetic); record << flags; if(1 == in_block_position) { record.registerDelayedFilePointerAndOffsetSource(record.getDataSize() + sizeof(unsigned short)/*size_short*/ + sizeof(CFRecordType::TypeId), rt_Blank); // For CELL container. All Cell containers will listen for rt_Blank } }
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; }
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()); }
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()); }
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()); }
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()); }
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); }
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); } }
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); } }
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); }
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 }
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); } } } }
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; }
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)); }