CLabel::CLabel(CDataStorage &datastore, const label_t& labeldef) : CRecord(datastore) { SetRecordType(labeldef.GetInSST() ? RECTYPE_LABELSST : RECTYPE_LABEL); AddValue16((unsigned16_t)labeldef.GetRow()); AddValue16((unsigned16_t)labeldef.GetCol()); AddValue16(labeldef.GetXFIndex()); if(labeldef.GetInSST()) { size_t index = labeldef.GetGlobalRecords().GetLabelSSTIndex(labeldef); AddValue32(index); } else { AddUnicodeString(labeldef.GetStrLabel(), LEN2_FLAGS_UNICODE); } SetRecordLength(GetDataSize()-RECORD_HEADER_SIZE); }
void CGlobalRecords::AddLabelSST(const label_t& labeldef) { if(labeldef.GetInSST()) { m_Labels.push_back(&labeldef); } }