Commit 09e6d3f7 authored by ElenaSubbotina's avatar ElenaSubbotina

XlsFormat - read pivot table records

parent 90d8055b
......@@ -49,7 +49,6 @@ public:
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeAutoFilter;
......
......@@ -37,6 +37,8 @@ namespace XLS
DConRef::DConRef()
{
bFilePath = false;
bSheetName = false;
}
......@@ -52,10 +54,33 @@ BaseObjectPtr DConRef::clone()
void DConRef::readFields(CFRecord& record)
{
#pragma message("####################### DConRef record is not implemented")
Log::error("DConRef record is not implemented.");
record >> ref >> cchFile;
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
......
......@@ -31,7 +31,7 @@
*/
#include "EndObject.h"
#include <Logic/Biff_structures/FrtHeaderOld.h>
#include "../Biff_structures/FrtHeaderOld.h"
namespace XLS
{
......
......@@ -54,7 +54,7 @@ void MTRSettings::readFields(CFRecord& record)
{
record.skipNunBytes(12);
_UINT32 temp1, temp2;
#pragma message("############################ frtHeader skipped here")
record >> temp1 >> temp2 >> cUserThreadCount;
fMTREnabled = temp1;
......
......@@ -52,9 +52,9 @@ BaseObjectPtr OleDbConn::clone()
void OleDbConn::readFields(CFRecord& record)
{
#pragma message("####################### OleDbConn record is not implemented")
Log::error("OleDbConn record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
} // namespace XLS
......
......@@ -53,9 +53,8 @@ BaseObjectPtr PicF::clone()
void PicF::readFields(CFRecord& record)
{
#pragma message("####################### PicF record is not implemented")
Log::error("PicF record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
} // namespace XLS
......
......@@ -52,9 +52,8 @@ BaseObjectPtr PivotChartBits::clone()
void PivotChartBits::readFields(CFRecord& record)
{
#pragma message("####################### PivotChartBits record is not implemented")
Log::error("PivotChartBits record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
} // namespace XLS
......
......@@ -52,9 +52,9 @@ BaseObjectPtr Qsi::clone()
void Qsi::readFields(CFRecord& record)
{
#pragma message("####################### Qsi record is not implemented")
Log::error("Qsi record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
} // namespace XLS
......
......@@ -52,9 +52,22 @@ BaseObjectPtr QsiSXTag::clone()
void QsiSXTag::readFields(CFRecord& record)
{
#pragma message("####################### QsiSXTag record is not implemented")
Log::error("QsiSXTag record is not implemented.");
//record >> some_value;
unsigned char reserved1;
unsigned short flags, reserved2;
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
......
......@@ -32,12 +32,12 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
#include "../Biff_structures/FrtHeaderOld.h"
namespace XLS
{
// Logical representation of QsiSXTag record in BIFF8
class QsiSXTag: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(QsiSXTag)
......@@ -48,11 +48,23 @@ public:
BaseObjectPtr clone();
void readFields(CFRecord& record);
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
......
......@@ -52,9 +52,8 @@ BaseObjectPtr Qsif::clone()
void Qsif::readFields(CFRecord& record)
{
#pragma message("####################### Qsif record is not implemented")
Log::error("Qsif record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
} // namespace XLS
......
......@@ -53,9 +53,9 @@ BaseObjectPtr RRSort::clone()
void RRSort::readFields(CFRecord& record)
{
#pragma message("####################### RRSort record is not implemented")
Log::error("RRSort record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
} // namespace XLS
......
......@@ -83,7 +83,7 @@ int SST::serialize(std::wostream & 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());
......
......@@ -52,11 +52,66 @@ BaseObjectPtr SXAddl::clone()
void SXAddl::readFields(CFRecord& record)
{
#pragma message("####################### SXAddl record is not implemented")
//Log::error("SXAddl record is not implemented.");
//record >> some_value;
m_SXAddlHdr.load(record);
Log::error("SXAddl record is not implemented.");
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
......@@ -43,35 +43,94 @@ class SXAddl: public BiffRecord
BIFF_RECORD_DEFINE_TYPE_INFO(SXAddl)
BASE_OBJECT_DEFINE_CLASS_NAME(SXAddl)
public:
struct _SXAddlHdr
{
_UINT32 frtHeaderOld;
unsigned char sxc;
unsigned char sxd;
void load(CFRecord& record)
{
record >> frtHeaderOld >> sxc >> sxd;
}
}m_SXAddlHdr;
SXAddl();
~SXAddl();
BaseObjectPtr clone();
void readFields(CFRecord& record);
virtual void readFields(CFRecord& record);
static const ElementType type = typeSXAddl;
};
// The following classes are not implemented and most probably won't be.
// So we save some compilation and link time and resulting dll size
class Continue_SxaddlSxString : public SXAddl {};
class Continue_SxaddlSxString : public SXAddl
{
public:
//virtual void readFields(CFRecord& record);
};
class SXAddl_SXCAutoSort_SXDEnd : public SXAddl {};
class SXAddl_SXCAutoSort_SXDId : public SXAddl {};
class SXAddl_SXCCache_SXDEnd : public SXAddl {};
class SXAddl_SXCCache_SXDId : public SXAddl {};
class SXAddl_SXCCache_SXDInfo12 : public SXAddl {};
class SXAddl_SXCCache_SXDInvRefreshReal : public SXAddl {};
class SXAddl_SXCCache_SXDVer10Info : public SXAddl {};
class SXAddl_SXCCache_SXDVerSXMacro : public SXAddl {};
class SXAddl_SXCCache_SXDEnd : public SXAddl
{
public:
virtual void readFields(CFRecord& record);
};
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_SXCCacheField_SXDCaption : public SXAddl {};
class SXAddl_SXCCacheField_SXDEnd : public SXAddl {};
class SXAddl_SXCCacheField_SXDId : public SXAddl {};
class SXAddl_SXCCacheField_SXDIfdbMempropMap : public SXAddl {};
class SXAddl_SXCCacheField_SXDIfdbMpMapCount : public SXAddl {};
class SXAddl_SXCCacheField_SXDIfdbMempropMap: public SXAddl {};
class SXAddl_SXCCacheField_SXDIfdbMpMapCount: public SXAddl {};
class SXAddl_SXCCacheField_SXDProperty : public SXAddl {};
class SXAddl_SXCCacheField_SXDPropName : public SXAddl {};
class SXAddl_SXCCacheField_SXDSxrmitmCount : public SXAddl {};
......@@ -139,11 +198,11 @@ class SXAddl_SXCSXFilter12_SXDEnd : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDId : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDSXFilter : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDSXFilterDesc : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDSXFilterValue1 : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDSXFilterValue2 : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDSXFilterValue1: public SXAddl {};
class SXAddl_SXCSXFilter12_SXDSXFilterValue2: public SXAddl {};
class SXAddl_SXCSXFilter12_SXDXlsFilter : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDXlsFilterValue1 : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDXlsFilterValue2 : public SXAddl {};
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 {};
......
......@@ -52,9 +52,8 @@ BaseObjectPtr SXDI::clone()
void SXDI::readFields(CFRecord& record)
{
#pragma message("####################### SXDI record is not implemented")
Log::error("SXDI record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -52,9 +52,57 @@ BaseObjectPtr SXEx::clone()
void SXEx::readFields(CFRecord& record)
{
#pragma message("####################### SXEx record is not implemented")
Log::error("SXEx record is not implemented.");
//record >> some_value;
record >> csxformat >> cchErrorString >> cchNullString >> cchTag >> csxselect;
_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
......
......@@ -32,12 +32,12 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
#include "../Biff_structures/CellRangeRef.h"
namespace XLS
{
// Logical representation of SXEx record in BIFF8
class SXEx: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXEx)
......@@ -48,12 +48,40 @@ public:
BaseObjectPtr clone();
void readFields(CFRecord& record);
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
......
......@@ -52,9 +52,8 @@ BaseObjectPtr SXLI::clone()
void SXLI::readFields(CFRecord& record)
{
#pragma message("####################### SXLI record is not implemented")
Log::error("SXLI record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -52,9 +52,8 @@ BaseObjectPtr SXPI::clone()
void SXPI::readFields(CFRecord& record)
{
#pragma message("####################### SXPI record is not implemented")
Log::error("SXPI record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -52,9 +52,8 @@ BaseObjectPtr SXPIEx::clone()
void SXPIEx::readFields(CFRecord& record)
{
#pragma message("####################### SXPIEx record is not implemented")
Log::error("SXPIEx record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -53,10 +53,7 @@ BaseObjectPtr SXStreamID::clone()
void SXStreamID::readFields(CFRecord& record)
{
#pragma message("####################### SXStreamID record is not implemented")
Log::error("SXStreamID record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
record >> idStm;
}
} // namespace XLS
......
......@@ -53,8 +53,7 @@ public:
static const ElementType type = typeSXStreamID;
short idStm;
};
} // namespace XLS
......
......@@ -53,9 +53,8 @@ BaseObjectPtr SXString::clone()
void SXString::readFields(CFRecord& record)
{
#pragma message("####################### SXString record is not implemented")
Log::error("SXString record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -53,9 +53,8 @@ BaseObjectPtr SXTBRGIITM::clone()
void SXTBRGIITM::readFields(CFRecord& record)
{
#pragma message("####################### SXTBRGIITM record is not implemented")
Log::error("SXTBRGIITM record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -53,9 +53,8 @@ BaseObjectPtr SXTH::clone()
void SXTH::readFields(CFRecord& record)
{
#pragma message("####################### SXTH record is not implemented")
Log::error("SXTH record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -52,9 +52,8 @@ BaseObjectPtr SXTbl::clone()
void SXTbl::readFields(CFRecord& record)
{
#pragma message("####################### SXTbl record is not implemented")
Log::error("SXTbl record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -52,9 +52,8 @@ BaseObjectPtr SXVDTEx::clone()
void SXVDTEx::readFields(CFRecord& record)
{
#pragma message("####################### SXVDTEx record is not implemented")
Log::error("SXVDTEx record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -52,9 +52,8 @@ BaseObjectPtr SXVI::clone()
void SXVI::readFields(CFRecord& record)
{
#pragma message("####################### SXVI record is not implemented")
//Log::error("SXVI record is not implemented.");
//record >> some_value;
Log::error("SXVI record is not implemented.");
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -48,12 +48,17 @@ public:
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXVS;
short sxvs;
//enum
//SHEET 0x0001
//EXTERNAL 0x0002
//CONSOLIDATION 0x0004
//SCENARIO 0x0010
};
} // namespace XLS
......
......@@ -32,6 +32,7 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/FrtHeaderOld.h"
namespace XLS
{
......@@ -43,16 +44,22 @@ class SXViewEx: public BiffRecord
BIFF_RECORD_DEFINE_TYPE_INFO(SXViewEx)
BASE_OBJECT_DEFINE_CLASS_NAME(SXViewEx)
public:
SXViewEx();
~SXViewEx();
SXViewEx() {}
~SXViewEx(){}
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXViewEx;
FrtHeaderOld frtHeaderOld;
_INT32 csxth;
_INT32 csxpi;
_INT32 csxvdtex;
_UINT32 cbFuture;
std::string rgbFuture;
};
} // namespace XLS
......
......@@ -53,9 +53,8 @@ BaseObjectPtr SXViewEx9::clone()
void SXViewEx9::readFields(CFRecord& record)
{
#pragma message("####################### SXViewEx9 record is not implemented")
Log::error("SXViewEx9 record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -52,9 +52,8 @@ BaseObjectPtr SXViewLink::clone()
void SXViewLink::readFields(CFRecord& record)
{
#pragma message("####################### SXViewLink record is not implemented")
Log::error("SXViewLink record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -55,6 +55,7 @@ void Sort::readFields(CFRecord& record)
{
unsigned short flags;
record >> flags;
fCol = GETBIT(flags, 0);
fKey1Dsc = GETBIT(flags, 1);
fKey2Dsc = GETBIT(flags, 2);
......
......@@ -49,7 +49,6 @@ public:
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSort;
......
......@@ -31,7 +31,7 @@
*/
#include "StartObject.h"
#include <Logic/Biff_structures/FrtHeaderOld.h>
#include "../Biff_structures/FrtHeaderOld.h"
namespace XLS
{
......
......@@ -52,9 +52,8 @@ BaseObjectPtr SxDXF::clone()
void SxDXF::readFields(CFRecord& record)
{
#pragma message("####################### SxDXF record is not implemented")
Log::error("SxDXF record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -53,9 +53,8 @@ BaseObjectPtr SxFilt::clone()
void SxFilt::readFields(CFRecord& record)
{
#pragma message("####################### SxFilt record is not implemented")
Log::error("SxFilt record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -48,7 +48,6 @@ public:
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSxFilt;
......
......@@ -53,9 +53,8 @@ BaseObjectPtr SxFormat::clone()
void SxFormat::readFields(CFRecord& record)
{
#pragma message("####################### SxFormat record is not implemented")
Log::error("SxFormat record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -35,16 +35,6 @@
namespace XLS
{
SxIvd::SxIvd()
{
}
SxIvd::~SxIvd()
{
}
BaseObjectPtr SxIvd::clone()
{
return BaseObjectPtr(new SxIvd(*this));
......@@ -53,10 +43,17 @@ BaseObjectPtr SxIvd::clone()
void SxIvd::readFields(CFRecord& record)
{
#pragma message("####################### SxIvd record is not implemented")
Log::error("SxIvd record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
int rgSize = record.getDataSize() / 2;
for (int i = 0; i < rgSize; i++)
{
short val;
record >> val;
rgSxivd.push_back(val);
}
int skip = record.getDataSize() - record.getRdPtr();
record.skipNunBytes(skip);
}
} // namespace XLS
......
......@@ -36,23 +36,22 @@
namespace XLS
{
// Logical representation of SxIvd record in BIFF8
class SxIvd: public BiffRecordContinued
{
BIFF_RECORD_DEFINE_TYPE_INFO(SxIvd)
BASE_OBJECT_DEFINE_CLASS_NAME(SxIvd)
public:
SxIvd();
~SxIvd();
SxIvd() {}
~SxIvd(){}
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSxIvd;
std::vector<short> rgSxivd;
};
} // namespace XLS
......
......@@ -53,9 +53,8 @@ BaseObjectPtr SxRule::clone()
void SxRule::readFields(CFRecord& record)
{
#pragma message("####################### SxRule record is not implemented")
Log::error("SxRule record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -48,12 +48,9 @@ public:
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSxRule;
};
} // namespace XLS
......
......@@ -53,9 +53,8 @@ BaseObjectPtr SxSelect::clone()
void SxSelect::readFields(CFRecord& record)
{
#pragma message("####################### SxSelect record is not implemented")
Log::error("SxSelect record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -35,16 +35,20 @@
namespace XLS
{
SxView::SxView()
BiffStructurePtr SXAxis::clone()
{
return BiffStructurePtr(new SXAxis(*this));
}
SxView::~SxView()
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));
......@@ -52,10 +56,36 @@ BaseObjectPtr SxView::clone()
void SxView::readFields(CFRecord& record)
{
#pragma message("####################### SxView record is not implemented")
Log::error("SxView record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
short reserved, flags;
record >> ref >> rwFirstHead >> rwFirstData >> colFirstData >> iCache >> reserved;
record >> sxaxis4Data >> ipos4Data;
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
......
......@@ -37,6 +37,7 @@ namespace XLS
Sxvd::Sxvd()
{
cchName = 0;
}
......@@ -52,12 +53,31 @@ BaseObjectPtr Sxvd::clone()
void Sxvd::readFields(CFRecord& record)
{
#pragma message("####################### Sxvd record is not implemented")
//Log::error("Sxvd record is not implemented.");
//record >> some_value;
short flags;
record >> sxaxis >> cSub >> flags;
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
......@@ -31,13 +31,11 @@
*/
#pragma once
#include "BiffRecord.h"
#include "SxView.h"
namespace XLS
{
// Logical representation of Sxvd record in BIFF8
class Sxvd: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(Sxvd)
......@@ -48,11 +46,30 @@ public:
BaseObjectPtr clone();
void readFields(CFRecord& record);
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
......
......@@ -45,14 +45,11 @@ public:
static const ElementType type = typeBes;
virtual void load(CFRecord& record);
const std::wstring toString();
void fromString(const std::wstring str);
private:
unsigned char bBoolErr;
Boolean<unsigned char> fError;
};
......
......@@ -57,8 +57,8 @@ void ExtPtgArea3D::load(CFRecord& record)
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.");
ptg_stack.push(L"#REF!");
}
......
......@@ -57,8 +57,8 @@ void ExtPtgRef3D::load(CFRecord& record)
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.");
ptg_stack.push(L"#REF!");
}
......
......@@ -51,8 +51,8 @@ void ExtPtgRefErr3D::load(CFRecord& record)
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.");
ptg_stack.push(L"#REF!");
}
......
......@@ -62,8 +62,9 @@ const bool PIVOTEX::loadContent(BinProcessor& proc)
{
return false;
}
proc.repeated<PIVOTSELECT>(0, 0);
proc.repeated<PIVOTFORMAT>(0, 0);
int count = 0;
count = proc.repeated<PIVOTSELECT>(0, 0);
count = proc.repeated<PIVOTFORMAT>(0, 0);
return true;
}
......
......@@ -62,8 +62,12 @@ const bool PIVOTFORMAT::loadContent(BinProcessor& proc)
{
return false;
}
proc.mandatory<PIVOTRULE>();
proc.optional<SxDXF>();
if (proc.mandatory<PIVOTRULE>())
{
}
if (proc.optional<SxDXF>())
{
}
return true;
}
......
......@@ -57,14 +57,14 @@ BaseObjectPtr PIVOTFRT::clone()
// PIVOTFRT = PIVOTFRT9 [PIVOTADDL]
const bool PIVOTFRT::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<PIVOTFRT9>())
{
return false;
}
#pragma message("####################### PIVOTFRT union is not implemented")
Log::info("PIVOTFRT union is not implemented!!!!!!!!!!!!!!!");
proc.optional<PIVOTADDL>();
if (proc.optional<PIVOTADDL>())
{
}
return true;
}
......
......@@ -63,9 +63,26 @@ const bool PIVOTFRT9::loadContent(BinProcessor& proc)
{
return false;
}
proc.optional<DBQUERYEXT>();
proc.optional<PIVOTVIEWEX>();
proc.mandatory<SXViewEx9>();
m_QsiSXTag = elements_.back();
elements_.pop_back();
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;
}
......
......@@ -61,7 +61,10 @@ const bool PIVOTIVD::loadContent(BinProcessor& proc)
{
return false;
}
proc.repeated<Continue>(0, 0);
m_SxIvd = elements_.back();
elements_.pop_back();
int count = proc.repeated<Continue>(0, 0);
return true;
}
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of PIVOTIVD union of records
class PIVOTIVD: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTIVD)
......@@ -50,6 +48,8 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTIVD;
BaseObjectPtr m_SxIvd;
};
} // namespace XLS
......
......@@ -61,7 +61,9 @@ const bool PIVOTSELECT::loadContent(BinProcessor& proc)
{
return false;
}
proc.mandatory<PIVOTRULE>();
if (proc.mandatory<PIVOTRULE>())
{
}
return true;
}
......
......@@ -62,8 +62,20 @@ const bool PIVOTVD::loadContent(BinProcessor& proc)
{
return false;
}
proc.repeated<SXVI>(0, 0);
proc.mandatory<SXVDEx>();
m_Sxvd = elements_.back();
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;
}
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of PIVOTVD union of records
class PIVOTVD: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTVD)
......@@ -50,6 +48,10 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTVD;
BaseObjectPtr m_Sxvd;
std::vector<BaseObjectPtr> m_arSXVI;
BaseObjectPtr m_SXVDEx;
};
} // namespace XLS
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of PIVOTVIEW union of records
class PIVOTVIEW: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTVIEW)
......@@ -50,6 +48,9 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTVIEW;
BaseObjectPtr m_PIVOTCORE;
BaseObjectPtr m_PIVOTFRT;
};
} // namespace XLS
......
......@@ -63,9 +63,27 @@ const bool PIVOTVIEWEX::loadContent(BinProcessor& proc)
{
return false;
}
proc.repeated<PIVOTTH>(0, 0);
proc.repeated<SXPIEx>(0, 0);
proc.repeated<PIVOTVDTEX>(0, 0);
m_SXViewEx = elements_.back();
elements_.pop_back();
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;
}
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of PIVOTVIEWEX union of records
class PIVOTVIEWEX: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTVIEWEX)
......@@ -50,6 +48,11 @@ public:
virtual const bool loadContent(BinProcessor& proc);
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
......
......@@ -64,7 +64,7 @@ const bool PRFILTER::loadContent(BinProcessor& proc)
}
if(proc.optional<SxItm>())
{
proc.repeated<Continue>(0, 0);
int count = proc.repeated<Continue>(0, 0);
}
return true;
......
......@@ -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)
{
if(!proc.mandatory<SXAddl_SXCCache_SXDId>())
{
return false;
}
proc.mandatory<SXAddl_SXCCache_SXDVer10Info>();
proc.optional<SXAddl_SXCCache_SXDVerSXMacro>();
proc.optional<SXADDLCACHE12>();
proc.optional<SXADDLDBQUERY>();
proc.repeated<UNKNOWNFRT>(0, 0);
proc.mandatory<SXAddl_SXCCache_SXDEnd>();
m_SXCCache_SXDId = elements_.back();
elements_.pop_back();
if (proc.mandatory<SXAddl_SXCCache_SXDVer10Info>())
{
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;
}
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of SXADDLCACHE union of records
class SXADDLCACHE: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(SXADDLCACHE)
......@@ -51,6 +49,10 @@ public:
static const ElementType type = typeSXADDLCACHE;
BaseObjectPtr m_SXCCache_SXDId;
BaseObjectPtr m_SXDVer10Info;
BaseObjectPtr m_SXDVerSXMacro;
};
} // namespace XLS
......
......@@ -65,12 +65,24 @@ const bool SXADDLCACHE12::loadContent(BinProcessor& proc)
{
return false;
}
proc.mandatory<SXAddl_SXCCache_SXDInfo12>();
proc.mandatory<SXAddl_SXCCache_SXDInvRefreshReal>();
proc.repeated<SXADDLCACHEFIELD>(0, 0);
proc.optional<SXADDLSXDH>();
proc.optional<SXADDLSXMGS>();
proc.mandatory<SXAddl_SXCCache_SXDVerUpdInv>();
if (proc.mandatory<SXAddl_SXCCache_SXDInfo12>())
{
}
if (proc.mandatory<SXAddl_SXCCache_SXDInvRefreshReal>())
{
}
int count = proc.repeated<SXADDLCACHEFIELD>(0, 0);
if (proc.optional<SXADDLSXDH>())
{
}
if (proc.optional<SXADDLSXMGS>())
{
}
if (proc.mandatory<SXAddl_SXCCache_SXDVerUpdInv>())
{
}
return true;
}
......
......@@ -60,15 +60,21 @@ SXADDLFIELD = [SXAddl_SXCField_SXDId *Continue_SxaddlSxString SXAddl_SXCField_SX
*/
const bool SXADDLFIELD::loadContent(BinProcessor& proc)
{
if(proc.optional<SXAddl_SXCField_SXDId>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
proc.mandatory<SXAddl_SXCField_SXDVer10Info>();
proc.mandatory<SXAddl_SXCField_SXDEnd>();
proc.optional<SXADDLFIELD12>();
int count = proc.repeated<Continue_SxaddlSxString>(0, 0);
if (proc.mandatory<SXAddl_SXCField_SXDVer10Info>())
{
}
if (proc.mandatory<SXAddl_SXCField_SXDEnd>())
{
}
if (proc.optional<SXADDLFIELD12>())
{
}
return true;
}
return proc.optional<SXADDLFIELD12>();
}
......
......@@ -68,6 +68,8 @@ const bool SXSRC::loadContent(BinProcessor& proc)
}
}
}
m_source = elements_.back();
elements_.pop_back();
return true;
}
......
......@@ -51,6 +51,7 @@ public:
static const ElementType type = typeSXSRC;
BaseObjectPtr m_source;
};
} // namespace XLS
......
......@@ -71,6 +71,7 @@ public:
std::vector<BaseObjectPtr> m_arWindow1;
std::vector<BaseObjectPtr> m_arUserBView;
std::vector<BaseObjectPtr> m_arSUPBOOK;
std::vector<BaseObjectPtr> m_arPIVOTCACHEDEFINITION;
std::vector<BiffStructurePtr> m_arHFPictureDrawing;
......
......@@ -284,7 +284,16 @@ const bool WorksheetSubstream::loadContent(BinProcessor& proc)
count--;
}
}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_UserSViewBegin:
{
......
......@@ -75,6 +75,7 @@ public:
std::vector<BaseObjectPtr> m_arMergeCells;
std::vector<BaseObjectPtr> m_arWINDOW;
std::vector<BaseObjectPtr> m_arCUSTOMVIEW;
std::vector<BaseObjectPtr> m_arPIVOTVIEW;
std::vector<BaseObjectPtr> m_arFEAT;
std::vector<BaseObjectPtr> m_arFEAT11;
std::vector<BaseObjectPtr> m_arNote;
......
......@@ -318,6 +318,7 @@ enum ElementType
typeSXVDTEx,
typeSXVI,
typeSxView,
typeSXAxis,
typeSXViewEx,
typeSXViewEx9,
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