diff --git a/ASCOfficeXlsFile2/source/XlsFormat/Binary/CFStreamCacheReader.cpp b/ASCOfficeXlsFile2/source/XlsFormat/Binary/CFStreamCacheReader.cpp index eaa7112e78..29e735fb43 100644 --- a/ASCOfficeXlsFile2/source/XlsFormat/Binary/CFStreamCacheReader.cpp +++ b/ASCOfficeXlsFile2/source/XlsFormat/Binary/CFStreamCacheReader.cpp @@ -37,6 +37,8 @@ CFRecordPtr CFStreamCacheReader::getNextRecord(const CFRecordType::TypeId desira { CFRecordType::TypeString rec_name = records_cache.front()->getTypeString(); + //Log::warning(rec_name); + if (desirable_type == rt_MsoDrawingGroup) // объединяем rt_MsoDrawingGroup + rt_Continue в один блок { if (checkNextRecord(desirable_type, 1)) diff --git a/ASCOfficeXlsFile2/source/XlsFormat/Binary/CompoundFile.cpp b/ASCOfficeXlsFile2/source/XlsFormat/Binary/CompoundFile.cpp index cf8a731d20..214f71cd7e 100644 --- a/ASCOfficeXlsFile2/source/XlsFormat/Binary/CompoundFile.cpp +++ b/ASCOfficeXlsFile2/source/XlsFormat/Binary/CompoundFile.cpp @@ -101,7 +101,9 @@ CFStreamPtr CompoundFile::getNamedStream(const std::string& name) { if(!streams[name]) { - streams[name].reset(new CFStream(openStream(name.c_str()))); + POLE::Stream * pStream = openStream(name.c_str()); + if (pStream) + streams[name].reset(new CFStream(pStream)); } return streams[name]; } @@ -111,7 +113,9 @@ CFStreamPtr CompoundFile::createNamedStream(const std::string& name) { if(!streams[name]) { - streams[name].reset(new CFStream(createStream(name.c_str()))); + POLE::Stream * pStream = createStream(name.c_str()); + if (pStream) + streams[name].reset(new CFStream(pStream)); } return streams[name]; } @@ -131,7 +135,9 @@ POLE::Stream* CompoundFile::openStream(const std::string & stream_name) { throw;// EXCEPT::RT::CompoundFileFormatError(std::string("Error opening \"") + static_cast(stream_name) + "\" stream", hres); } - return pStream; + if ((pStream) && (pStream->size() > 0)) + return pStream; + else return NULL; } diff --git a/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/HLink.cpp b/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/HLink.cpp index 04ac2cb116..14861c48f1 100644 --- a/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/HLink.cpp +++ b/ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/HLink.cpp @@ -1,6 +1,5 @@ #include "HLink.h" -//#include namespace XLS {; diff --git a/ASCOfficeXlsFile2/source/XlsFormat/Logic/SummaryInformationStream/Structures/PropertySetStream.cpp b/ASCOfficeXlsFile2/source/XlsFormat/Logic/SummaryInformationStream/Structures/PropertySetStream.cpp index 2721f18568..4bea6cc6f2 100644 --- a/ASCOfficeXlsFile2/source/XlsFormat/Logic/SummaryInformationStream/Structures/PropertySetStream.cpp +++ b/ASCOfficeXlsFile2/source/XlsFormat/Logic/SummaryInformationStream/Structures/PropertySetStream.cpp @@ -9,14 +9,14 @@ namespace OLEPS PropertySetStream::PropertySetStream(XLS::CFStreamPtr stream) { - unsigned short ByteOrder; - unsigned short Version; - unsigned int SystemIdentifier; - unsigned int NumPropertySets; - _GUID_ Clsid; + unsigned short ByteOrder=0; + unsigned short Version=0; + unsigned int SystemIdentifier=0; + unsigned int NumPropertySets=0; + _GUID_ Clsid={}; *stream >> ByteOrder >> Version >> SystemIdentifier >> Clsid >> NumPropertySets; - + std::vector property_sets_offsets; for(unsigned int i = 0; i < NumPropertySets; ++i) { diff --git a/ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp b/ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp index 4af538863f..ae24f7895e 100644 --- a/ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp +++ b/ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp @@ -153,6 +153,9 @@ const bool WorksheetSubstream::loadContent(BinProcessor& proc) proc.repeated(0, 0); proc.optional(); proc.repeated(1, 0); + + proc.optional(); //BulletinSearch.xls ??? тута или ниже + proc.repeated(0, 0); proc.repeated(0, 2); proc.optional();