Commit 8b7ba434 authored by ElenaSubbotina's avatar ElenaSubbotina Committed by Alexander Trofimov

XlsFormat ....

parent fefb9d3f
...@@ -37,14 +37,9 @@ namespace odf_reader { ...@@ -37,14 +37,9 @@ namespace odf_reader {
void draw_g::xlsx_convert(oox::xlsx_conversion_context & Context) void draw_g::xlsx_convert(oox::xlsx_conversion_context & Context)
{ {
int i=0; for (int i = 0 ; i < content_.size(); i++)
int size = content_.size();
while(true)
{ {
if (i>=size)break; content_[i]->xlsx_convert(Context);
office_element_ptr const & elm = content_[i];
elm->xlsx_convert(Context);
i++;
} }
} }
void draw_frame::xlsx_convert(oox::xlsx_conversion_context & Context) void draw_frame::xlsx_convert(oox::xlsx_conversion_context & Context)
......
...@@ -16,7 +16,7 @@ CFStream::CFStream(POLE::Stream* stream) ...@@ -16,7 +16,7 @@ CFStream::CFStream(POLE::Stream* stream)
{ {
if(NULL == stream) if(NULL == stream)
{ {
throw;// EXCEPT::RT::CompoundFileFormatError("Wrong IStream pointer (NULL)"); return; // throw;EXCEPT::RT::CompoundFileFormatError("Wrong IStream pointer (NULL)");
} }
stream_ = stream; stream_ = stream;
} }
......
#pragma once #pragma once
#include "Property.h" #include "Property.h"
#include <Binary/BinSmartPointers.h> #include "../../../Binary/BinSmartPointers.h"
#include <vector> #include <vector>
......
...@@ -23,10 +23,15 @@ PropertySetStream::PropertySetStream(XLS::CFStreamPtr stream) ...@@ -23,10 +23,15 @@ PropertySetStream::PropertySetStream(XLS::CFStreamPtr stream)
if (Version != 0x01 && Version != 0x00) if (Version != 0x01 && Version != 0x00)
return; return;
*stream >> SystemIdentifier >> Clsid >> NumPropertySets; *stream >> SystemIdentifier >> Clsid;
*stream >> NumPropertySets;
if (NumPropertySets != 0x01 && NumPropertySets != 0x02) if (NumPropertySets != 0x01 && NumPropertySets != 0x02)
return; {
NumPropertySets = 0x01;
stream->seekFromBegin(28);
}
std::vector<unsigned int> property_sets_offsets; std::vector<unsigned int> property_sets_offsets;
for(unsigned int i = 0; i < NumPropertySets; ++i) for(unsigned int i = 0; i < NumPropertySets; ++i)
...@@ -35,7 +40,7 @@ PropertySetStream::PropertySetStream(XLS::CFStreamPtr stream) ...@@ -35,7 +40,7 @@ PropertySetStream::PropertySetStream(XLS::CFStreamPtr stream)
unsigned int Offset; unsigned int Offset;
*stream >> FMTID >> Offset; *stream >> FMTID >> Offset;
if (Offset > 0) if (Offset < stream->getStreamSize())
property_sets_offsets.push_back(Offset); property_sets_offsets.push_back(Offset);
} }
......
#pragma once #pragma once
#include <Binary/BinSmartPointers.h> #include "../../../Binary/BinSmartPointers.h"
#include "PropertySet.h" #include "PropertySet.h"
namespace OLEPS namespace OLEPS
......
#pragma once #pragma once
#include <Binary/BinSmartPointers.h> #include "../../Binary/BinSmartPointers.h"
#include "Structures/PropertySetStream.h" #include "Structures/PropertySetStream.h"
namespace OLEPS namespace OLEPS
......
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