Commit 7c9be7e2 authored by ElenaSubbotina's avatar ElenaSubbotina

XlsFormat ...

parent bad29929
......@@ -131,6 +131,20 @@ void SXAddl_SXCCache_SXDVer10Info::readFields(CFRecord& record)
record >> reserved2;
}
//----------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCCache_SXDVerUpdInv::clone()
{
return BaseObjectPtr(new SXAddl_SXCCache_SXDVerUpdInv(*this));
}
void SXAddl_SXCCache_SXDVerUpdInv::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
record >> dwVersionInvalidates;
record.skipNunBytes(5);
}
//----------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCCache_SXDInfo12::clone()
{
return BaseObjectPtr(new SXAddl_SXCCache_SXDInfo12(*this));
......
......@@ -147,7 +147,15 @@ public:
unsigned char dwVer;
};
class SXAddl_SXCCache_SXDVerUpdInv : public SXAddl {};
class SXAddl_SXCCache_SXDVerUpdInv : public SXAddl
{
public:
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
unsigned char dwVersionInvalidates;
};
class SXAddl_SXCCacheField_SXDCaption : public SXAddl {};
class SXAddl_SXCCacheField_SXDEnd : public SXAddl {};
class SXAddl_SXCCacheField_SXDId : public SXAddl {};
......
......@@ -52,7 +52,7 @@ BaseObjectPtr SXViewLink::clone()
void SXViewLink::readFields(CFRecord& record)
{
unsigned short unused, reserved;
unsigned short unused, reserved;
record >> rt >> unused >> reserved >> cch;
......
......@@ -51,8 +51,7 @@ public:
virtual void load(CFRecord& record);
static const ElementType type = typeCellXF;
static const ElementType type = typeCellXF;
GlobalWorkbookInfoPtr m_GlobalWorkbookInfo;
......
......@@ -46,11 +46,7 @@ public:
ExtNameParsedFormula();
BiffStructurePtr clone();
void load(CFRecord& record);
private:
// stub to make the class non-abstract
private:
PtgPtr val;
};
......
......@@ -61,9 +61,13 @@ const bool PIVOTFRT::loadContent(BinProcessor& proc)
{
return false;
}
m_PIVOTFRT9 = elements_.back();
elements_.pop_back();
if (proc.optional<PIVOTADDL>())
{
m_PIVOTADDL = elements_.back();
elements_.pop_back();
}
return true;
}
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of PIVOTFRT union of records
class PIVOTFRT: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTFRT)
......@@ -49,7 +47,10 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTFRT;
static const ElementType type = typePIVOTFRT;
BaseObjectPtr m_PIVOTFRT9;
BaseObjectPtr m_PIVOTADDL;
};
} // namespace XLS
......
......@@ -294,7 +294,14 @@ const bool WorksheetSubstream::loadContent(BinProcessor& proc)
count--;
}
}break;
case rt_DCon: proc.optional<DCON> (); break;
case rt_DCon:
{
if (proc.optional<DCON>())
{
m_DCON = elements_.back();
elements_.pop_back();
}
}break;
case rt_UserSViewBegin:
{
count = proc.repeated<CUSTOMVIEW>(0, 0);
......@@ -341,8 +348,24 @@ const bool WorksheetSubstream::loadContent(BinProcessor& proc)
}
}break;
case rt_LRng: proc.optional<LRng> (); break;
case rt_Qsi: proc.repeated<QUERYTABLE> (0, 0); break;
case rt_LRng:
{
if (proc.optional<LRng>())
{
m_LRng = elements_.back();
elements_.pop_back();
}
}break;
case rt_Qsi:
{
count = proc.repeated<QUERYTABLE>(0, 0);
while(count > 0)
{
m_arQUERYTABLE.insert(m_arQUERYTABLE.begin(), elements_.back());
elements_.pop_back();
count--;
}
}break;
case rt_PhoneticInfo: proc.optional<PHONETICINFO> (); break;
case rt_CondFmt:
case rt_CondFmt12:
......@@ -413,8 +436,15 @@ const bool WorksheetSubstream::loadContent(BinProcessor& proc)
}
}break;
case rt_HeaderFooter:
proc.repeated<RECORD12> (0, 0);
break;
{
count = proc.repeated<RECORD12> (0, 0);
while(count > 0)
{
m_arRECORD12.insert(m_arRECORD12.begin(), elements_.back());
elements_.pop_back();
count--;
}
}break;
default://unknown .... skip
{
proc.SkipRecord();
......
......@@ -71,11 +71,14 @@ public:
BaseObjectPtr m_SheetExt;
BaseObjectPtr m_DxGCol;
BaseObjectPtr m_DVAL;
BaseObjectPtr m_DCON;
BaseObjectPtr m_LRng;
std::vector<BaseObjectPtr> m_arMergeCells;
std::vector<BaseObjectPtr> m_arWINDOW;
std::vector<BaseObjectPtr> m_arCUSTOMVIEW;
std::vector<BaseObjectPtr> m_arPIVOTVIEW;
std::vector<BaseObjectPtr> m_arQUERYTABLE;
std::vector<BaseObjectPtr> m_arFEAT;
std::vector<BaseObjectPtr> m_arFEAT11;
std::vector<BaseObjectPtr> m_arNote;
......@@ -83,6 +86,7 @@ public:
std::vector<BaseObjectPtr> m_arSORT;
std::vector<BaseObjectPtr> m_arLabel;
std::vector<BaseObjectPtr> m_arHFPicture;
std::vector<BaseObjectPtr> m_arRECORD12;
std::vector<BiffStructurePtr> m_arHFPictureDrawing;
......
......@@ -57,6 +57,7 @@
#include "../XlsFormat/Logic/Biff_unions/TEXTOBJECT.h"
#include "../XlsFormat/Logic/Biff_unions/CHART.h"
#include "../XlsFormat/Logic/Biff_unions/BACKGROUND.h"
#include "../XlsFormat/Logic/Biff_unions/PIVOTVIEW.h"
#include <Logic/Biff_records/BkHim.h>
#include <Logic/Biff_records/HLink.h>
......@@ -433,6 +434,11 @@ void XlsConverter::convert(XLS::WorksheetSubstream* sheet)
sheet->m_DVAL->serialize(xlsx_context->current_sheet().dataValidations());
}
for (size_t i = 0; i < sheet->m_arPIVOTVIEW.size(); i++)
{
convert((XLS::PIVOTVIEW*)sheet->m_arPIVOTVIEW[i].get());
}
convert((XLS::OBJECTS*)sheet->m_OBJECTS.get(), sheet);
if (!sheet->m_arNote.empty() && xls_global_info->Version < 0x0600)
......@@ -515,6 +521,11 @@ void XlsConverter::convert(XLS::GlobalsSubstream* global)
{
global->m_arUserBView[i]->serialize(xlsx_context->custom_views());
}
for (size_t i = 0 ; i < global->m_arPIVOTCACHEDEFINITION.size(); i++)
{
convert((XLS::PIVOTCACHEDEFINITION*)global->m_arPIVOTCACHEDEFINITION[i].get());
}
}
typedef boost::unordered_map<XLS::FillInfo, int> mapFillInfo;
......@@ -1893,3 +1904,15 @@ void XlsConverter::convert(XLS::ChartSheetSubstream * chart)
chart->serialize(xlsx_context->current_chart().chartData());
//convert(chart->m_OBJECTSCHART.get());непонятные какие то текстбоксы - пустые и бз привязок
}
void XlsConverter::convert(XLS::PIVOTVIEW * pivot_view)
{
if (pivot_view == NULL) return;
}
void XlsConverter::convert(XLS::PIVOTCACHEDEFINITION * pivot_cached)
{
if (pivot_cached == NULL) return;
}
\ No newline at end of file
......@@ -70,6 +70,8 @@ namespace XLS
class OBJECTS;
class MSODRAWINGGROUP;
class IMDATA;
class PIVOTVIEW;
class PIVOTCACHEDEFINITION;
class Note;
class TxO;
......@@ -117,6 +119,8 @@ public:
void convert(XLS::TxO * text_obj);
void convert(XLS::Note * note);
void convert(XLS::IMDATA * imadata);
void convert(XLS::PIVOTVIEW * pivot_view);
void convert(XLS::PIVOTCACHEDEFINITION * pivot_cached);
void convert(ODRAW::OfficeArtRecord * art);
void convert(ODRAW::OfficeArtBStoreContainer* art_bstore, int start_id = 0);
......
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