Commit 8addd6cb authored by ElenaSubbotina's avatar ElenaSubbotina

XlsFormat - pivot table records

parent 92cda5bc
......@@ -52,9 +52,7 @@ BaseObjectPtr SXPIEx::clone()
void SXPIEx::readFields(CFRecord& record)
{
Log::error("SXPIEx record is not implemented.");
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
record >> frtHeaderOld >> isxth >> stUnique >> stDisplay;
}
} // namespace XLS
......
......@@ -32,6 +32,8 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
#include "../Biff_structures/FrtHeaderOld.h"
namespace XLS
{
......@@ -49,6 +51,11 @@ public:
void readFields(CFRecord& record);
static const ElementType type = typeSXPIEx;
FrtHeaderOld frtHeaderOld;
_UINT32 isxth;
XLUnicodeString stUnique;
XLUnicodeString stDisplay;
};
} // namespace XLS
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of SXStreamID record in BIFF8
class SXStreamID: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXStreamID)
......@@ -47,11 +45,10 @@ public:
~SXStreamID();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXStreamID;
static const ElementType type = typeSXStreamID;
short idStm;
};
......
......@@ -53,9 +53,7 @@ BaseObjectPtr SXTBRGIITM::clone()
void SXTBRGIITM::readFields(CFRecord& record)
{
Log::error("SXTBRGIITM record is not implemented.");
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
record >> cItems;
}
} // namespace XLS
......
......@@ -50,6 +50,8 @@ public:
static const ElementType type = typeSXTBRGIITM;
unsigned short cItems;
};
} // namespace XLS
......
......@@ -44,7 +44,6 @@ SXTH::~SXTH()
{
}
BaseObjectPtr SXTH::clone()
{
return BaseObjectPtr(new SXTH(*this));
......@@ -53,9 +52,44 @@ BaseObjectPtr SXTH::clone()
void SXTH::readFields(CFRecord& record)
{
Log::error("SXTH record is not implemented.");
_UINT32 flags1;
unsigned short flags2;
record >> frtHeaderOld >> flags1 >> sxaxis >> isxvd >> csxvdXl >> flags2;
record >> stUnique >> stDisplay >> stDefault >> stAll >> stDimension;
record >> cisxvd;
for (int i = 0; i < cisxvd; i++)
{
_INT32 val;
record >> val;
rgisxvd.push_back(val);
}
record >> cHiddenMemberSets;
for (int i = 0; i < cHiddenMemberSets; i++)
{
HiddenMemberSet val;
record >> val;
rgHiddenMemberSets.push_back(val);
}
fMeasure = GETBIT(flags1, 0);
fOutlineMode = GETBIT(flags1, 2);
fEnableMultiplePageItems = GETBIT(flags1, 3);
fSubtotalAtTop = GETBIT(flags1, 4);
fSet = GETBIT(flags1, 5);
fDontShowFList = GETBIT(flags1, 6);
fAttributeHierarchy = GETBIT(flags1, 7);
fTimeHierarchy = GETBIT(flags1, 8);
fFilterInclusive = GETBIT(flags1, 9);
fKeyAttributeHierarchy = GETBIT(flags1, 11);
fKPI = GETBIT(flags1, 12);
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
fDragToRow = GETBIT(flags2, 0);
fDragToColumn = GETBIT(flags2, 1);
fDragToPage = GETBIT(flags2, 2);
fDragToData = GETBIT(flags2, 3);
fDragToHide = GETBIT(flags2, 4);
}
} // namespace XLS
......
......@@ -33,11 +33,14 @@
#include "BiffRecordContinued.h"
#include "../Biff_structures/FrtHeaderOld.h"
#include "../Biff_structures/SxAxis.h"
#include "../Biff_structures/BiffString.h"
#include "../Biff_structures/HiddenMemberSet.h"
namespace XLS
{
// Logical representation of SXTH record in BIFF8
class SXTH: public BiffRecordContinued
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXTH)
......@@ -47,13 +50,43 @@ public:
~SXTH();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXTH;
static const ElementType type = typeSXTH;
FrtHeaderOld frtHeaderOld;
bool fMeasure;
bool fOutlineMode;
bool fEnableMultiplePageItems;
bool fSubtotalAtTop;
bool fSet;
bool fDontShowFList;
bool fAttributeHierarchy;
bool fTimeHierarchy;
bool fFilterInclusive;
bool fKeyAttributeHierarchy;
bool fKPI;
SXAxis sxaxis;
_INT32 isxvd;
_INT32 csxvdXl;
bool fDragToRow;
bool fDragToColumn;
bool fDragToPage;
bool fDragToData;
bool fDragToHide;
XLUnicodeString stUnique;
XLUnicodeString stDisplay;
XLUnicodeString stDefault;
XLUnicodeString stAll;
XLUnicodeString stDimension;
_UINT32 cisxvd;
std::vector<_INT32> rgisxvd;
_UINT32 cHiddenMemberSets;
std::vector<HiddenMemberSet> rgHiddenMemberSets;
};
} // namespace XLS
......
......@@ -55,7 +55,6 @@ public:
unsigned short cPages;
bool fAutoPage;
};
} // namespace XLS
......
......@@ -52,9 +52,21 @@ BaseObjectPtr SXVDTEx::clone()
void SXVDTEx::readFields(CFRecord& record)
{
Log::error("SXVDTEx record is not implemented.");
unsigned short flags;
record >> frtHeaderOld >> flags >> isxth >> isxtl >> csxvi;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
for (_INT32 i = 0; i < csxvi; i++)
{
SXVIFlags val;
record >> val;
rgsxvi.push_back(val);
}
fTensorSort = GETBIT(flags, 0);
fDrilledLevel = GETBIT(flags, 1);
fItemsDrilledByDefault = GETBIT(flags, 2);
fMemPropDisplayInReport = GETBIT(flags, 3);
fMemPropDisplayInTip = GETBIT(flags, 4);
fMemPropDisplayInCaption = GETBIT(flags, 5);
}
} // namespace XLS
......
......@@ -32,12 +32,12 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/FrtHeaderOld.h"
#include "../Biff_structures/SXVIFlags.h"
namespace XLS
{
// Logical representation of SXVDTEx record in BIFF8
class SXVDTEx: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXVDTEx)
......@@ -47,13 +47,23 @@ public:
~SXVDTEx();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXVDTEx;
static const ElementType type = typeSXVDTEx;
FrtHeaderOld frtHeaderOld;
bool fTensorSort;
bool fDrilledLevel;
bool fItemsDrilledByDefault;
bool fMemPropDisplayInReport;
bool fMemPropDisplayInTip;
bool fMemPropDisplayInCaption;
short isxth;
_INT32 isxtl;
_INT32 csxvi;
std::vector<SXVIFlags> rgsxvi;
};
} // namespace XLS
......
......@@ -32,7 +32,7 @@
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/BiffString.h>
#include "../Biff_structures/BiffString.h"
namespace XLS
{
......
......@@ -44,7 +44,6 @@ SxDXF::~SxDXF()
{
}
BaseObjectPtr SxDXF::clone()
{
return BaseObjectPtr(new SxDXF(*this));
......@@ -52,9 +51,7 @@ BaseObjectPtr SxDXF::clone()
void SxDXF::readFields(CFRecord& record)
{
Log::error("SxDXF record is not implemented.");
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
record >> dxfn >> xfext;
}
} // namespace XLS
......
......@@ -32,12 +32,12 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/DXFN.h"
#include "../Biff_structures/XFExtNoFRT.h"
namespace XLS
{
// Logical representation of SxDXF record in BIFF8
class SxDXF: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SxDXF)
......@@ -47,11 +47,14 @@ public:
~SxDXF();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSxDXF;
static const ElementType type = typeSxDXF;
DXFN dxfn;
XFExtNoFRT xfext;
};
} // namespace XLS
......
......@@ -44,7 +44,6 @@ SxFilt::~SxFilt()
{
}
BaseObjectPtr SxFilt::clone()
{
return BaseObjectPtr(new SxFilt(*this));
......@@ -53,9 +52,18 @@ BaseObjectPtr SxFilt::clone()
void SxFilt::readFields(CFRecord& record)
{
Log::error("SxFilt record is not implemented.");
unsigned short flags1;
unsigned char flags2;
record >> flags1 >> isxvd >> flags2 >> grbitSbt >> cisxvi;
sxaxisRw = GETBIT(flags1, 0);
sxaxisCol = GETBIT(flags1, 1);
sxaxisPage = GETBIT(flags1, 2);
sxaxisData = GETBIT(flags1, 3);
iDim = GETBITS(flags1, 4, 15);
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
fSelected = GETBIT(flags2, 0);
}
} // namespace XLS
......
......@@ -50,6 +50,16 @@ public:
static const ElementType type = typeSxFilt;
bool sxaxisRw;
bool sxaxisCol;
bool sxaxisPage;
bool sxaxisData;
unsigned short iDim;
unsigned short isxvd;
bool fSelected;
unsigned short grbitSbt;
unsigned short cisxvi;
};
} // namespace XLS
......
......@@ -53,9 +53,10 @@ BaseObjectPtr SxFormat::clone()
void SxFormat::readFields(CFRecord& record)
{
Log::error("SxFormat record is not implemented.");
unsigned short flags;
record >> flags >> cbData;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
rlType = GETBITS(flags, 0, 3);
}
} // namespace XLS
......
......@@ -49,6 +49,9 @@ public:
void readFields(CFRecord& record);
static const ElementType type = typeSxFormat;
unsigned char rlType;
unsigned short cbData;
};
} // namespace XLS
......
......@@ -52,9 +52,14 @@ BaseObjectPtr SxItm::clone()
void SxItm::readFields(CFRecord& record)
{
Log::error("SxItm record is not implemented.");
int size = (record.getDataSize() - record.getRdPtr()) / 2;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
for (int i = 0; i < size; i++)
{
unsigned short val;
record >> val;
rgisxvi.push_back(val);
}
}
} // namespace XLS
......
......@@ -36,9 +36,7 @@
namespace XLS
{
// Logical representation of SxItm record in BIFF8
class SxItm: public BiffRecordContinued
class SxItm: public BiffRecordContinued
{
BIFF_RECORD_DEFINE_TYPE_INFO(SxItm)
BASE_OBJECT_DEFINE_CLASS_NAME(SxItm)
......@@ -47,11 +45,12 @@ public:
~SxItm();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSxItm;
static const ElementType type = typeSxItm;
std::vector<unsigned short> rgisxvi;
};
} // namespace XLS
......
......@@ -51,9 +51,6 @@ void SxIvd::readFields(CFRecord& record)
record >> val;
rgSxivd.push_back(val);
}
int skip = record.getDataSize() - record.getRdPtr();
record.skipNunBytes(skip);
}
} // namespace XLS
......
......@@ -53,9 +53,14 @@ BaseObjectPtr SxTbpg::clone()
void SxTbpg::readFields(CFRecord& record)
{
Log::error("SxTbpg record is not implemented.");
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
int size = (record.getDataSize() - record.getRdPtr()) / 2;
for (int i = 0; i < size; i++)
{
short val;
record >> val;
rgiitem.push_back(val);
}
}
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of SxTbpg record in BIFF8
class SxTbpg: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SxTbpg)
......@@ -47,11 +45,12 @@ public:
~SxTbpg();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSxTbpg;
static const ElementType type = typeSxTbpg;
std::vector<short> rgiitem;
};
......
......@@ -32,7 +32,7 @@
#pragma once
#include "BiffStructure.h"
#include <Logic/Biff_structures/Boolean.h>
#include "Boolean.h"
namespace XLS
{
......
......@@ -49,11 +49,10 @@ public:
BiffStructurePtr clone();
static const ElementType type = typeFrtHeaderOld;
static const ElementType type = typeFrtHeaderOld;
virtual void load(CFRecord& record);
CFRecordType::TypeId rt;
FrtFlags grbitFrt;
};
......
......@@ -318,6 +318,7 @@ enum ElementType
typeSXVDEx,
typeSXVDTEx,
typeSXVI,
typeSXVIFlags,
typeSxView,
typeSXAxis,
typeSXViewEx,
......@@ -575,6 +576,7 @@ enum ElementType
typeFtSbs,
typeFullColorExt,
typeGradStop,
typeHiddenMemberSet,
typeHorzBrk,
typeISSTInf,
typeLbsDropData,
......
......@@ -583,6 +583,8 @@ SOURCES += \
../XlsFormat/Logic/Biff_structures/XORObfuscation.cpp \
../XlsFormat/Logic/Biff_structures/XTI.cpp \
../XlsFormat/Logic/Biff_structures/SxAxis.cpp \
../XlsFormat/Logic/Biff_structures/SXVIFlags.cpp \
../XlsFormat/Logic/Biff_structures/HiddenMemberSet.cpp \
../XlsFormat/Logic/Biff_structures/ODRAW/MSOCR.cpp \
../XlsFormat/Logic/Biff_structures/ODRAW/MSOSHADECOLOR.cpp \
../XlsFormat/Logic/Biff_structures/ODRAW/OfficeArtBlip.cpp \
......@@ -1366,6 +1368,8 @@ HEADERS += \
../XlsFormat/Logic/Biff_structures/XORObfuscation.h \
../XlsFormat/Logic/Biff_structures/XTI.h \
../XlsFormat/Logic/Biff_structures/SxAxis.h \
../XlsFormat/Logic/Biff_structures/SXVIFlags.h \
../XlsFormat/Logic/Biff_structures/HiddenMemberSet.h \
../XlsFormat/Logic/Biff_structures/ODRAW/IMsoArray.h \
../XlsFormat/Logic/Biff_structures/ODRAW/MSOCR.h \
../XlsFormat/Logic/Biff_structures/ODRAW/MSO_enums.h \
......
......@@ -752,3 +752,5 @@
#include "../XlsFormat/Logic/Biff_structures/CFDatabar.cpp"
#include "../XlsFormat/Logic/Biff_structures/CFGradient.cpp"
#include "../XlsFormat/Logic/Biff_structures/SxAxis.cpp"
#include "../XlsFormat/Logic/Biff_structures/SXVIFlags.cpp"
#include "../XlsFormat/Logic/Biff_structures/HiddenMemberSet.cpp"
......@@ -3753,6 +3753,14 @@
RelativePath="..\XlsFormat\Logic\Biff_structures\GradStop.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\HiddenMemberSet.cpp"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\HiddenMemberSet.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\HideObjEnum.cpp"
>
......@@ -4689,6 +4697,14 @@
RelativePath="..\XlsFormat\Logic\Biff_structures\SxAxis.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\SXVIFlags.cpp"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\SXVIFlags.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\SyntaxPtg.cpp"
>
......
......@@ -138,7 +138,8 @@ static std::wstring utf8_to_unicode(const char *src)
InputParams oInputParams;
oInputParams.m_sFileFrom = new std::wstring(sArg1);
oInputParams.m_sFileTo = new std::wstring(sArg2);
oInputParams.m_sPassword = new std::wstring(L"password");
// get conversion direction from 3rd argument
if (argc > 3)
{
......
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