Commit 09e6d3f7 authored by ElenaSubbotina's avatar ElenaSubbotina

XlsFormat - read pivot table records

parent 90d8055b
...@@ -49,7 +49,6 @@ public: ...@@ -49,7 +49,6 @@ public:
BaseObjectPtr clone(); BaseObjectPtr clone();
void readFields(CFRecord& record); void readFields(CFRecord& record);
static const ElementType type = typeAutoFilter; static const ElementType type = typeAutoFilter;
......
...@@ -37,6 +37,8 @@ namespace XLS ...@@ -37,6 +37,8 @@ namespace XLS
DConRef::DConRef() DConRef::DConRef()
{ {
bFilePath = false;
bSheetName = false;
} }
...@@ -52,10 +54,33 @@ BaseObjectPtr DConRef::clone() ...@@ -52,10 +54,33 @@ BaseObjectPtr DConRef::clone()
void DConRef::readFields(CFRecord& record) void DConRef::readFields(CFRecord& record)
{ {
#pragma message("####################### DConRef record is not implemented") record >> ref >> cchFile;
Log::error("DConRef record is not implemented.");
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); if (cchFile > 1)
{
XLUnicodeStringNoCch stFile_;
stFile_.setSize(cchFile);
record >> stFile_;
//dcon-file = external-virt-path / self-reference
//external-virt-path = volume / unc-volume / rel-volume / transfer-protocol / startup / alt-startup / library / simple-file-path-dcon
//simple-file-path-dcon = %x0001 file-path
//self-reference = %x0002 sheet-name
stFile = stFile_.value();
if (stFile.substr(0, 1) == L"\x0001")
{
bFilePath = true;
stFile = stFile.substr(1);
}
else if (stFile.substr(0, 1) == L"\x0002")
{
bSheetName = true;
stFile = stFile.substr(1);
}
}
int unused = record.getDataSize() - record.getRdPtr();
record.skipNunBytes(unused);
} }
} // namespace XLS } // namespace XLS
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
*/ */
#include "EndObject.h" #include "EndObject.h"
#include <Logic/Biff_structures/FrtHeaderOld.h> #include "../Biff_structures/FrtHeaderOld.h"
namespace XLS namespace XLS
{ {
......
...@@ -54,7 +54,7 @@ void MTRSettings::readFields(CFRecord& record) ...@@ -54,7 +54,7 @@ void MTRSettings::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
_UINT32 temp1, temp2; _UINT32 temp1, temp2;
#pragma message("############################ frtHeader skipped here")
record >> temp1 >> temp2 >> cUserThreadCount; record >> temp1 >> temp2 >> cUserThreadCount;
fMTREnabled = temp1; fMTREnabled = temp1;
......
...@@ -52,9 +52,9 @@ BaseObjectPtr OleDbConn::clone() ...@@ -52,9 +52,9 @@ BaseObjectPtr OleDbConn::clone()
void OleDbConn::readFields(CFRecord& record) void OleDbConn::readFields(CFRecord& record)
{ {
#pragma message("####################### OleDbConn record is not implemented")
Log::error("OleDbConn record is not implemented."); Log::error("OleDbConn record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
} // namespace XLS } // namespace XLS
......
...@@ -53,9 +53,8 @@ BaseObjectPtr PicF::clone() ...@@ -53,9 +53,8 @@ BaseObjectPtr PicF::clone()
void PicF::readFields(CFRecord& record) void PicF::readFields(CFRecord& record)
{ {
#pragma message("####################### PicF record is not implemented")
Log::error("PicF record is not implemented."); Log::error("PicF record is not implemented.");
//record >> some_value; record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
} // namespace XLS } // namespace XLS
......
...@@ -52,9 +52,8 @@ BaseObjectPtr PivotChartBits::clone() ...@@ -52,9 +52,8 @@ BaseObjectPtr PivotChartBits::clone()
void PivotChartBits::readFields(CFRecord& record) void PivotChartBits::readFields(CFRecord& record)
{ {
#pragma message("####################### PivotChartBits record is not implemented")
Log::error("PivotChartBits record is not implemented."); Log::error("PivotChartBits record is not implemented.");
//record >> some_value; record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
} // namespace XLS } // namespace XLS
......
...@@ -52,9 +52,9 @@ BaseObjectPtr Qsi::clone() ...@@ -52,9 +52,9 @@ BaseObjectPtr Qsi::clone()
void Qsi::readFields(CFRecord& record) void Qsi::readFields(CFRecord& record)
{ {
#pragma message("####################### Qsi record is not implemented")
Log::error("Qsi record is not implemented."); Log::error("Qsi record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
} // namespace XLS } // namespace XLS
......
...@@ -52,9 +52,22 @@ BaseObjectPtr QsiSXTag::clone() ...@@ -52,9 +52,22 @@ BaseObjectPtr QsiSXTag::clone()
void QsiSXTag::readFields(CFRecord& record) void QsiSXTag::readFields(CFRecord& record)
{ {
#pragma message("####################### QsiSXTag record is not implemented") unsigned char reserved1;
Log::error("QsiSXTag record is not implemented."); unsigned short flags, reserved2;
//record >> some_value;
record >> frtHeaderOld >> fSx >> flags;
fEnableRefresh = GETBIT(flags, 0);
fInvalid = GETBIT(flags, 1);
fTensorEx = GETBIT(flags, 2);
record >> dwQsiFuture >> verSxLastUpdated >> verSxUpdatableMin >> obCchName >> reserved1;
record >> stName;
record >> reserved2;
int skip = record.getDataSize() - record.getRdPtr();
record.skipNunBytes(skip);
} }
} // namespace XLS } // namespace XLS
......
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
#pragma once #pragma once
#include "BiffRecord.h" #include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
#include "../Biff_structures/FrtHeaderOld.h"
namespace XLS namespace XLS
{ {
// Logical representation of QsiSXTag record in BIFF8
class QsiSXTag: public BiffRecord class QsiSXTag: public BiffRecord
{ {
BIFF_RECORD_DEFINE_TYPE_INFO(QsiSXTag) BIFF_RECORD_DEFINE_TYPE_INFO(QsiSXTag)
...@@ -48,11 +48,23 @@ public: ...@@ -48,11 +48,23 @@ public:
BaseObjectPtr clone(); BaseObjectPtr clone();
void readFields(CFRecord& record); void readFields(CFRecord& record);
static const ElementType type = typeQsiSXTag; static const ElementType type = typeQsiSXTag;
FrtHeaderOld frtHeaderOld;
unsigned short fSx;
bool fEnableRefresh;
bool fInvalid;
bool fTensorEx;
_UINT32 dwQsiFuture;
unsigned char verSxLastUpdated;
unsigned char verSxUpdatableMin;
unsigned char obCchName;
XLUnicodeString stName;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -52,9 +52,8 @@ BaseObjectPtr Qsif::clone() ...@@ -52,9 +52,8 @@ BaseObjectPtr Qsif::clone()
void Qsif::readFields(CFRecord& record) void Qsif::readFields(CFRecord& record)
{ {
#pragma message("####################### Qsif record is not implemented")
Log::error("Qsif record is not implemented."); Log::error("Qsif record is not implemented.");
//record >> some_value; record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
} // namespace XLS } // namespace XLS
......
...@@ -53,9 +53,9 @@ BaseObjectPtr RRSort::clone() ...@@ -53,9 +53,9 @@ BaseObjectPtr RRSort::clone()
void RRSort::readFields(CFRecord& record) void RRSort::readFields(CFRecord& record)
{ {
#pragma message("####################### RRSort record is not implemented")
Log::error("RRSort record is not implemented."); Log::error("RRSort record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
} // namespace XLS } // namespace XLS
......
...@@ -83,7 +83,7 @@ int SST::serialize(std::wostream & stream) ...@@ -83,7 +83,7 @@ int SST::serialize(std::wostream & stream)
{ {
CP_XML_WRITER(stream) CP_XML_WRITER(stream)
{ {
for (int i=0; i < rgb.size(); i++) for (size_t i=0; i < rgb.size(); i++)
{ {
XLUnicodeRichExtendedString *richText = dynamic_cast<XLUnicodeRichExtendedString *>(rgb[i].get()); XLUnicodeRichExtendedString *richText = dynamic_cast<XLUnicodeRichExtendedString *>(rgb[i].get());
......
...@@ -52,11 +52,66 @@ BaseObjectPtr SXAddl::clone() ...@@ -52,11 +52,66 @@ BaseObjectPtr SXAddl::clone()
void SXAddl::readFields(CFRecord& record) void SXAddl::readFields(CFRecord& record)
{ {
#pragma message("####################### SXAddl record is not implemented") m_SXAddlHdr.load(record);
//Log::error("SXAddl record is not implemented.");
//record >> some_value; Log::error("SXAddl record is not implemented.");
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
//-------------------------------------------------------------------------------------------------------
void SXAddl_SXCCache_SXDId::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
short reserved;
record >> idCache >> reserved;
}
void SXAddl_SXCCache_SXDEnd::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
_UINT32 reserved1;
short reserved2;
record >> reserved1 >> reserved2;
}
void SXAddl_SXCCache_SXDVer10Info::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
_UINT32 reserved1;
short reserved2;
record >> reserved1 >> reserved2;
record >> citmGhostMax >> bVerCacheLastRefresh >> bVerCacheRefreshableMin;
for (int i = 0; i < 8; i++)
record >> numDateCopy[i];
record >> reserved2;
}
void SXAddl_SXCCache_SXDInfo12::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
_UINT32 flags;
short reserved;
record >> flags >> reserved;
fSheetData = GETBIT(flags, 0);
fSrvSupportAttribDrill = GETBIT(flags, 1);
fSrvSupportSubQuery = GETBIT(flags, 2);
}
void SXAddl_SXCCache_SXDVerSXMacro::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
unsigned char reserved1;
short reserved2, reserved3;
record >> dwVer >> reserved1 >> reserved2 >> reserved3;
}
} // namespace XLS } // namespace XLS
...@@ -43,35 +43,94 @@ class SXAddl: public BiffRecord ...@@ -43,35 +43,94 @@ class SXAddl: public BiffRecord
BIFF_RECORD_DEFINE_TYPE_INFO(SXAddl) BIFF_RECORD_DEFINE_TYPE_INFO(SXAddl)
BASE_OBJECT_DEFINE_CLASS_NAME(SXAddl) BASE_OBJECT_DEFINE_CLASS_NAME(SXAddl)
public: public:
struct _SXAddlHdr
{
_UINT32 frtHeaderOld;
unsigned char sxc;
unsigned char sxd;
void load(CFRecord& record)
{
record >> frtHeaderOld >> sxc >> sxd;
}
}m_SXAddlHdr;
SXAddl(); SXAddl();
~SXAddl(); ~SXAddl();
BaseObjectPtr clone(); BaseObjectPtr clone();
virtual void readFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeSXAddl; static const ElementType type = typeSXAddl;
}; };
// The following classes are not implemented and most probably won't be. class Continue_SxaddlSxString : public SXAddl
// So we save some compilation and link time and resulting dll size {
class Continue_SxaddlSxString : public SXAddl {}; public:
//virtual void readFields(CFRecord& record);
};
class SXAddl_SXCAutoSort_SXDEnd : public SXAddl {}; class SXAddl_SXCAutoSort_SXDEnd : public SXAddl {};
class SXAddl_SXCAutoSort_SXDId : public SXAddl {}; class SXAddl_SXCAutoSort_SXDId : public SXAddl {};
class SXAddl_SXCCache_SXDEnd : public SXAddl {}; class SXAddl_SXCCache_SXDEnd : public SXAddl
class SXAddl_SXCCache_SXDId : public SXAddl {}; {
class SXAddl_SXCCache_SXDInfo12 : public SXAddl {}; public:
class SXAddl_SXCCache_SXDInvRefreshReal : public SXAddl {}; virtual void readFields(CFRecord& record);
class SXAddl_SXCCache_SXDVer10Info : public SXAddl {}; };
class SXAddl_SXCCache_SXDVerSXMacro : public SXAddl {};
class SXAddl_SXCCache_SXDId : public SXAddl
{
public:
virtual void readFields(CFRecord& record);
_UINT32 idCache;
};
class SXAddl_SXCCache_SXDInfo12 : public SXAddl
{
public:
virtual void readFields(CFRecord& record);
bool fSheetData;
bool fSrvSupportAttribDrill;
bool fSrvSupportSubQuery;
};
class SXAddl_SXCCache_SXDInvRefreshReal : public SXAddl
{
};
class SXAddl_SXCCache_SXDVer10Info : public SXAddl
{
public:
virtual void readFields(CFRecord& record);
_INT32 citmGhostMax;
unsigned char bVerCacheLastRefresh;
unsigned char bVerCacheRefreshableMin;
unsigned char numDateCopy[8];
};
class SXAddl_SXCCache_SXDVerSXMacro : public SXAddl
{
public:
virtual void readFields(CFRecord& record);
unsigned char dwVer;
};
class SXAddl_SXCCache_SXDVerUpdInv : public SXAddl {}; class SXAddl_SXCCache_SXDVerUpdInv : public SXAddl {};
class SXAddl_SXCCacheField_SXDCaption : public SXAddl {}; class SXAddl_SXCCacheField_SXDCaption : public SXAddl {};
class SXAddl_SXCCacheField_SXDEnd : public SXAddl {}; class SXAddl_SXCCacheField_SXDEnd : public SXAddl {};
class SXAddl_SXCCacheField_SXDId : public SXAddl {}; class SXAddl_SXCCacheField_SXDId : public SXAddl {};
class SXAddl_SXCCacheField_SXDIfdbMempropMap : public SXAddl {}; class SXAddl_SXCCacheField_SXDIfdbMempropMap: public SXAddl {};
class SXAddl_SXCCacheField_SXDIfdbMpMapCount : public SXAddl {}; class SXAddl_SXCCacheField_SXDIfdbMpMapCount: public SXAddl {};
class SXAddl_SXCCacheField_SXDProperty : public SXAddl {}; class SXAddl_SXCCacheField_SXDProperty : public SXAddl {};
class SXAddl_SXCCacheField_SXDPropName : public SXAddl {}; class SXAddl_SXCCacheField_SXDPropName : public SXAddl {};
class SXAddl_SXCCacheField_SXDSxrmitmCount : public SXAddl {}; class SXAddl_SXCCacheField_SXDSxrmitmCount : public SXAddl {};
...@@ -139,11 +198,11 @@ class SXAddl_SXCSXFilter12_SXDEnd : public SXAddl {}; ...@@ -139,11 +198,11 @@ class SXAddl_SXCSXFilter12_SXDEnd : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDId : public SXAddl {}; class SXAddl_SXCSXFilter12_SXDId : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDSXFilter : public SXAddl {}; class SXAddl_SXCSXFilter12_SXDSXFilter : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDSXFilterDesc : public SXAddl {}; class SXAddl_SXCSXFilter12_SXDSXFilterDesc : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDSXFilterValue1 : public SXAddl {}; class SXAddl_SXCSXFilter12_SXDSXFilterValue1: public SXAddl {};
class SXAddl_SXCSXFilter12_SXDSXFilterValue2 : public SXAddl {}; class SXAddl_SXCSXFilter12_SXDSXFilterValue2: public SXAddl {};
class SXAddl_SXCSXFilter12_SXDXlsFilter : public SXAddl {}; class SXAddl_SXCSXFilter12_SXDXlsFilter : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDXlsFilterValue1 : public SXAddl {}; class SXAddl_SXCSXFilter12_SXDXlsFilterValue1: public SXAddl {};
class SXAddl_SXCSXFilter12_SXDXlsFilterValue2 : public SXAddl {}; class SXAddl_SXCSXFilter12_SXDXlsFilterValue2: public SXAddl {};
class SXAddl_SXCSXFilters12_SXDEnd : public SXAddl {}; class SXAddl_SXCSXFilters12_SXDEnd : public SXAddl {};
class SXAddl_SXCSXFilters12_SXDId : public SXAddl {}; class SXAddl_SXCSXFilters12_SXDId : public SXAddl {};
class SXAddl_SXCSXMg_SXDEnd : public SXAddl {}; class SXAddl_SXCSXMg_SXDEnd : public SXAddl {};
......
...@@ -52,9 +52,8 @@ BaseObjectPtr SXDI::clone() ...@@ -52,9 +52,8 @@ BaseObjectPtr SXDI::clone()
void SXDI::readFields(CFRecord& record) void SXDI::readFields(CFRecord& record)
{ {
#pragma message("####################### SXDI record is not implemented")
Log::error("SXDI record is not implemented."); Log::error("SXDI record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -52,9 +52,57 @@ BaseObjectPtr SXEx::clone() ...@@ -52,9 +52,57 @@ BaseObjectPtr SXEx::clone()
void SXEx::readFields(CFRecord& record) void SXEx::readFields(CFRecord& record)
{ {
#pragma message("####################### SXEx record is not implemented") record >> csxformat >> cchErrorString >> cchNullString >> cchTag >> csxselect;
Log::error("SXEx record is not implemented.");
//record >> some_value; _UINT32 flags;
record >> crwPage >> ccolPage >> flags;
fAcrossPageLay = GETBIT(flags, 0);
cWrapPage = GETBITS(flags, 1, 9);
fEnableWizard = GETBIT(flags, 16);
fEnableDrilldown = GETBIT(flags, 17);
fEnableFieldDialog = GETBIT(flags, 18);
fPreserveFormatting = GETBIT(flags, 19);
fMergeLabels = GETBIT(flags, 20);
fDisplayErrorString = GETBIT(flags, 21);
fDisplayNullString = GETBIT(flags, 22);
fSubtotalHiddenPageItems = GETBIT(flags, 23);
record >> cchPageFieldStyle >> cchTableStyle >> cchVacateStyle;
if (cchErrorString > 0 && cchErrorString != 0xffff)
{
stError.setSize(cchErrorString);
record >> stError;
}
if (cchNullString > 0 && cchNullString != 0xffff)
{
stDisplayNull.setSize(cchNullString);
record >> stDisplayNull;
}
if (cchTag > 0 && cchTag != 0xffff)
{
stTag.setSize(cchTag);
record >> stTag;
}
if (cchPageFieldStyle > 0 && cchPageFieldStyle != 0xffff)
{
stPageFieldStyle.setSize(cchPageFieldStyle);
record >> stPageFieldStyle;
}
if (cchTableStyle > 0 && cchTableStyle != 0xffff)
{
stTableStyle.setSize(cchTableStyle);
record >> cchTableStyle;
}
if (cchVacateStyle > 0 && cchVacateStyle != 0xffff)
{
stVacateStyle.setSize(cchVacateStyle);
record >> cchVacateStyle;
}
int skip = record.getDataSize() - record.getRdPtr();
record.skipNunBytes(skip);
} }
} // namespace XLS } // namespace XLS
......
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
#pragma once #pragma once
#include "BiffRecord.h" #include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
#include "../Biff_structures/CellRangeRef.h"
namespace XLS namespace XLS
{ {
// Logical representation of SXEx record in BIFF8
class SXEx: public BiffRecord class SXEx: public BiffRecord
{ {
BIFF_RECORD_DEFINE_TYPE_INFO(SXEx) BIFF_RECORD_DEFINE_TYPE_INFO(SXEx)
...@@ -48,12 +48,40 @@ public: ...@@ -48,12 +48,40 @@ public:
BaseObjectPtr clone(); BaseObjectPtr clone();
void readFields(CFRecord& record); void readFields(CFRecord& record);
static const ElementType type = typeSXEx; static const ElementType type = typeSXEx;
unsigned short csxformat;
unsigned short cchErrorString;
unsigned short cchNullString;
unsigned short cchTag;
unsigned short csxselect;
DRw crwPage;
ColU ccolPage;
bool fAcrossPageLay;
unsigned char cWrapPage;
bool fEnableWizard;
bool fEnableDrilldown;
bool fEnableFieldDialog;
bool fPreserveFormatting;
bool fMergeLabels;
bool fDisplayErrorString;
bool fDisplayNullString;
bool fSubtotalHiddenPageItems;
unsigned short cchPageFieldStyle;
unsigned short cchTableStyle;
unsigned short cchVacateStyle;
XLUnicodeStringNoCch stError;
XLUnicodeStringNoCch stDisplayNull;
XLUnicodeStringNoCch stTag;
XLUnicodeStringNoCch stPageFieldStyle;
XLUnicodeStringNoCch stTableStyle;
XLUnicodeStringNoCch stVacateStyle;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -52,9 +52,8 @@ BaseObjectPtr SXLI::clone() ...@@ -52,9 +52,8 @@ BaseObjectPtr SXLI::clone()
void SXLI::readFields(CFRecord& record) void SXLI::readFields(CFRecord& record)
{ {
#pragma message("####################### SXLI record is not implemented")
Log::error("SXLI record is not implemented."); Log::error("SXLI record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -52,9 +52,8 @@ BaseObjectPtr SXPI::clone() ...@@ -52,9 +52,8 @@ BaseObjectPtr SXPI::clone()
void SXPI::readFields(CFRecord& record) void SXPI::readFields(CFRecord& record)
{ {
#pragma message("####################### SXPI record is not implemented")
Log::error("SXPI record is not implemented."); Log::error("SXPI record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -52,9 +52,8 @@ BaseObjectPtr SXPIEx::clone() ...@@ -52,9 +52,8 @@ BaseObjectPtr SXPIEx::clone()
void SXPIEx::readFields(CFRecord& record) void SXPIEx::readFields(CFRecord& record)
{ {
#pragma message("####################### SXPIEx record is not implemented")
Log::error("SXPIEx record is not implemented."); Log::error("SXPIEx record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -53,10 +53,7 @@ BaseObjectPtr SXStreamID::clone() ...@@ -53,10 +53,7 @@ BaseObjectPtr SXStreamID::clone()
void SXStreamID::readFields(CFRecord& record) void SXStreamID::readFields(CFRecord& record)
{ {
#pragma message("####################### SXStreamID record is not implemented") record >> idStm;
Log::error("SXStreamID record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
} // namespace XLS } // namespace XLS
......
...@@ -53,8 +53,7 @@ public: ...@@ -53,8 +53,7 @@ public:
static const ElementType type = typeSXStreamID; static const ElementType type = typeSXStreamID;
short idStm;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -53,9 +53,8 @@ BaseObjectPtr SXString::clone() ...@@ -53,9 +53,8 @@ BaseObjectPtr SXString::clone()
void SXString::readFields(CFRecord& record) void SXString::readFields(CFRecord& record)
{ {
#pragma message("####################### SXString record is not implemented")
Log::error("SXString record is not implemented."); Log::error("SXString record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -53,9 +53,8 @@ BaseObjectPtr SXTBRGIITM::clone() ...@@ -53,9 +53,8 @@ BaseObjectPtr SXTBRGIITM::clone()
void SXTBRGIITM::readFields(CFRecord& record) void SXTBRGIITM::readFields(CFRecord& record)
{ {
#pragma message("####################### SXTBRGIITM record is not implemented")
Log::error("SXTBRGIITM record is not implemented."); Log::error("SXTBRGIITM record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -53,9 +53,8 @@ BaseObjectPtr SXTH::clone() ...@@ -53,9 +53,8 @@ BaseObjectPtr SXTH::clone()
void SXTH::readFields(CFRecord& record) void SXTH::readFields(CFRecord& record)
{ {
#pragma message("####################### SXTH record is not implemented")
Log::error("SXTH record is not implemented."); Log::error("SXTH record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -52,9 +52,8 @@ BaseObjectPtr SXTbl::clone() ...@@ -52,9 +52,8 @@ BaseObjectPtr SXTbl::clone()
void SXTbl::readFields(CFRecord& record) void SXTbl::readFields(CFRecord& record)
{ {
#pragma message("####################### SXTbl record is not implemented")
Log::error("SXTbl record is not implemented."); Log::error("SXTbl record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -52,9 +52,8 @@ BaseObjectPtr SXVDTEx::clone() ...@@ -52,9 +52,8 @@ BaseObjectPtr SXVDTEx::clone()
void SXVDTEx::readFields(CFRecord& record) void SXVDTEx::readFields(CFRecord& record)
{ {
#pragma message("####################### SXVDTEx record is not implemented")
Log::error("SXVDTEx record is not implemented."); Log::error("SXVDTEx record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -52,9 +52,8 @@ BaseObjectPtr SXVI::clone() ...@@ -52,9 +52,8 @@ BaseObjectPtr SXVI::clone()
void SXVI::readFields(CFRecord& record) void SXVI::readFields(CFRecord& record)
{ {
#pragma message("####################### SXVI record is not implemented") Log::error("SXVI record is not implemented.");
//Log::error("SXVI record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -48,12 +48,17 @@ public: ...@@ -48,12 +48,17 @@ public:
BaseObjectPtr clone(); BaseObjectPtr clone();
void readFields(CFRecord& record); void readFields(CFRecord& record);
static const ElementType type = typeSXVS; static const ElementType type = typeSXVS;
short sxvs;
//enum
//SHEET 0x0001
//EXTERNAL 0x0002
//CONSOLIDATION 0x0004
//SCENARIO 0x0010
}; };
} // namespace XLS } // namespace XLS
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#pragma once #pragma once
#include "BiffRecord.h" #include "BiffRecord.h"
#include "../Biff_structures/FrtHeaderOld.h"
namespace XLS namespace XLS
{ {
...@@ -43,16 +44,22 @@ class SXViewEx: public BiffRecord ...@@ -43,16 +44,22 @@ class SXViewEx: public BiffRecord
BIFF_RECORD_DEFINE_TYPE_INFO(SXViewEx) BIFF_RECORD_DEFINE_TYPE_INFO(SXViewEx)
BASE_OBJECT_DEFINE_CLASS_NAME(SXViewEx) BASE_OBJECT_DEFINE_CLASS_NAME(SXViewEx)
public: public:
SXViewEx(); SXViewEx() {}
~SXViewEx(); ~SXViewEx(){}
BaseObjectPtr clone(); BaseObjectPtr clone();
void readFields(CFRecord& record); void readFields(CFRecord& record);
static const ElementType type = typeSXViewEx; static const ElementType type = typeSXViewEx;
FrtHeaderOld frtHeaderOld;
_INT32 csxth;
_INT32 csxpi;
_INT32 csxvdtex;
_UINT32 cbFuture;
std::string rgbFuture;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -53,9 +53,8 @@ BaseObjectPtr SXViewEx9::clone() ...@@ -53,9 +53,8 @@ BaseObjectPtr SXViewEx9::clone()
void SXViewEx9::readFields(CFRecord& record) void SXViewEx9::readFields(CFRecord& record)
{ {
#pragma message("####################### SXViewEx9 record is not implemented")
Log::error("SXViewEx9 record is not implemented."); Log::error("SXViewEx9 record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -52,9 +52,8 @@ BaseObjectPtr SXViewLink::clone() ...@@ -52,9 +52,8 @@ BaseObjectPtr SXViewLink::clone()
void SXViewLink::readFields(CFRecord& record) void SXViewLink::readFields(CFRecord& record)
{ {
#pragma message("####################### SXViewLink record is not implemented")
Log::error("SXViewLink record is not implemented."); Log::error("SXViewLink record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -55,6 +55,7 @@ void Sort::readFields(CFRecord& record) ...@@ -55,6 +55,7 @@ void Sort::readFields(CFRecord& record)
{ {
unsigned short flags; unsigned short flags;
record >> flags; record >> flags;
fCol = GETBIT(flags, 0); fCol = GETBIT(flags, 0);
fKey1Dsc = GETBIT(flags, 1); fKey1Dsc = GETBIT(flags, 1);
fKey2Dsc = GETBIT(flags, 2); fKey2Dsc = GETBIT(flags, 2);
......
...@@ -49,7 +49,6 @@ public: ...@@ -49,7 +49,6 @@ public:
BaseObjectPtr clone(); BaseObjectPtr clone();
void readFields(CFRecord& record); void readFields(CFRecord& record);
static const ElementType type = typeSort; static const ElementType type = typeSort;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
*/ */
#include "StartObject.h" #include "StartObject.h"
#include <Logic/Biff_structures/FrtHeaderOld.h> #include "../Biff_structures/FrtHeaderOld.h"
namespace XLS namespace XLS
{ {
......
...@@ -52,9 +52,8 @@ BaseObjectPtr SxDXF::clone() ...@@ -52,9 +52,8 @@ BaseObjectPtr SxDXF::clone()
void SxDXF::readFields(CFRecord& record) void SxDXF::readFields(CFRecord& record)
{ {
#pragma message("####################### SxDXF record is not implemented")
Log::error("SxDXF record is not implemented."); Log::error("SxDXF record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -53,9 +53,8 @@ BaseObjectPtr SxFilt::clone() ...@@ -53,9 +53,8 @@ BaseObjectPtr SxFilt::clone()
void SxFilt::readFields(CFRecord& record) void SxFilt::readFields(CFRecord& record)
{ {
#pragma message("####################### SxFilt record is not implemented")
Log::error("SxFilt record is not implemented."); Log::error("SxFilt record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -48,7 +48,6 @@ public: ...@@ -48,7 +48,6 @@ public:
BaseObjectPtr clone(); BaseObjectPtr clone();
void readFields(CFRecord& record); void readFields(CFRecord& record);
static const ElementType type = typeSxFilt; static const ElementType type = typeSxFilt;
......
...@@ -53,9 +53,8 @@ BaseObjectPtr SxFormat::clone() ...@@ -53,9 +53,8 @@ BaseObjectPtr SxFormat::clone()
void SxFormat::readFields(CFRecord& record) void SxFormat::readFields(CFRecord& record)
{ {
#pragma message("####################### SxFormat record is not implemented")
Log::error("SxFormat record is not implemented."); Log::error("SxFormat record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -35,16 +35,6 @@ ...@@ -35,16 +35,6 @@
namespace XLS namespace XLS
{ {
SxIvd::SxIvd()
{
}
SxIvd::~SxIvd()
{
}
BaseObjectPtr SxIvd::clone() BaseObjectPtr SxIvd::clone()
{ {
return BaseObjectPtr(new SxIvd(*this)); return BaseObjectPtr(new SxIvd(*this));
...@@ -53,10 +43,17 @@ BaseObjectPtr SxIvd::clone() ...@@ -53,10 +43,17 @@ BaseObjectPtr SxIvd::clone()
void SxIvd::readFields(CFRecord& record) void SxIvd::readFields(CFRecord& record)
{ {
#pragma message("####################### SxIvd record is not implemented") int rgSize = record.getDataSize() / 2;
Log::error("SxIvd record is not implemented.");
//record >> some_value; for (int i = 0; i < rgSize; i++)
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); {
short val;
record >> val;
rgSxivd.push_back(val);
}
int skip = record.getDataSize() - record.getRdPtr();
record.skipNunBytes(skip);
} }
} // namespace XLS } // namespace XLS
......
...@@ -36,23 +36,22 @@ ...@@ -36,23 +36,22 @@
namespace XLS namespace XLS
{ {
// Logical representation of SxIvd record in BIFF8
class SxIvd: public BiffRecordContinued class SxIvd: public BiffRecordContinued
{ {
BIFF_RECORD_DEFINE_TYPE_INFO(SxIvd) BIFF_RECORD_DEFINE_TYPE_INFO(SxIvd)
BASE_OBJECT_DEFINE_CLASS_NAME(SxIvd) BASE_OBJECT_DEFINE_CLASS_NAME(SxIvd)
public: public:
SxIvd(); SxIvd() {}
~SxIvd(); ~SxIvd(){}
BaseObjectPtr clone(); BaseObjectPtr clone();
void readFields(CFRecord& record); void readFields(CFRecord& record);
static const ElementType type = typeSxIvd; static const ElementType type = typeSxIvd;
std::vector<short> rgSxivd;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -53,9 +53,8 @@ BaseObjectPtr SxRule::clone() ...@@ -53,9 +53,8 @@ BaseObjectPtr SxRule::clone()
void SxRule::readFields(CFRecord& record) void SxRule::readFields(CFRecord& record)
{ {
#pragma message("####################### SxRule record is not implemented")
Log::error("SxRule record is not implemented."); Log::error("SxRule record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -48,12 +48,9 @@ public: ...@@ -48,12 +48,9 @@ public:
BaseObjectPtr clone(); BaseObjectPtr clone();
void readFields(CFRecord& record); void readFields(CFRecord& record);
static const ElementType type = typeSxRule; static const ElementType type = typeSxRule;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -53,9 +53,8 @@ BaseObjectPtr SxSelect::clone() ...@@ -53,9 +53,8 @@ BaseObjectPtr SxSelect::clone()
void SxSelect::readFields(CFRecord& record) void SxSelect::readFields(CFRecord& record)
{ {
#pragma message("####################### SxSelect record is not implemented")
Log::error("SxSelect record is not implemented."); Log::error("SxSelect record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -35,16 +35,20 @@ ...@@ -35,16 +35,20 @@
namespace XLS namespace XLS
{ {
SxView::SxView() BiffStructurePtr SXAxis::clone()
{ {
return BiffStructurePtr(new SXAxis(*this));
} }
void SXAxis::load(CFRecord& record)
SxView::~SxView()
{ {
} unsigned short flags;
record >> flags;
bRw = GETBIT(flags, 0);
bCol = GETBIT(flags, 1);
bPage = GETBIT(flags, 2);
bData = GETBIT(flags, 3);
}
BaseObjectPtr SxView::clone() BaseObjectPtr SxView::clone()
{ {
return BaseObjectPtr(new SxView(*this)); return BaseObjectPtr(new SxView(*this));
...@@ -52,10 +56,36 @@ BaseObjectPtr SxView::clone() ...@@ -52,10 +56,36 @@ BaseObjectPtr SxView::clone()
void SxView::readFields(CFRecord& record) void SxView::readFields(CFRecord& record)
{ {
#pragma message("####################### SxView record is not implemented") short reserved, flags;
Log::error("SxView record is not implemented."); record >> ref >> rwFirstHead >> rwFirstData >> colFirstData >> iCache >> reserved;
//record >> some_value; record >> sxaxis4Data >> ipos4Data;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record >> cDim >> cDimRw >> cDimCol >> cDimPg >> cDimData >> cRw >> cCol;
record >> flags;
fRwGrand = GETBIT(flags, 0);
fColGrand = GETBIT(flags, 1);
fAutoFormat = GETBIT(flags, 3);
fAtrNum = GETBIT(flags, 4);
fAtrFnt = GETBIT(flags, 5);
fAtrAlc = GETBIT(flags, 6);
fAtrBdr = GETBIT(flags, 7);
fAtrPat = GETBIT(flags, 8);
fAtrProc = GETBIT(flags, 9);
record >> itblAutoFmt >> cchTableName >> cchDataName;
if(cchTableName && cchTableName <= 0x00FF)
{
stTable.setSize(cchTableName);
record >> stTable;
}
if(cchDataName > 0 && cchDataName <= 0x00FE)
{
stData.setSize(cchDataName);
record >> stData;
}
int skip = record.getDataSize() - record.getRdPtr();
record.skipNunBytes(skip);
} }
} // namespace XLS } // namespace XLS
......
...@@ -37,6 +37,7 @@ namespace XLS ...@@ -37,6 +37,7 @@ namespace XLS
Sxvd::Sxvd() Sxvd::Sxvd()
{ {
cchName = 0;
} }
...@@ -52,12 +53,31 @@ BaseObjectPtr Sxvd::clone() ...@@ -52,12 +53,31 @@ BaseObjectPtr Sxvd::clone()
void Sxvd::readFields(CFRecord& record) void Sxvd::readFields(CFRecord& record)
{ {
#pragma message("####################### Sxvd record is not implemented") short flags;
//Log::error("Sxvd record is not implemented."); record >> sxaxis >> cSub >> flags;
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); fDefault = GETBIT(flags, 0);
} fSum = GETBIT(flags, 1);
fCounta = GETBIT(flags, 2);
fAverage = GETBIT(flags, 3);
fMax = GETBIT(flags, 4);
fMin = GETBIT(flags, 5);
fProduct = GETBIT(flags, 6);
fCount = GETBIT(flags, 7);
fStdev = GETBIT(flags, 8);
fStdevp = GETBIT(flags, 9);
fVariance = GETBIT(flags, 10);
fVariancep = GETBIT(flags, 11);
record >> cItm >> cchName;
if(cchName && cchName != 0xffff)
{
stName.setSize(cchName);
record >> stName;
}
int skip = record.getDataSize() - record.getRdPtr();
record.skipNunBytes(skip);}
} // namespace XLS } // namespace XLS
...@@ -31,13 +31,11 @@ ...@@ -31,13 +31,11 @@
*/ */
#pragma once #pragma once
#include "BiffRecord.h" #include "SxView.h"
namespace XLS namespace XLS
{ {
// Logical representation of Sxvd record in BIFF8
class Sxvd: public BiffRecord class Sxvd: public BiffRecord
{ {
BIFF_RECORD_DEFINE_TYPE_INFO(Sxvd) BIFF_RECORD_DEFINE_TYPE_INFO(Sxvd)
...@@ -48,11 +46,30 @@ public: ...@@ -48,11 +46,30 @@ public:
BaseObjectPtr clone(); BaseObjectPtr clone();
void readFields(CFRecord& record); void readFields(CFRecord& record);
static const ElementType type = typeSxvd; static const ElementType type = typeSxvd;
SXAxis sxaxis;
unsigned short cSub;
bool fDefault;
bool fSum;
bool fCounta;
bool fAverage;
bool fMax;
bool fMin;
bool fProduct;
bool fCount;
bool fStdev;
bool fStdevp;
bool fVariance;
bool fVariancep;
short cItm;
unsigned short cchName;
XLUnicodeStringNoCch stName;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -45,14 +45,11 @@ public: ...@@ -45,14 +45,11 @@ public:
static const ElementType type = typeBes; static const ElementType type = typeBes;
virtual void load(CFRecord& record); virtual void load(CFRecord& record);
const std::wstring toString(); const std::wstring toString();
void fromString(const std::wstring str); void fromString(const std::wstring str);
private:
unsigned char bBoolErr; unsigned char bBoolErr;
Boolean<unsigned char> fError; Boolean<unsigned char> fError;
}; };
......
...@@ -57,8 +57,8 @@ void ExtPtgArea3D::load(CFRecord& record) ...@@ -57,8 +57,8 @@ void ExtPtgArea3D::load(CFRecord& record)
void ExtPtgArea3D::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool full_ref) void ExtPtgArea3D::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool full_ref)
{ {
#pragma message("####################### ExtPtgArea3D record is not implemented")
Log::info("ExtPtgArea3D record is not implemented."); Log::info("ExtPtgArea3D record is not implemented.");
ptg_stack.push(L"#REF!"); ptg_stack.push(L"#REF!");
} }
......
...@@ -57,8 +57,8 @@ void ExtPtgRef3D::load(CFRecord& record) ...@@ -57,8 +57,8 @@ void ExtPtgRef3D::load(CFRecord& record)
void ExtPtgRef3D::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool full_ref ) void ExtPtgRef3D::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool full_ref )
{ {
#pragma message("####################### ExtPtgRef3D record is not implemented")
Log::info("ExtPtgRef3D record is not implemented."); Log::info("ExtPtgRef3D record is not implemented.");
ptg_stack.push(L"#REF!"); ptg_stack.push(L"#REF!");
} }
......
...@@ -51,8 +51,8 @@ void ExtPtgRefErr3D::load(CFRecord& record) ...@@ -51,8 +51,8 @@ void ExtPtgRefErr3D::load(CFRecord& record)
void ExtPtgRefErr3D::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool full_ref) void ExtPtgRefErr3D::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool full_ref)
{ {
#pragma message("####################### ExtPtgRefErr3D record is not implemented")
Log::info("ExtPtgRefErr3D record is not implemented."); Log::info("ExtPtgRefErr3D record is not implemented.");
ptg_stack.push(L"#REF!"); ptg_stack.push(L"#REF!");
} }
......
...@@ -62,8 +62,9 @@ const bool PIVOTEX::loadContent(BinProcessor& proc) ...@@ -62,8 +62,9 @@ const bool PIVOTEX::loadContent(BinProcessor& proc)
{ {
return false; return false;
} }
proc.repeated<PIVOTSELECT>(0, 0); int count = 0;
proc.repeated<PIVOTFORMAT>(0, 0); count = proc.repeated<PIVOTSELECT>(0, 0);
count = proc.repeated<PIVOTFORMAT>(0, 0);
return true; return true;
} }
......
...@@ -62,8 +62,12 @@ const bool PIVOTFORMAT::loadContent(BinProcessor& proc) ...@@ -62,8 +62,12 @@ const bool PIVOTFORMAT::loadContent(BinProcessor& proc)
{ {
return false; return false;
} }
proc.mandatory<PIVOTRULE>(); if (proc.mandatory<PIVOTRULE>())
proc.optional<SxDXF>(); {
}
if (proc.optional<SxDXF>())
{
}
return true; return true;
} }
......
...@@ -57,14 +57,14 @@ BaseObjectPtr PIVOTFRT::clone() ...@@ -57,14 +57,14 @@ BaseObjectPtr PIVOTFRT::clone()
// PIVOTFRT = PIVOTFRT9 [PIVOTADDL] // PIVOTFRT = PIVOTFRT9 [PIVOTADDL]
const bool PIVOTFRT::loadContent(BinProcessor& proc) const bool PIVOTFRT::loadContent(BinProcessor& proc)
{ {
if(!proc.mandatory<PIVOTFRT9>()) if(!proc.mandatory<PIVOTFRT9>())
{ {
return false; return false;
} }
#pragma message("####################### PIVOTFRT union is not implemented")
Log::info("PIVOTFRT union is not implemented!!!!!!!!!!!!!!!"); if (proc.optional<PIVOTADDL>())
proc.optional<PIVOTADDL>(); {
}
return true; return true;
} }
......
...@@ -63,9 +63,26 @@ const bool PIVOTFRT9::loadContent(BinProcessor& proc) ...@@ -63,9 +63,26 @@ const bool PIVOTFRT9::loadContent(BinProcessor& proc)
{ {
return false; return false;
} }
proc.optional<DBQUERYEXT>(); m_QsiSXTag = elements_.back();
proc.optional<PIVOTVIEWEX>(); elements_.pop_back();
proc.mandatory<SXViewEx9>();
if (proc.optional<DBQUERYEXT>())
{
m_DBQUERYEXT = elements_.back();
elements_.pop_back();
}
if (proc.optional<PIVOTVIEWEX>())
{
m_PIVOTVIEWEX = elements_.back();
elements_.pop_back();
}
if (proc.mandatory<SXViewEx9>())
{
m_SXViewEx9 = elements_.back();
elements_.pop_back();
}
else
return false;
return true; return true;
} }
......
...@@ -61,7 +61,10 @@ const bool PIVOTIVD::loadContent(BinProcessor& proc) ...@@ -61,7 +61,10 @@ const bool PIVOTIVD::loadContent(BinProcessor& proc)
{ {
return false; return false;
} }
proc.repeated<Continue>(0, 0); m_SxIvd = elements_.back();
elements_.pop_back();
int count = proc.repeated<Continue>(0, 0);
return true; return true;
} }
......
...@@ -36,8 +36,6 @@ ...@@ -36,8 +36,6 @@
namespace XLS namespace XLS
{ {
// Logical representation of PIVOTIVD union of records
class PIVOTIVD: public CompositeObject class PIVOTIVD: public CompositeObject
{ {
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTIVD) BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTIVD)
...@@ -50,6 +48,8 @@ public: ...@@ -50,6 +48,8 @@ public:
virtual const bool loadContent(BinProcessor& proc); virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTIVD; static const ElementType type = typePIVOTIVD;
BaseObjectPtr m_SxIvd;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -61,7 +61,9 @@ const bool PIVOTSELECT::loadContent(BinProcessor& proc) ...@@ -61,7 +61,9 @@ const bool PIVOTSELECT::loadContent(BinProcessor& proc)
{ {
return false; return false;
} }
proc.mandatory<PIVOTRULE>(); if (proc.mandatory<PIVOTRULE>())
{
}
return true; return true;
} }
......
...@@ -62,8 +62,20 @@ const bool PIVOTVD::loadContent(BinProcessor& proc) ...@@ -62,8 +62,20 @@ const bool PIVOTVD::loadContent(BinProcessor& proc)
{ {
return false; return false;
} }
proc.repeated<SXVI>(0, 0); m_Sxvd = elements_.back();
proc.mandatory<SXVDEx>(); elements_.pop_back();
int count = proc.repeated<SXVI>(0, 0);
while(count--)
{
m_arSXVI.push_back(elements_.front()); elements_.pop_front();
}
if (proc.mandatory<SXVDEx>())
{
m_SXVDEx = elements_.back();
elements_.pop_back();
}
return true; return true;
} }
......
...@@ -36,8 +36,6 @@ ...@@ -36,8 +36,6 @@
namespace XLS namespace XLS
{ {
// Logical representation of PIVOTVD union of records
class PIVOTVD: public CompositeObject class PIVOTVD: public CompositeObject
{ {
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTVD) BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTVD)
...@@ -50,6 +48,10 @@ public: ...@@ -50,6 +48,10 @@ public:
virtual const bool loadContent(BinProcessor& proc); virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTVD; static const ElementType type = typePIVOTVD;
BaseObjectPtr m_Sxvd;
std::vector<BaseObjectPtr> m_arSXVI;
BaseObjectPtr m_SXVDEx;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -36,8 +36,6 @@ ...@@ -36,8 +36,6 @@
namespace XLS namespace XLS
{ {
// Logical representation of PIVOTVIEW union of records
class PIVOTVIEW: public CompositeObject class PIVOTVIEW: public CompositeObject
{ {
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTVIEW) BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTVIEW)
...@@ -50,6 +48,9 @@ public: ...@@ -50,6 +48,9 @@ public:
virtual const bool loadContent(BinProcessor& proc); virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTVIEW; static const ElementType type = typePIVOTVIEW;
BaseObjectPtr m_PIVOTCORE;
BaseObjectPtr m_PIVOTFRT;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -63,9 +63,27 @@ const bool PIVOTVIEWEX::loadContent(BinProcessor& proc) ...@@ -63,9 +63,27 @@ const bool PIVOTVIEWEX::loadContent(BinProcessor& proc)
{ {
return false; return false;
} }
proc.repeated<PIVOTTH>(0, 0); m_SXViewEx = elements_.back();
proc.repeated<SXPIEx>(0, 0); elements_.pop_back();
proc.repeated<PIVOTVDTEX>(0, 0);
int count = 0;
count = proc.repeated<PIVOTTH>(0, 0);
while(count--)
{
m_arPIVOTTH.push_back(elements_.front()); elements_.pop_front();
}
count = proc.repeated<SXPIEx>(0, 0);
while(count--)
{
m_arSXPIEx.push_back(elements_.front()); elements_.pop_front();
}
count = proc.repeated<PIVOTVDTEX>(0, 0);
while(count--)
{
m_arPIVOTVDTEX.push_back(elements_.front()); elements_.pop_front();
}
return true; return true;
} }
......
...@@ -36,8 +36,6 @@ ...@@ -36,8 +36,6 @@
namespace XLS namespace XLS
{ {
// Logical representation of PIVOTVIEWEX union of records
class PIVOTVIEWEX: public CompositeObject class PIVOTVIEWEX: public CompositeObject
{ {
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTVIEWEX) BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTVIEWEX)
...@@ -50,6 +48,11 @@ public: ...@@ -50,6 +48,11 @@ public:
virtual const bool loadContent(BinProcessor& proc); virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTVIEWEX; static const ElementType type = typePIVOTVIEWEX;
BaseObjectPtr m_SXViewEx;
std::vector<BaseObjectPtr> m_arPIVOTTH;
std::vector<BaseObjectPtr> m_arSXPIEx;
std::vector<BaseObjectPtr> m_arPIVOTVDTEX;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -64,7 +64,7 @@ const bool PRFILTER::loadContent(BinProcessor& proc) ...@@ -64,7 +64,7 @@ const bool PRFILTER::loadContent(BinProcessor& proc)
} }
if(proc.optional<SxItm>()) if(proc.optional<SxItm>())
{ {
proc.repeated<Continue>(0, 0); int count = proc.repeated<Continue>(0, 0);
} }
return true; return true;
......
...@@ -57,19 +57,38 @@ BaseObjectPtr SXADDLCACHE::clone() ...@@ -57,19 +57,38 @@ BaseObjectPtr SXADDLCACHE::clone()
} }
// [SXADDLCACHE12] [SXADDLDBQUERY] *UNKNOWNFRT SXAddl_SXCCache_SXDEnd //[SXADDLCACHE12] [SXADDLDBQUERY] *UNKNOWNFRT SXAddl_SXCCache_SXDEnd
const bool SXADDLCACHE::loadContent(BinProcessor& proc) const bool SXADDLCACHE::loadContent(BinProcessor& proc)
{ {
if(!proc.mandatory<SXAddl_SXCCache_SXDId>()) if(!proc.mandatory<SXAddl_SXCCache_SXDId>())
{ {
return false; return false;
} }
proc.mandatory<SXAddl_SXCCache_SXDVer10Info>(); m_SXCCache_SXDId = elements_.back();
proc.optional<SXAddl_SXCCache_SXDVerSXMacro>(); elements_.pop_back();
proc.optional<SXADDLCACHE12>();
proc.optional<SXADDLDBQUERY>(); if (proc.mandatory<SXAddl_SXCCache_SXDVer10Info>())
proc.repeated<UNKNOWNFRT>(0, 0); {
proc.mandatory<SXAddl_SXCCache_SXDEnd>(); m_SXDVer10Info = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXAddl_SXCCache_SXDVerSXMacro>())
{
m_SXDVerSXMacro = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXADDLCACHE12>())
{
}
if (proc.optional<SXADDLDBQUERY>())
{
}
int count = proc.repeated<UNKNOWNFRT>(0, 0);
if (proc.mandatory<SXAddl_SXCCache_SXDEnd>())
{
elements_.pop_back();
}
return true; return true;
} }
......
...@@ -36,8 +36,6 @@ ...@@ -36,8 +36,6 @@
namespace XLS namespace XLS
{ {
// Logical representation of SXADDLCACHE union of records
class SXADDLCACHE: public CompositeObject class SXADDLCACHE: public CompositeObject
{ {
BASE_OBJECT_DEFINE_CLASS_NAME(SXADDLCACHE) BASE_OBJECT_DEFINE_CLASS_NAME(SXADDLCACHE)
...@@ -51,6 +49,10 @@ public: ...@@ -51,6 +49,10 @@ public:
static const ElementType type = typeSXADDLCACHE; static const ElementType type = typeSXADDLCACHE;
BaseObjectPtr m_SXCCache_SXDId;
BaseObjectPtr m_SXDVer10Info;
BaseObjectPtr m_SXDVerSXMacro;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -65,12 +65,24 @@ const bool SXADDLCACHE12::loadContent(BinProcessor& proc) ...@@ -65,12 +65,24 @@ const bool SXADDLCACHE12::loadContent(BinProcessor& proc)
{ {
return false; return false;
} }
proc.mandatory<SXAddl_SXCCache_SXDInfo12>(); if (proc.mandatory<SXAddl_SXCCache_SXDInfo12>())
proc.mandatory<SXAddl_SXCCache_SXDInvRefreshReal>(); {
proc.repeated<SXADDLCACHEFIELD>(0, 0); }
proc.optional<SXADDLSXDH>(); if (proc.mandatory<SXAddl_SXCCache_SXDInvRefreshReal>())
proc.optional<SXADDLSXMGS>(); {
proc.mandatory<SXAddl_SXCCache_SXDVerUpdInv>(); }
int count = proc.repeated<SXADDLCACHEFIELD>(0, 0);
if (proc.optional<SXADDLSXDH>())
{
}
if (proc.optional<SXADDLSXMGS>())
{
}
if (proc.mandatory<SXAddl_SXCCache_SXDVerUpdInv>())
{
}
return true; return true;
} }
......
...@@ -60,15 +60,21 @@ SXADDLFIELD = [SXAddl_SXCField_SXDId *Continue_SxaddlSxString SXAddl_SXCField_SX ...@@ -60,15 +60,21 @@ SXADDLFIELD = [SXAddl_SXCField_SXDId *Continue_SxaddlSxString SXAddl_SXCField_SX
*/ */
const bool SXADDLFIELD::loadContent(BinProcessor& proc) const bool SXADDLFIELD::loadContent(BinProcessor& proc)
{ {
if(proc.optional<SXAddl_SXCField_SXDId>()) if(proc.optional<SXAddl_SXCField_SXDId>())
{ {
proc.repeated<Continue_SxaddlSxString>(0, 0); int count = proc.repeated<Continue_SxaddlSxString>(0, 0);
proc.mandatory<SXAddl_SXCField_SXDVer10Info>(); if (proc.mandatory<SXAddl_SXCField_SXDVer10Info>())
proc.mandatory<SXAddl_SXCField_SXDEnd>(); {
proc.optional<SXADDLFIELD12>(); }
if (proc.mandatory<SXAddl_SXCField_SXDEnd>())
{
}
if (proc.optional<SXADDLFIELD12>())
{
}
return true; return true;
} }
return proc.optional<SXADDLFIELD12>(); return proc.optional<SXADDLFIELD12>();
} }
......
...@@ -68,6 +68,8 @@ const bool SXSRC::loadContent(BinProcessor& proc) ...@@ -68,6 +68,8 @@ const bool SXSRC::loadContent(BinProcessor& proc)
} }
} }
} }
m_source = elements_.back();
elements_.pop_back();
return true; return true;
} }
......
...@@ -51,6 +51,7 @@ public: ...@@ -51,6 +51,7 @@ public:
static const ElementType type = typeSXSRC; static const ElementType type = typeSXSRC;
BaseObjectPtr m_source;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -71,6 +71,7 @@ public: ...@@ -71,6 +71,7 @@ public:
std::vector<BaseObjectPtr> m_arWindow1; std::vector<BaseObjectPtr> m_arWindow1;
std::vector<BaseObjectPtr> m_arUserBView; std::vector<BaseObjectPtr> m_arUserBView;
std::vector<BaseObjectPtr> m_arSUPBOOK; std::vector<BaseObjectPtr> m_arSUPBOOK;
std::vector<BaseObjectPtr> m_arPIVOTCACHEDEFINITION;
std::vector<BiffStructurePtr> m_arHFPictureDrawing; std::vector<BiffStructurePtr> m_arHFPictureDrawing;
......
...@@ -284,7 +284,16 @@ const bool WorksheetSubstream::loadContent(BinProcessor& proc) ...@@ -284,7 +284,16 @@ const bool WorksheetSubstream::loadContent(BinProcessor& proc)
count--; count--;
} }
}break; }break;
case rt_SxView: proc.repeated<PIVOTVIEW>(0, 0); break; case rt_SxView:
{
count = proc.repeated<PIVOTVIEW>(0, 0);
while(count > 0)
{
m_arPIVOTVIEW.insert(m_arPIVOTVIEW.begin(), elements_.back());
elements_.pop_back();
count--;
}
}break;
case rt_DCon: proc.optional<DCON> (); break; case rt_DCon: proc.optional<DCON> (); break;
case rt_UserSViewBegin: case rt_UserSViewBegin:
{ {
......
...@@ -75,6 +75,7 @@ public: ...@@ -75,6 +75,7 @@ public:
std::vector<BaseObjectPtr> m_arMergeCells; std::vector<BaseObjectPtr> m_arMergeCells;
std::vector<BaseObjectPtr> m_arWINDOW; std::vector<BaseObjectPtr> m_arWINDOW;
std::vector<BaseObjectPtr> m_arCUSTOMVIEW; std::vector<BaseObjectPtr> m_arCUSTOMVIEW;
std::vector<BaseObjectPtr> m_arPIVOTVIEW;
std::vector<BaseObjectPtr> m_arFEAT; std::vector<BaseObjectPtr> m_arFEAT;
std::vector<BaseObjectPtr> m_arFEAT11; std::vector<BaseObjectPtr> m_arFEAT11;
std::vector<BaseObjectPtr> m_arNote; std::vector<BaseObjectPtr> m_arNote;
......
...@@ -318,6 +318,7 @@ enum ElementType ...@@ -318,6 +318,7 @@ enum ElementType
typeSXVDTEx, typeSXVDTEx,
typeSXVI, typeSXVI,
typeSxView, typeSxView,
typeSXAxis,
typeSXViewEx, typeSXViewEx,
typeSXViewEx9, typeSXViewEx9,
typeSXViewLink, typeSXViewLink,
......
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