Commit ed3e107d authored by ElenaSubbotina's avatar ElenaSubbotina

XlsFormatReader - pivot tables records

parent 64d8c659
......@@ -35,7 +35,6 @@
namespace XLS
{
// Logical representation of IMDATA record in BIFF5
class IMDATA: public BiffRecordContinued
{
BIFF_RECORD_DEFINE_TYPE_INFO(IMDATA)
......@@ -45,11 +44,10 @@ public:
~IMDATA();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeIMDATA;
static const ElementType type = typeIMDATA;
_UINT16 cf;
_UINT16 env;
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of RealTimeData record in BIFF8
class RealTimeData: public BiffRecordContinued
{
BIFF_RECORD_DEFINE_TYPE_INFO(RealTimeData)
......@@ -47,12 +45,10 @@ public:
~RealTimeData();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeRealTimeData;
static const ElementType type = typeRealTimeData;
};
} // namespace XLS
......
......@@ -35,6 +35,19 @@
namespace XLS
{
BiffStructurePtr XLUnicodeStringSegmentedSXADDL::clone()
{
return BiffStructurePtr(new XLUnicodeStringSegmentedSXADDL(*this));
}
void XLUnicodeStringSegmentedSXADDL::load(CFRecord& record)
{
unsigned short reserved;
record >> cchTotal >> reserved;
record >> string;
}
//-----------------------------------------
SXAddl::SXAddl()
{
}
......@@ -58,6 +71,10 @@ void SXAddl::readFields(CFRecord& record)
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
//-------------------------------------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCCache_SXDId::clone()
{
return BaseObjectPtr(new SXAddl_SXCCache_SXDId(*this));
}
void SXAddl_SXCCache_SXDId::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
......@@ -65,7 +82,11 @@ void SXAddl_SXCCache_SXDId::readFields(CFRecord& record)
short reserved;
record >> idCache >> reserved;
}
//----------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCCache_SXDEnd::clone()
{
return BaseObjectPtr(new SXAddl_SXCCache_SXDEnd(*this));
}
void SXAddl_SXCCache_SXDEnd::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
......@@ -74,7 +95,26 @@ void SXAddl_SXCCache_SXDEnd::readFields(CFRecord& record)
short reserved2;
record >> reserved1 >> reserved2;
}
//----------------------------------------------------------------------------
BaseObjectPtr Continue_SxaddlSxString::clone()
{
return BaseObjectPtr(new Continue_SxaddlSxString(*this));
}
void Continue_SxaddlSxString::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
int sz = record.getDataSize() - record.getRdPtr();
if (sz > 0)
record >> stContinue;
}
//----------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCCache_SXDVer10Info::clone()
{
return BaseObjectPtr(new SXAddl_SXCCache_SXDVer10Info(*this));
}
void SXAddl_SXCCache_SXDVer10Info::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
......@@ -90,6 +130,11 @@ void SXAddl_SXCCache_SXDVer10Info::readFields(CFRecord& record)
record >> reserved2;
}
//----------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCCache_SXDInfo12::clone()
{
return BaseObjectPtr(new SXAddl_SXCCache_SXDInfo12(*this));
}
void SXAddl_SXCCache_SXDInfo12::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
......@@ -103,6 +148,11 @@ void SXAddl_SXCCache_SXDInfo12::readFields(CFRecord& record)
fSrvSupportAttribDrill = GETBIT(flags, 1);
fSrvSupportSubQuery = GETBIT(flags, 2);
}
//----------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCCache_SXDVerSXMacro::clone()
{
return BaseObjectPtr(new SXAddl_SXCCache_SXDVerSXMacro(*this));
}
void SXAddl_SXCCache_SXDVerSXMacro::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
......@@ -112,6 +162,17 @@ void SXAddl_SXCCache_SXDVerSXMacro::readFields(CFRecord& record)
record >> dwVer >> reserved1 >> reserved2 >> reserved3;
}
//----------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCView_SXDId::clone()
{
return BaseObjectPtr(new SXAddl_SXCView_SXDId(*this));
}
void SXAddl_SXCView_SXDId::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
record >> stName;
}
} // namespace XLS
......@@ -32,12 +32,29 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
namespace XLS
{
class XLUnicodeStringSegmentedSXADDL : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(XLUnicodeStringSegmentedSXADDL)
public:
XLUnicodeStringSegmentedSXADDL(){}
~XLUnicodeStringSegmentedSXADDL(){}
BiffStructurePtr clone();
virtual void load(CFRecord& record);
static const ElementType type = typeStringSegmentedSXADDL;
_UINT32 cchTotal;
XLUnicodeString string;
};
// Logical representation of SXAddl record in BIFF8
class SXAddl: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXAddl)
......@@ -57,9 +74,8 @@ public:
SXAddl();
~SXAddl();
BaseObjectPtr clone();
virtual BaseObjectPtr clone();
virtual void readFields(CFRecord& record);
static const ElementType type = typeSXAddl;
......@@ -68,8 +84,10 @@ public:
class Continue_SxaddlSxString : public SXAddl
{
public:
//virtual void readFields(CFRecord& record);
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
XLUnicodeStringSegmentedSXADDL stContinue;
};
class SXAddl_SXCAutoSort_SXDEnd : public SXAddl {};
class SXAddl_SXCAutoSort_SXDId : public SXAddl {};
......@@ -77,12 +95,14 @@ class SXAddl_SXCCache_SXDEnd : public SXAddl
{
public:
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
};
class SXAddl_SXCCache_SXDId : public SXAddl
{
public:
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
_UINT32 idCache;
};
......@@ -92,6 +112,7 @@ class SXAddl_SXCCache_SXDInfo12 : public SXAddl
public:
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
bool fSheetData;
bool fSrvSupportAttribDrill;
......@@ -108,6 +129,7 @@ class SXAddl_SXCCache_SXDVer10Info : public SXAddl
public:
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
_INT32 citmGhostMax;
unsigned char bVerCacheLastRefresh;
......@@ -119,8 +141,8 @@ public:
class SXAddl_SXCCache_SXDVerSXMacro : public SXAddl
{
public:
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
unsigned char dwVer;
};
......@@ -134,11 +156,13 @@ class SXAddl_SXCCacheField_SXDIfdbMpMapCount: public SXAddl {};
class SXAddl_SXCCacheField_SXDProperty : public SXAddl {};
class SXAddl_SXCCacheField_SXDPropName : public SXAddl {};
class SXAddl_SXCCacheField_SXDSxrmitmCount : public SXAddl {};
class SXAddl_SXCCacheItem_SXDEnd : public SXAddl {};
class SXAddl_SXCCacheItem_SXDId : public SXAddl {};
class SXAddl_SXCCacheItem_SXDItmMpMapCount : public SXAddl {};
class SXAddl_SXCCacheItem_SXDItmMpropMap : public SXAddl {};
class SXAddl_SXCCacheItem_SXDSxrmitmDisp : public SXAddl {};
class SXAddl_SXCField12_SXDAutoshow : public SXAddl {};
class SXAddl_SXCField12_SXDEnd : public SXAddl {};
class SXAddl_SXCField12_SXDId : public SXAddl {};
......@@ -146,16 +170,20 @@ class SXAddl_SXCField12_SXDISXTH : public SXAddl {};
class SXAddl_SXCField12_SXDMemberCaption : public SXAddl {};
class SXAddl_SXCField12_SXDVer12Info : public SXAddl {};
class SXAddl_SXCField12_SXDVerUpdInv : public SXAddl {};
class SXAddl_SXCField_SXDEnd : public SXAddl {};
class SXAddl_SXCField_SXDId : public SXAddl {};
class SXAddl_SXCField_SXDVer10Info : public SXAddl {};
class SXAddl_SXCGroup_SXDEnd : public SXAddl {};
class SXAddl_SXCGroup_SXDGrpInfo : public SXAddl {};
class SXAddl_SXCGroup_SXDId : public SXAddl {};
class SXAddl_SXCGroup_SXDMember : public SXAddl {};
class SXAddl_SXCGrpLevel_SXDEnd : public SXAddl {};
class SXAddl_SXCGrpLevel_SXDGrpLevelInfo : public SXAddl {};
class SXAddl_SXCGrpLevel_SXDId : public SXAddl {};
class SXAddl_SXCHierarchy_SXDDisplayFolder : public SXAddl {};
class SXAddl_SXCHierarchy_SXDEnd : public SXAddl {};
class SXAddl_SXCHierarchy_SXDFilterMember : public SXAddl {};
......@@ -175,13 +203,16 @@ class SXAddl_SXCHierarchy_SXDProperty : public SXAddl {};
class SXAddl_SXCHierarchy_SXDSXSetParentUnique : public SXAddl {};
class SXAddl_SXCHierarchy_SXDUserCaption : public SXAddl {};
class SXAddl_SXCHierarchy_SXDVerUpdInv : public SXAddl {};
class SXAddl_SXCQsi_SXDEnd : public SXAddl {};
class SXAddl_SXCQsi_SXDId : public SXAddl {};
class SXAddl_SXCQuery_SXDEnd : public SXAddl {};
class SXAddl_SXCQuery_SXDReconnCond : public SXAddl {};
class SXAddl_SXCQuery_SXDSrcConnFile : public SXAddl {};
class SXAddl_SXCQuery_SXDSrcDataFile : public SXAddl {};
class SXAddl_SXCQuery_SXDXMLSource : public SXAddl {};
class SXAddl_SXCSXCondFmt_SXDEnd : public SXAddl {};
class SXAddl_SXCSXCondFmt_SXDSXCondFmt : public SXAddl {};
class SXAddl_SXCSXCondFmts_SXDEnd : public SXAddl {};
......@@ -189,10 +220,12 @@ class SXAddl_SXCSXCondFmts_SXDId : public SXAddl {};
class SXAddl_SXCSXDH_SXDEnd : public SXAddl {};
class SXAddl_SXCSXDH_SXDId : public SXAddl {};
class SXAddl_SXCSXDH_SXDSxdh : public SXAddl {};
class SXAddl_SXCSXfilt_SXDEnd : public SXAddl {};
class SXAddl_SXCSXfilt_SXDId : public SXAddl {};
class SXAddl_SXCSXfilt_SXDSXfilt : public SXAddl {};
class SXAddl_SXCSXfilt_SXDSXItm : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDCaption : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDEnd : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDId : public SXAddl {};
......@@ -205,21 +238,35 @@ class SXAddl_SXCSXFilter12_SXDXlsFilterValue1: public SXAddl {};
class SXAddl_SXCSXFilter12_SXDXlsFilterValue2: public SXAddl {};
class SXAddl_SXCSXFilters12_SXDEnd : public SXAddl {};
class SXAddl_SXCSXFilters12_SXDId : public SXAddl {};
class SXAddl_SXCSXMg_SXDEnd : public SXAddl {};
class SXAddl_SXCSXMg_SXDId : public SXAddl {};
class SXAddl_SXCSXMg_SXDUserCaption : public SXAddl {};
class SXAddl_SXCSXMgs_SXDEnd : public SXAddl {};
class SXAddl_SXCSXMgs_SXDId : public SXAddl {};
class SXAddl_SXCSXMgs_SXDMGrpSXDHMap : public SXAddl {};
class SXAddl_SXCSXrule_SXDEnd : public SXAddl {};
class SXAddl_SXCSXrule_SXDId : public SXAddl {};
class SXAddl_SXCSXrule_SXDSXrule : public SXAddl {};
class SXAddl_SXCView_SXDCalcMember : public SXAddl {};
class SXAddl_SXCView_SXDCalcMemString : public SXAddl {};
class SXAddl_SXCView_SXDCompactColHdr : public SXAddl {};
class SXAddl_SXCView_SXDCompactRwHdr : public SXAddl {};
class SXAddl_SXCView_SXDEnd : public SXAddl {};
class SXAddl_SXCView_SXDId : public SXAddl {};
class SXAddl_SXCView_SXDId : public SXAddl
{
public:
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
XLUnicodeStringSegmentedSXADDL stName;
};
class SXAddl_SXCView_SXDSXPIIvmb : public SXAddl {};
class SXAddl_SXCView_SXDTableStyleClient : public SXAddl {};
class SXAddl_SXCView_SXDVer10Info : public SXAddl {};
......
......@@ -52,9 +52,13 @@ BaseObjectPtr SXDI::clone()
void SXDI::readFields(CFRecord& record)
{
Log::error("SXDI record is not implemented.");
record >> isxvdData >> iiftab >> df >> isxvd >> isxvi >> ifmt >> cchName;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
if (cchName > 0 && cchName < 0xFFFF)
{
stName.setSize(cchName);
record >> stName;
}
}
} // namespace XLS
......
......@@ -32,12 +32,11 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
namespace XLS
{
// Logical representation of SXDI record in BIFF8
class SXDI: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXDI)
......@@ -47,11 +46,19 @@ public:
~SXDI();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXDI;
static const ElementType type = typeSXDI;
short isxvdData;
short iiftab;
short df;
short isxvd;
short isxvi;
unsigned short ifmt;
unsigned short cchName;
XLUnicodeStringNoCch stName;
};
} // namespace XLS
......
......@@ -44,17 +44,45 @@ SXLI::~SXLI()
{
}
BaseObjectPtr SXLI::clone()
{
return BaseObjectPtr(new SXLI(*this));
}
void SXLI::readFields(CFRecord& record)
{
Log::error("SXLI record is not implemented.");
{// 0 or 2 records SXLIItem
int size_item = (record.getDataSize() - record.getRdPtr()) / 2;
if (size_item < 8)
{
//??
return;
}
for (int k = 0; k < 2; k++)
{
SXLIItem item;
unsigned short flags;
record >> item.cSic >> item.itmType >> item.isxviMac >> flags;
item.fMultiDataName = GETBIT(flags, 0);
item.iData = GETBITS(flags, 1, 8);
item.fSbt = GETBIT(flags, 9);
item.fBlock = GETBIT(flags, 10);
item.fGrand = GETBIT(flags, 11);
item.fMultiDataOnAxis = GETBIT(flags, 12);
int count = (size_item - 8) / 2;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
for (int i = 0; i < count; i++)
{
short val; record >> val;
item.rgisxvi.push_back(val);
}
m_arItems.push_back(item);
}
}
} // namespace XLS
......
......@@ -35,9 +35,21 @@
namespace XLS
{
struct SXLIItem
{
short cSic;
unsigned short itmType;
short isxviMac;
bool fMultiDataName;
unsigned char iData;
bool fSbt;
bool fBlock;
bool fGrand;
bool fMultiDataOnAxis;
std::vector<short> rgisxvi;
};
// Logical representation of SXLI record in BIFF8
class SXLI: public BiffRecordContinued
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXLI)
......@@ -47,12 +59,12 @@ public:
~SXLI();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXLI;
static const ElementType type = typeSXLI;
std::vector<SXLIItem> m_arItems;
};
} // namespace XLS
......
......@@ -52,9 +52,15 @@ BaseObjectPtr SXPI::clone()
void SXPI::readFields(CFRecord& record)
{
Log::error("SXPI record is not implemented.");
int size = (record.getDataSize() - record.getRdPtr()) / sizeof(SXPI_Item);
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
for (int i = 0; i < size; i++)
{
SXPI_Item item;
record >> item.isxvd >> item.isxvi >> item.idObj;
m_arItems.push_back(item);
}
}
} // namespace XLS
......
......@@ -36,8 +36,13 @@
namespace XLS
{
struct SXPI_Item
{
short isxvd;
short isxvi;
short idObj;
};
// Logical representation of SXPI record in BIFF8
class SXPI: public BiffRecordContinued
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXPI)
......@@ -48,11 +53,11 @@ public:
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXPI;
static const ElementType type = typeSXPI;
std::vector<SXPI_Item> m_arItems;
};
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of SXPIEx record in BIFF8
class SXPIEx: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXPIEx)
......@@ -47,11 +45,10 @@ public:
~SXPIEx();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXPIEx;
static const ElementType type = typeSXPIEx;
};
} // namespace XLS
......
......@@ -53,9 +53,13 @@ BaseObjectPtr SXString::clone()
void SXString::readFields(CFRecord& record)
{
Log::error("SXString record is not implemented.");
record >> cch;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
if (cch > 0 && cch < 0xffff)
{
segment.setSize(cch);
record >> segment;
}
}
} // namespace XLS
......
......@@ -32,12 +32,11 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
namespace XLS
{
// Logical representation of SXString record in BIFF8
class SXString: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXString)
......@@ -47,11 +46,13 @@ public:
~SXString();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXString;
static const ElementType type = typeSXString;
unsigned short cch;
XLUnicodeStringNoCch segment;
};
} // namespace XLS
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of SXTBRGIITM record in BIFF8
class SXTBRGIITM: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXTBRGIITM)
......@@ -47,11 +45,10 @@ public:
~SXTBRGIITM();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXTBRGIITM;
static const ElementType type = typeSXTBRGIITM;
};
......
......@@ -39,12 +39,10 @@ SXTbl::SXTbl()
{
}
SXTbl::~SXTbl()
{
}
BaseObjectPtr SXTbl::clone()
{
return BaseObjectPtr(new SXTbl(*this));
......@@ -52,9 +50,10 @@ BaseObjectPtr SXTbl::clone()
void SXTbl::readFields(CFRecord& record)
{
Log::error("SXTbl record is not implemented.");
record >> cdref >> csxtbpg >> cPages;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
fAutoPage = GETBIT(cPages, 15);
cPages = GETBITS(cPages, 0, 14);
}
} // namespace XLS
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of SXTbl record in BIFF8
class SXTbl: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXTbl)
......@@ -47,11 +45,16 @@ public:
~SXTbl();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXTbl;
static const ElementType type = typeSXTbl;
unsigned short cdref;
unsigned short csxtbpg;
unsigned short cPages;
bool fAutoPage;
};
......
......@@ -39,12 +39,10 @@ SXVDEx::SXVDEx()
{
}
SXVDEx::~SXVDEx()
{
}
BaseObjectPtr SXVDEx::clone()
{
return BaseObjectPtr(new SXVDEx(*this));
......@@ -53,9 +51,40 @@ BaseObjectPtr SXVDEx::clone()
void SXVDEx::readFields(CFRecord& record)
{
Log::error("SXVDEx record is not implemented.");
unsigned short flags1;
unsigned char flags2;
record >> flags1 >> flags2 >> citmAutoShow >> isxdiAutoSort >> isxdiAutoShow >> ifmt;
fShowAllItems = GETBIT(flags1, 0);
fDragToRow = GETBIT(flags1, 1);
fDragToColumn = GETBIT(flags1, 2);
fDragToPage = GETBIT(flags1, 3);
fDragToHide = GETBIT(flags1, 4);
fNotDragToData = GETBIT(flags1, 5);
fServerBased = GETBIT(flags1, 7);
fAutoSort = GETBIT(flags1, 9);
fAscendSort = GETBIT(flags1, 10);
fAutoShow = GETBIT(flags1, 11);
fTopAutoShow = GETBIT(flags1, 12);
fCalculatedField = GETBIT(flags1, 13);
fPageBreaksBetweenItems = GETBIT(flags1, 14);
fHideNewItems = GETBIT(flags1, 15);
fOutline = GETBIT(flags2, 5);
fInsertBlankRow = GETBIT(flags2, 6);
fSubtotalAtTop = GETBIT(flags2, 7);
_UINT32 reserved1, reserved2;
record >> cchSubName >> reserved1 >> reserved2;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
if (cchSubName > 0 && cchSubName < 0xffff)
{
stSubName.setSize(cchSubName);
record >> stSubName;
}
}
} // namespace XLS
......
......@@ -32,12 +32,11 @@
#pragma once
#include "BiffRecordContinued.h"
#include "../Biff_structures/BiffString.h"
namespace XLS
{
// Logical representation of SXVDEx record in BIFF8
class SXVDEx: public BiffRecordContinued
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXVDEx)
......@@ -47,11 +46,35 @@ public:
~SXVDEx();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXVDEx;
static const ElementType type = typeSXVDEx;
bool fShowAllItems;
bool fDragToRow;
bool fDragToColumn;
bool fDragToPage;
bool fDragToHide;
bool fNotDragToData;
bool fServerBased;
bool fAutoSort;
bool fAscendSort;
bool fAutoShow;
bool fTopAutoShow;
bool fCalculatedField;
bool fPageBreaksBetweenItems;
bool fHideNewItems;
bool fOutline;
bool fInsertBlankRow;
bool fSubtotalAtTop;
unsigned char citmAutoShow;
short isxdiAutoSort;
short isxdiAutoShow;
unsigned short ifmt;
unsigned short cchSubName;
XLUnicodeStringNoCch stSubName;
};
......
......@@ -52,9 +52,20 @@ BaseObjectPtr SXVI::clone()
void SXVI::readFields(CFRecord& record)
{
Log::error("SXVI record is not implemented.");
unsigned short flags;
record >> itmType>> flags >> iCache >> cchName;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
fHidden = GETBIT(flags, 0);
fHideDetail = GETBIT(flags, 1);
fFormula = GETBIT(flags, 4);
fMissing = GETBIT(flags, 5);
if (cchName > 0 && cchName < 0xFFFF)
{
stName.setSize(cchName);
stName.load(record);
}
}
} // namespace XLS
......
......@@ -32,12 +32,10 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
namespace XLS
{
// Logical representation of SXVI record in BIFF8
class SXVI: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXVI)
......@@ -47,12 +45,34 @@ public:
~SXVI();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXVI;
static const ElementType type = typeSXVI;
unsigned short itmType; //enum
//0x0000 itmtypeData
//0x0001 itmtypeDEFAULT
//0x0002 itmtypeSUM
//0x0003 itmtypeCOUNTA
//0x0004 itmtypeAVERAGE
//0x0005 itmtypeMAX
//0x0006 itmtypeMIN
//0x0007 itmtypePRODUCT
//0x0008 itmtypeCOUNT
//0x0009 itmtypeSTDEV
//0x000A itmtypeSTDEVP
//0x000B itmtypeVAR
//0x000C itmtypeVARP
bool fHidden;
bool fHideDetail;
bool fFormula;
bool fMissing;
short iCache;
unsigned short cchName;
XLUnicodeStringNoCch stName;
};
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of SXVS record in BIFF8
class SXVS: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXVS)
......@@ -50,7 +48,7 @@ public:
void readFields(CFRecord& record);
static const ElementType type = typeSXVS;
static const ElementType type = typeSXVS;
short sxvs;
......
......@@ -37,8 +37,6 @@
namespace XLS
{
// Logical representation of SXViewEx record in BIFF8
class SXViewEx: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXViewEx)
......
......@@ -39,7 +39,6 @@ SXViewEx9::SXViewEx9()
{
}
SXViewEx9::~SXViewEx9()
{
}
......@@ -53,9 +52,16 @@ BaseObjectPtr SXViewEx9::clone()
void SXViewEx9::readFields(CFRecord& record)
{
Log::error("SXViewEx9 record is not implemented.");
unsigned short flags;
_UINT32 reserved3, flags2;
record >> rt >> flags >> reserved3 >> flags2 >> itblAutoFmt >> chGrand;
fFrtAlert = GETBIT(flags, 1);
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
fPrintTitles = GETBIT(flags2, 1);
fLineMode = GETBIT(flags2, 2);
fRepeatItemsOnEachPrintedPage = GETBIT(flags2, 5);
}
} // namespace XLS
......
......@@ -32,12 +32,11 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
namespace XLS
{
// Logical representation of SXViewEx9 record in BIFF8
class SXViewEx9: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXViewEx9)
......@@ -47,11 +46,18 @@ public:
~SXViewEx9();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXViewEx9;
static const ElementType type = typeSXViewEx9;
unsigned short rt;
bool fFrtAlert;
bool fPrintTitles;
bool fLineMode;
bool fRepeatItemsOnEachPrintedPage;
unsigned short itblAutoFmt;
XLUnicodeString chGrand;
};
......
......@@ -52,9 +52,15 @@ BaseObjectPtr SXViewLink::clone()
void SXViewLink::readFields(CFRecord& record)
{
Log::error("SXViewLink record is not implemented.");
unsigned short unused, reserved;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
record >> rt >> unused >> reserved >> cch;
if (cch > 0 && cch < 0xff)
{
stPivotTable.setSize(cch);
record >> stPivotTable;
}
}
} // namespace XLS
......
......@@ -32,12 +32,11 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
namespace XLS
{
// Logical representation of SXViewLink record in BIFF8
class SXViewLink: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXViewLink)
......@@ -47,13 +46,14 @@ public:
~SXViewLink();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXViewLink;
static const ElementType type = typeSXViewLink;
unsigned short rt;
unsigned char cch;
XLUnicodeStringNoCch stPivotTable;
};
......
......@@ -38,8 +38,6 @@
namespace XLS
{
// Logical representation of SortData record in BIFF8
class SortData: public BiffRecordContinued
{
BIFF_RECORD_DEFINE_TYPE_INFO(SortData)
......@@ -49,11 +47,10 @@ public:
~SortData();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSortData;
static const ElementType type = typeSortData;
bool fCol;
bool fCaseSensitive;
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of SxFormat record in BIFF8
class SxFormat: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SxFormat)
......@@ -47,11 +45,10 @@ public:
~SxFormat();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSxFormat;
static const ElementType type = typeSxFormat;
};
} // namespace XLS
......
......@@ -39,12 +39,10 @@ SxRule::SxRule()
{
}
SxRule::~SxRule()
{
}
BaseObjectPtr SxRule::clone()
{
return BaseObjectPtr(new SxRule(*this));
......@@ -53,9 +51,22 @@ BaseObjectPtr SxRule::clone()
void SxRule::readFields(CFRecord& record)
{
Log::error("SxRule record is not implemented.");
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
unsigned short flags, reserved;
record >> iDim >> isxvd >> flags >> reserved >> csxFilt >> irwFirst >> irwLast >> icolFirst >> icolLast;
sxaxisRw = GETBIT(flags, 0);
sxaxisCol = GETBIT(flags, 1);
sxaxisPage = GETBIT(flags, 2);
sxaxisData = GETBIT(flags, 3);
sxrType = GETBITS(flags, 4, 7);
fPart = GETBIT(flags, 8);
fDataOnly = GETBIT(flags, 9);
fLabelOnly = GETBIT(flags, 10);
fGrandRw = GETBIT(flags, 11);
fGrandCol = GETBIT(flags, 12);
fGrandRwSav = GETBIT(flags, 13);
fCacheBased = GETBIT(flags, 14);
fGrandColSav = GETBIT(flags, 15);
}
} // namespace XLS
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of SxRule record in BIFF8
class SxRule: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SxRule)
......@@ -50,7 +48,29 @@ public:
void readFields(CFRecord& record);
static const ElementType type = typeSxRule;
static const ElementType type = typeSxRule;
unsigned char iDim;
unsigned char isxvd;
bool sxaxisRw;
bool sxaxisCol;
bool sxaxisPage;
bool sxaxisData;
unsigned char sxrType;
bool fPart;
bool fDataOnly;
bool fLabelOnly;
bool fGrandRw;
bool fGrandCol;
bool fGrandRwSav;
bool fCacheBased;
bool fGrandColSav;
unsigned short csxFilt;
unsigned char irwFirst;
unsigned char irwLast;
unsigned char icolFirst;
unsigned char icolLast;
};
} // namespace XLS
......
......@@ -53,9 +53,18 @@ BaseObjectPtr SxSelect::clone()
void SxSelect::readFields(CFRecord& record)
{
Log::error("SxSelect record is not implemented.");
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
short reserved1, flags;
unsigned char reserved2;
record >> reserved1 >> pnn >> reserved2 >> sxaxisAct >> iDimAct >> iLiStart >> iLiAct >> iLiMin >> iLiMax;
record >> rwClick >> colClick >> rwClickPrev >> colClickPrev >> flags;
cClick = GETBITS(flags, 0, 4);
fLabelOnly = GETBIT(flags, 5);
fDataOnly = GETBIT(flags, 6);
fToggleDataHeader = GETBIT(flags, 7);
fSelectionClick = GETBIT(flags, 8);
fExtendable = GETBIT(flags, 9);
}
} // namespace XLS
......
......@@ -32,12 +32,11 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/SxAxis.h"
namespace XLS
{
// Logical representation of SxSelect record in BIFF8
class SxSelect: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SxSelect)
......@@ -51,6 +50,26 @@ public:
void readFields(CFRecord& record);
static const ElementType type = typeSxSelect;
unsigned char pnn; //enum PaneType
SXAxis sxaxisAct;
unsigned short iDimAct;
unsigned short iLiStart;
unsigned short iLiAct;
unsigned short iLiMin;
unsigned short iLiMax;
RwU rwClick;
ColU colClick;
RwU rwClickPrev;
ColU colClickPrev;
unsigned char cClick;
bool fLabelOnly;
bool fDataOnly;
bool fToggleDataHeader;
bool fSelectionClick;
bool fExtendable;
};
} // namespace XLS
......
......@@ -34,21 +34,7 @@
namespace XLS
{
BiffStructurePtr SXAxis::clone()
{
return BiffStructurePtr(new SXAxis(*this));
}
void SXAxis::load(CFRecord& record)
{
unsigned short flags;
record >> flags;
bRw = GETBIT(flags, 0);
bCol = GETBIT(flags, 1);
bPage = GETBIT(flags, 2);
bData = GETBIT(flags, 3);
}
BaseObjectPtr SxView::clone()
{
return BaseObjectPtr(new SxView(*this));
......
......@@ -34,29 +34,10 @@
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
#include "../Biff_structures/CellRangeRef.h"
#include "../Biff_structures/SxAxis.h"
namespace XLS
{
class SXAxis : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAxis)
public:
SXAxis(){}
~SXAxis(){}
BiffStructurePtr clone();
virtual void load(CFRecord& record);
static const ElementType type = typeSXAxis;
bool bRw;
bool bCol;
bool bPage;
bool bData;
};
class SxView: public BiffRecord
{
......
......@@ -31,7 +31,9 @@
*/
#pragma once
#include "SxView.h"
#include "BiffRecord.h"
#include "../Biff_structures/SxAxis.h"
#include "../Biff_structures/BiffString.h"
namespace XLS
{
......
......@@ -103,8 +103,10 @@ void Window2::readFields(CFRecord& record)
if (10 > record.getDataSize())
{
record >> wScaleSLV >> wScaleNormal;
record.skipNunBytes(4); // unused / reserved
}
int sz = record.getDataSize() - record.getRdPtr();
record.skipNunBytes(sz); // unused / reserved
}
......
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "SxAxis.h"
namespace XLS
{
BiffStructurePtr SXAxis::clone()
{
return BiffStructurePtr(new SXAxis(*this));
}
void SXAxis::load(CFRecord& record)
{
unsigned short flags;
record >> flags;
bRw = GETBIT(flags, 0);
bCol = GETBIT(flags, 1);
bPage = GETBIT(flags, 2);
bData = GETBIT(flags, 3);
}
} // namespace XLS
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "BiffStructure.h"
namespace XLS
{
class SXAxis : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAxis)
public:
SXAxis(){}
~SXAxis(){}
BiffStructurePtr clone();
virtual void load(CFRecord& record);
static const ElementType type = typeSXAxis;
bool bRw;
bool bCol;
bool bPage;
bool bData;
};
} // namespace XLS
......@@ -58,11 +58,15 @@ BaseObjectPtr PIVOTADDL::clone()
/*
PIVOTADDL = SXAddl_SXCView_SXDId *Continue_SxaddlSxString [SXAddl_SXCView_SXDVer10Info]
PIVOTADDL = SXAddl_SXCView_SXDId *Continue_SxaddlSxString
[SXAddl_SXCView_SXDVer10Info]
[SXAddl_SXCView_SXDVer12Info] *SXADDLCALCMEMBER *SXADDLHIERARCHY *SXADDLFIELD *UNKNOWNFRT
[SXAddl_SXCView_SXDTableStyleClient] [SXAddl_SXCView_SXDCompactRwHdr *Continue_SxaddlSxString]
[SXAddl_SXCView_SXDCompactColHdr *Continue_SxaddlSxString] [SXAddl_SXCView_SXDVerUpdInv]
[SXADDLCONDFMTS] [SXADDLSXFILTERS12] *SXAddl_SXCView_SXDVerUpdInv *SXAddl_SXCView_SXDSXPIIvmb
[SXAddl_SXCView_SXDTableStyleClient]
[SXAddl_SXCView_SXDCompactRwHdr *Continue_SxaddlSxString]
[SXAddl_SXCView_SXDCompactColHdr *Continue_SxaddlSxString]
[SXAddl_SXCView_SXDVerUpdInv]
[SXADDLCONDFMTS]
[SXADDLSXFILTERS12] *SXAddl_SXCView_SXDVerUpdInv *SXAddl_SXCView_SXDSXPIIvmb
[SXAddl_SXCView_SXDVerUpdInv] SXAddl_SXCView_SXDEnd
*/
const bool PIVOTADDL::loadContent(BinProcessor& proc)
......@@ -71,50 +75,102 @@ const bool PIVOTADDL::loadContent(BinProcessor& proc)
{
return false;
}
int count = 0;
m_SXAddl_SXCView_SXDId = elements_.back();
elements_.pop_back();
count = proc.repeated<Continue_SxaddlSxString>(0, 0);
int count = proc.repeated<Continue_SxaddlSxString>(0, 0);
if (proc.optional<SXAddl_SXCView_SXDVer10Info>())
{
m_SXAddl_SXCView_SXDVer10Info = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXAddl_SXCView_SXDVer12Info>())
{
m_SXAddl_SXCView_SXDVer12Info = elements_.back();
elements_.pop_back();
}
count = proc.repeated<SXADDLCALCMEMBER>(0, 0);
while(count > 0)
{
m_arSXADDLCALCMEMBER.push_back(elements_.front());
elements_.pop_front(); count--;
}
count = proc.repeated<SXADDLHIERARCHY>(0, 0);
while(count > 0)
{
m_arSXADDLHIERARCHY.push_back(elements_.front());
elements_.pop_front(); count--;
}
count = proc.repeated<SXADDLFIELD>(0, 0);
while(count > 0)
{
m_arSXADDLFIELD.push_back(elements_.front());
elements_.pop_front(); count--;
}
count = proc.repeated<UNKNOWNFRT>(0, 0);
if (proc.optional<SXAddl_SXCView_SXDTableStyleClient>())
{
m_SXAddl_SXCView_SXDTableStyleClient = elements_.back();
elements_.pop_back();
}
if(proc.optional<SXAddl_SXCView_SXDCompactRwHdr>())
{
m_SXAddl_SXCView_SXDCompactRwHdr = elements_.back();
elements_.pop_back();
count = proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCView_SXDCompactColHdr>())
{
m_SXAddl_SXCView_SXDCompactColHdr = elements_.back();
elements_.pop_back();
count = proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if (proc.optional<SXAddl_SXCView_SXDVerUpdInv>())
{
m_arSXAddl_SXCView_SXDVerUpdInv.push_back(elements_.back());
elements_.pop_back();
}
if (proc.optional<SXADDLCONDFMTS>())
{
m_SXADDLCONDFMTS = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXADDLSXFILTERS12>())
{
m_SXAddl_SXADDLSXFILTERS12 = elements_.back();
elements_.pop_back();
}
count = proc.repeated<SXAddl_SXCView_SXDVerUpdInv>(0, 0);
while(count > 0)
{
m_arSXAddl_SXCView_SXDVerUpdInv.push_back(elements_.front());
elements_.pop_front(); count--;
}
count = proc.repeated<SXAddl_SXCView_SXDSXPIIvmb>(0, 0);
while(count > 0)
{
m_arSXAddl_SXCView_SXDSXPIIvmb.push_back(elements_.front());
elements_.pop_front(); count--;
}
if (proc.optional<SXAddl_SXCView_SXDVerUpdInv>())
{
m_arSXAddl_SXCView_SXDVerUpdInv.push_back(elements_.front());
elements_.pop_front();
}
if (proc.mandatory<SXAddl_SXCView_SXDEnd>())
if (proc.optional<SXAddl_SXCView_SXDEnd>())
{
elements_.pop_back();
}
return true;
}
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of PIVOTADDL union of records
class PIVOTADDL: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTADDL)
......@@ -49,7 +47,24 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTADDL;
static const ElementType type = typePIVOTADDL;
BaseObjectPtr m_SXAddl_SXCView_SXDId;
BaseObjectPtr m_SXAddl_SXCView_SXDVer10Info;
BaseObjectPtr m_SXAddl_SXCView_SXDVer12Info;
BaseObjectPtr m_SXAddl_SXCView_SXDCompactRwHdr;
BaseObjectPtr m_SXAddl_SXCView_SXDCompactColHdr;
BaseObjectPtr m_SXAddl_SXADDLSXFILTERS12;
BaseObjectPtr m_SXADDLCONDFMTS;
BaseObjectPtr m_SXAddl_SXCView_SXDTableStyleClient;
std::vector<BaseObjectPtr> m_arSXAddl_SXCView_SXDVerUpdInv;
std::vector<BaseObjectPtr> m_arSXAddl_SXCView_SXDSXPIIvmb;
std::vector<BaseObjectPtr> m_arSXADDLFIELD;
std::vector<BaseObjectPtr> m_arSXADDLHIERARCHY;
std::vector<BaseObjectPtr> m_arSXADDLCALCMEMBER;
};
} // namespace XLS
......
......@@ -61,6 +61,9 @@ const bool PIVOTPI::loadContent(BinProcessor& proc)
{
return false;
}
m_SXPI = elements_.back();
elements_.pop_back();
proc.repeated<Continue>(0, 0);
return true;
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of PIVOTPI union of records
class PIVOTPI: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTPI)
......@@ -49,7 +47,9 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTPI;
static const ElementType type = typePIVOTPI;
BaseObjectPtr m_SXPI;
};
} // namespace XLS
......
......@@ -61,8 +61,13 @@ const bool PIVOTSELECT::loadContent(BinProcessor& proc)
{
return false;
}
m_SxSelect = elements_.back();
elements_.pop_back();
if (proc.mandatory<PIVOTRULE>())
{
m_PIVOTRULE = elements_.back();
elements_.pop_back();
}
return true;
......
......@@ -50,6 +50,9 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTSELECT;
BaseObjectPtr m_SxSelect;
BaseObjectPtr m_PIVOTRULE;
};
} // namespace XLS
......
......@@ -67,7 +67,7 @@ const bool SXADDLCACHE::loadContent(BinProcessor& proc)
m_SXCCache_SXDId = elements_.back();
elements_.pop_back();
if (proc.mandatory<SXAddl_SXCCache_SXDVer10Info>())
if (proc.optional<SXAddl_SXCCache_SXDVer10Info>())
{
m_SXDVer10Info = elements_.back();
elements_.pop_back();
......@@ -79,13 +79,17 @@ const bool SXADDLCACHE::loadContent(BinProcessor& proc)
}
if (proc.optional<SXADDLCACHE12>())
{
m_SXADDLCACHE12 = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXADDLDBQUERY>())
{
m_SXADDLDBQUERY = elements_.back();
elements_.pop_back();
}
int count = proc.repeated<UNKNOWNFRT>(0, 0);
if (proc.mandatory<SXAddl_SXCCache_SXDEnd>())
if (proc.optional<SXAddl_SXCCache_SXDEnd>())
{
elements_.pop_back();
}
......
......@@ -52,6 +52,8 @@ public:
BaseObjectPtr m_SXCCache_SXDId;
BaseObjectPtr m_SXDVer10Info;
BaseObjectPtr m_SXDVerSXMacro;
BaseObjectPtr m_SXADDLDBQUERY;
BaseObjectPtr m_SXADDLCACHE12;
};
......
......@@ -60,28 +60,44 @@ BaseObjectPtr SXADDLCACHE12::clone()
// *SXADDLCACHEFIELD [SXADDLSXDH] [SXADDLSXMGS] SXAddl_SXCCache_SXDVerUpdInv
const bool SXADDLCACHE12::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCCache_SXDVerUpdInv>())
{
return false;
}
if (proc.mandatory<SXAddl_SXCCache_SXDInfo12>())
m_SXAddl_SXCCache_SXDVerUpdInv = elements_.back();
elements_.pop_back();
if (proc.optional<SXAddl_SXCCache_SXDInfo12>())
{
m_SXAddl_SXCCache_SXDInfo12 = elements_.back();
elements_.pop_back();
}
if (proc.mandatory<SXAddl_SXCCache_SXDInvRefreshReal>())
if (proc.optional<SXAddl_SXCCache_SXDInvRefreshReal>())
{
m_SXAddl_SXCCache_SXDInvRefreshReal = elements_.back();
elements_.pop_back();
}
int count = proc.repeated<SXADDLCACHEFIELD>(0, 0);
int count = proc.repeated<SXADDLCACHEFIELD>(0, 0);
while(count > 0)
{
m_arSXADDLCACHEFIELD.push_back(elements_.front());
elements_.pop_front(); count--;
}
if (proc.optional<SXADDLSXDH>())
{
m_SXADDLSXDH = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXADDLSXMGS>())
{
m_SXADDLSXMGS = elements_.back();
elements_.pop_back();
}
if (proc.mandatory<SXAddl_SXCCache_SXDVerUpdInv>())
if (proc.optional<SXAddl_SXCCache_SXDVerUpdInv>())
{
m_SXAddl_SXCCache_SXDVerUpdInvS = elements_.back();
elements_.pop_back();
}
return true;
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of SXADDLCACHE12 union of records
class SXADDLCACHE12: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(SXADDLCACHE12)
......@@ -50,7 +48,15 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typeSXADDLCACHE12;
BaseObjectPtr m_SXAddl_SXCCache_SXDVerUpdInv;
BaseObjectPtr m_SXAddl_SXCCache_SXDVerUpdInvS;
BaseObjectPtr m_SXADDLSXMGS;
BaseObjectPtr m_SXADDLSXDH;
BaseObjectPtr m_SXAddl_SXCCache_SXDInfo12;
BaseObjectPtr m_SXAddl_SXCCache_SXDInvRefreshReal;
std::vector<BaseObjectPtr> m_arSXADDLCACHEFIELD;
};
} // namespace XLS
......
......@@ -180,7 +180,7 @@ const bool SXADDLCACHEFIELD::loadContent(BinProcessor& proc)
proc.optional<Parenthesis_SXADDLCACHEFIELD_2>();
proc.optional<Parenthesis_SXADDLCACHEFIELD_4>();
proc.optional<Parenthesis_SXADDLCACHEFIELD_5>();
proc.mandatory<SXAddl_SXCCacheField_SXDEnd>();
proc.optional<SXAddl_SXCCacheField_SXDEnd>();
return true;
}
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of SXADDLCACHEFIELD union of records
class SXADDLCACHEFIELD: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(SXADDLCACHEFIELD)
......
......@@ -56,16 +56,13 @@ BaseObjectPtr SXADDLCALCMEMBER::clone()
// SXADDLCALCMEMBER = (SXAddl_SXCView_SXDCalcMember [SXAddl_SXCView_SXDCalcMemString *Continue_SxaddlSxString])
const bool SXADDLCALCMEMBER::loadContent(BinProcessor& proc)
{
#pragma message("####################### SXADDLCALCMEMBER union is not implemented")
Log::info("SXADDLCALCMEMBER union is not implemented!!!!!!!!!!!!!!!");
if(!proc.mandatory<SXAddl_SXCView_SXDCalcMember>())
{
return false;
}
if(proc.optional<SXAddl_SXCView_SXDCalcMemString>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
int count = proc.repeated<Continue_SxaddlSxString>(0, 0);
}
return true;
......
......@@ -62,7 +62,7 @@ const bool SXADDLCONDFMTS::loadContent(BinProcessor& proc)
return false;
}
proc.repeated<SXADDLCONDFMT>(0, 0);
proc.mandatory<SXAddl_SXCSXCondFmts_SXDEnd>();
proc.optional<SXAddl_SXCSXCondFmts_SXDEnd>();
return true;
}
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of SXADDLCONDFMTS union of records
class SXADDLCONDFMTS: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(SXADDLCONDFMTS)
......@@ -50,7 +48,6 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typeSXADDLCONDFMTS;
};
......
......@@ -61,22 +61,41 @@ SXADDLDBQUERY = [SXAddl_SXCQuery_SXDXMLSource *Continue_SxaddlSxString]
*/
const bool SXADDLDBQUERY::loadContent(BinProcessor& proc)
{
int count = 0;
if(proc.optional<SXAddl_SXCQuery_SXDXMLSource>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
m_XMLSource = elements_.back();
elements_.pop_back();
count = proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCQuery_SXDSrcDataFile>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
m_SrcDataFile = elements_.back();
elements_.pop_back();
count = proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCQuery_SXDSrcConnFile>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
m_SrcConnFile = elements_.back();
elements_.pop_back();
count = proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCQuery_SXDReconnCond>())
{
m_ReconnCond = elements_.back();
elements_.pop_back();
}
if(proc.mandatory<SXAddl_SXCQuery_SXDEnd>())
{
elements_.pop_back();
}
proc.optional<SXAddl_SXCQuery_SXDReconnCond>();
proc.mandatory<SXAddl_SXCQuery_SXDEnd>();
return true;
return m_XMLSource || m_SrcConnFile || m_SrcDataFile || m_ReconnCond;
}
} // namespace XLS
......
......@@ -50,6 +50,12 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typeSXADDLDBQUERY;
BaseObjectPtr m_SrcConnFile;
BaseObjectPtr m_SrcDataFile;
BaseObjectPtr m_XMLSource;
BaseObjectPtr m_ReconnCond;
};
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of SXSRC union of records
class SXSRC: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(SXSRC)
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of SXTBL union of records
class SXTBL: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(SXTBL)
......@@ -49,7 +47,7 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typeSXTBL;
static const ElementType type = typeSXTBL;
};
......
......@@ -161,7 +161,7 @@ const bool WorkbookStreamObject::loadContent(BinProcessor& proc)
Log::warning("WARNING: Substream of unsupported type " + STR::int2str(substream_type, 10) +
" The substream is skipped! Sorry.");
proc.SeekToEOF();
proc.mandatory<EOF_T>();
proc.optional<EOF_T>();
}
}
......
......@@ -294,6 +294,7 @@ enum ElementType
typeStyleExt,
typeSupBook,
typeSurf,
typeStringSegmentedSXADDL,
typeSXAddl,
typeSXDI,
typeSxDXF,
......
......@@ -4681,6 +4681,14 @@
RelativePath="..\XlsFormat\Logic\Biff_structures\StyleXF.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\SxAxis.cpp"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\SxAxis.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\SyntaxPtg.cpp"
>
......
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