unsigned int DocFloatImageReader::readFOPTE(FOPTE &fopte, shared_ptr<OleStream> stream) { //OfficeArtFOPTE structure is described at p.32 [MS-ODRAW] unsigned int dtemp; dtemp = read2Bytes(stream); fopte.pId = (dtemp & 0x3fff); fopte.isBlipId = ((dtemp & 0x4000) >> 14) == 0x1; fopte.isComplex = ((dtemp & 0x8000) >> 15) == 0x1; fopte.value = read4Bytes(stream); return 6; }
unsigned int GAFFile::readString(std::string* str) { assert(m_dataPosition + sizeof(short) <= m_dataLen); unsigned short len = read2Bytes(); assert(m_dataPosition + len <= m_dataLen); char* data = new char[len]; readBytes(data, len); // WARN. Possible optimization here. We are able to read from m_data directly str->assign(data, len); delete[] data; return str->length() + sizeof(unsigned short); }
void GAFFile::_readHeaderBegin(GAFHeader& out) { readBytes(&out.compression, 4); out.version = read2Bytes(); out.fileLenght = read4Bytes(); }