Commit d47c595b authored by ElenaSubbotina's avatar ElenaSubbotina

XlsFormatReader - fix ukr 1c

parent c1f41d0e
......@@ -47,7 +47,7 @@ CFRecord::CFRecord(CFStreamPtr stream, GlobalWorkbookInfoPtr global_info)
: rdPtr(0), // seek to the start
global_info_(global_info)
{
file_ptr = static_cast<unsigned int>(stream->getStreamPointer()); // Assume that files have size < 4Gb
file_ptr = static_cast<unsigned int>(stream->getStreamPointer());
*stream >> type_id_;
unsigned short size_short;
*stream >> size_short;
......
......@@ -69,6 +69,7 @@ void CFStream::read(void* buf, const size_t size)
if(num_read < size)
{
stream_->seek(stream_->size()); // 5217417.xls
return;// EndOfStreamReached
}
}
......
......@@ -90,6 +90,8 @@ CFStreamPtr CompoundFile::getWorkbookStream()
{
CFStreamPtr stream = getNamedStream("Workbook");
if (stream == NULL)
stream = getNamedStream("WORKBOOK"); //6447323.xls
if (stream == NULL)
stream = getNamedStream("Book");
if (stream == NULL)
......
......@@ -91,7 +91,9 @@ void DXFN12::load(CFRecord& record)
int DXFN12::serialize(std::wostream & stream)
{
if (dxfn && !xfext)
if (!dxfn) return 0;
if (!xfext)
{
dxfn->serialize(stream);
}
......
......@@ -197,6 +197,9 @@ int CELL_GROUP::serialize(std::wostream & stream)
{//skip cells
row->serialize(stream);
current_row++;
if (current_row == m_rows.end())
break;
row = dynamic_cast<Row *>(current_row->get());
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment