Commit 270c1fa2 authored by ElenaSubbotina's avatar ElenaSubbotina

.

parent 09e6d3f7
......@@ -31,7 +31,7 @@
*/
#include "ChartFrtInfo.h"
#include <Logic/Biff_structures/FrtHeaderOld.h>
#include "../Biff_structures/FrtHeaderOld.h"
namespace XLS
{
......
......@@ -33,11 +33,12 @@
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
#include "../Biff_structures/CellRangeRef.h"
namespace XLS
{
// Logical representation of DConRef record in BIFF8
class DConRef: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(DConRef)
......@@ -47,12 +48,17 @@ public:
~DConRef();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeDConRef;
static const ElementType type = typeDConRef;
RefU ref;
unsigned short cchFile;
std::wstring stFile;
bool bFilePath;
bool bSheetName;
};
......
......@@ -53,9 +53,8 @@ BaseObjectPtr SXVDEx::clone()
void SXVDEx::readFields(CFRecord& record)
{
#pragma message("####################### SXVDEx record is not implemented")
//Log::error("SXVDEx record is not implemented.");
//record >> some_value;
Log::error("SXVDEx record is not implemented.");
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -52,12 +52,7 @@ BaseObjectPtr SXVS::clone()
void SXVS::readFields(CFRecord& record)
{
#pragma message("####################### SXVS record is not implemented")
Log::error("SXVS record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
record >> sxvs;
}
} // namespace XLS
......
......@@ -35,16 +35,6 @@
namespace XLS
{
SXViewEx::SXViewEx()
{
}
SXViewEx::~SXViewEx()
{
}
BaseObjectPtr SXViewEx::clone()
{
return BaseObjectPtr(new SXViewEx(*this));
......@@ -52,9 +42,11 @@ BaseObjectPtr SXViewEx::clone()
void SXViewEx::readFields(CFRecord& record)
{
#pragma message("####################### SXViewEx record is not implemented")
Log::error("SXViewEx record is not implemented.");
//record >> some_value;
record >> frtHeaderOld >> csxth >> csxpi >> csxvdtex >> cbFuture;
if (cbFuture)
rgbFuture = std::string(record.getCurData<char>(), cbFuture);
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -52,9 +52,8 @@ BaseObjectPtr SxItm::clone()
void SxItm::readFields(CFRecord& record)
{
#pragma message("####################### SxItm record is not implemented")
Log::error("SxItm record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
......
......@@ -47,7 +47,6 @@ public:
~SxSelect();
BaseObjectPtr clone();
void readFields(CFRecord& record);
......
......@@ -53,9 +53,7 @@ BaseObjectPtr SxTbpg::clone()
void SxTbpg::readFields(CFRecord& record)
{
#pragma message("####################### SxTbpg record is not implemented")
Log::error("SxTbpg record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
......
......@@ -32,27 +32,78 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
#include "../Biff_structures/CellRangeRef.h"
namespace XLS
{
class SXAxis : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAxis)
public:
SXAxis(){}
~SXAxis(){}
BiffStructurePtr clone();
virtual void load(CFRecord& record);
static const ElementType type = typeSXAxis;
bool bRw;
bool bCol;
bool bPage;
bool bData;
};
// Logical representation of SxView record in BIFF8
class SxView: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SxView)
BASE_OBJECT_DEFINE_CLASS_NAME(SxView)
public:
SxView();
~SxView();
SxView() {cchTableName = cchDataName = 0;}
~SxView() {}
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSxView;
static const ElementType type = typeSxView;
Ref8U ref;
RwU rwFirstHead;
RwU rwFirstData;
ColU colFirstData;
short iCache;
short reserved;
SXAxis sxaxis4Data;
short ipos4Data;
short cDim;
unsigned short cDimRw;
unsigned short cDimCol;
unsigned short cDimPg;
short cDimData;
unsigned short cRw;
unsigned short cCol;
bool fRwGrand;
bool fColGrand;
bool fAutoFormat;
bool fAtrNum;
bool fAtrFnt;
bool fAtrAlc;
bool fAtrBdr;
bool fAtrPat;
bool fAtrProc;
unsigned short itblAutoFmt; //enum AutoFmt8
unsigned short cchTableName;
unsigned short cchDataName;
XLUnicodeStringNoCch stTable;
XLUnicodeStringNoCch stData;
};
} // namespace XLS
......
......@@ -52,8 +52,8 @@ void ExtPtgAreaErr3D::load(CFRecord& record)
void ExtPtgAreaErr3D::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool full_ref)
{
#pragma message("####################### ExtPtgAreaErr3D record is not implemented")
Log::info("ExtPtgAreaErr3D record is not implemented.");
ptg_stack.push(L"#REF!");
}
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of AXES union of records
class AXES: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(AXES)
......
......@@ -47,39 +47,9 @@ PIVOTADDL::PIVOTADDL()
{
}
PIVOTADDL::~PIVOTADDL()
{
}
/*
int b = 5;
boost::shared_ptr<int> by;
void raw_ptr(const int* ptr) // указатель на константный объект.
{
ptr = &b; // компилится, потому что указатель не константный
*ptr = 4; // не компилится, потому что объект константный
}
// то же самое для shared_ptr
void raw_ptr(boost::shared_ptr<const int> ptr) // указатель на константный объект.
{
ptr = by; // компилится, потому что указатель не константный
*ptr = 4; // не компилится, потому что объект константный
}
// ===================== теперь наоборот
void raw_ptr2(int* const ptr) // константный указатель на неконстантный объект.
{
ptr = &b; // не компилится, потому что указатель - константный
*ptr = 4; // компилится, потому что объект не константный
}
// то же самое для shared_ptr
void raw_ptr2(const boost::shared_ptr<int> ptr) // константный указатель на не константный объект.
{
ptr = by; // не компилится, потому что указатель - константный
*ptr = 4; // компилится, потому что объект не константный
}
*/
BaseObjectPtr PIVOTADDL::clone()
{
......@@ -101,31 +71,51 @@ const bool PIVOTADDL::loadContent(BinProcessor& proc)
{
return false;
}
proc.repeated<Continue_SxaddlSxString>(0, 0);
proc.optional<SXAddl_SXCView_SXDVer10Info>();
proc.optional<SXAddl_SXCView_SXDVer12Info>();
proc.repeated<SXADDLCALCMEMBER>(0, 0);
proc.repeated<SXADDLHIERARCHY>(0, 0);
proc.repeated<SXADDLFIELD>(0, 0);
proc.repeated<UNKNOWNFRT>(0, 0);
proc.optional<SXAddl_SXCView_SXDTableStyleClient>();
int count = 0;
count = proc.repeated<Continue_SxaddlSxString>(0, 0);
if (proc.optional<SXAddl_SXCView_SXDVer10Info>())
{
}
if (proc.optional<SXAddl_SXCView_SXDVer12Info>())
{
}
count = proc.repeated<SXADDLCALCMEMBER>(0, 0);
count = proc.repeated<SXADDLHIERARCHY>(0, 0);
count = proc.repeated<SXADDLFIELD>(0, 0);
count = proc.repeated<UNKNOWNFRT>(0, 0);
if (proc.optional<SXAddl_SXCView_SXDTableStyleClient>())
{
}
if(proc.optional<SXAddl_SXCView_SXDCompactRwHdr>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
count = proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCView_SXDCompactColHdr>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
count = proc.repeated<Continue_SxaddlSxString>(0, 0);
}
proc.optional<SXAddl_SXCView_SXDVerUpdInv>();
proc.optional<SXADDLCONDFMTS>();
proc.optional<SXADDLSXFILTERS12>();
proc.repeated<SXAddl_SXCView_SXDVerUpdInv>(0, 0);
proc.repeated<SXAddl_SXCView_SXDSXPIIvmb>(0, 0);
proc.optional<SXAddl_SXCView_SXDVerUpdInv>();
proc.mandatory<SXAddl_SXCView_SXDEnd>();
if (proc.optional<SXAddl_SXCView_SXDVerUpdInv>())
{
}
if (proc.optional<SXADDLCONDFMTS>())
{
}
if (proc.optional<SXADDLSXFILTERS12>())
{
}
count = proc.repeated<SXAddl_SXCView_SXDVerUpdInv>(0, 0);
count = proc.repeated<SXAddl_SXCView_SXDSXPIIvmb>(0, 0);
if (proc.optional<SXAddl_SXCView_SXDVerUpdInv>())
{
}
if (proc.mandatory<SXAddl_SXCView_SXDEnd>())
{
}
return true;
}
......
......@@ -63,11 +63,24 @@ const bool PIVOTCACHEDEFINITION::loadContent(BinProcessor& proc)
{
return false;
}
#pragma message("####################### PIVOTCACHEDEFINITION union is not implemented")
Log::info("PIVOTCACHEDEFINITION union is not implemented!!!!!!!!!!!!!!!");
proc.mandatory<SXVS>();
proc.optional<SXSRC>();
proc.optional<SXADDLCACHE>();
m_SXStreamID = elements_.back();
elements_.pop_back();
if (proc.mandatory<SXVS>())
{
m_SXVS = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXSRC>())
{
m_SXSRC = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXADDLCACHE>())
{
m_SXADDLCACHE = elements_.back();
elements_.pop_back();
}
return true;
}
......
......@@ -50,6 +50,11 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTCACHEDEFINITION;
BaseObjectPtr m_SXStreamID;
BaseObjectPtr m_SXVS;
BaseObjectPtr m_SXSRC;
BaseObjectPtr m_SXADDLCACHE;
};
} // namespace XLS
......
......@@ -66,12 +66,45 @@ const bool PIVOTCORE::loadContent(BinProcessor& proc)
{
return false;
}
proc.repeated<PIVOTVD>(0, 0);
proc.repeated<PIVOTIVD>(0, 2);
proc.optional<PIVOTPI>();
proc.repeated<SXDI>(0, 0);
proc.repeated<PIVOTLI>(0, 0);
proc.mandatory<PIVOTEX>();
m_SxView = elements_.back();
elements_.pop_back();
int count = 0;
count = proc.repeated<PIVOTVD>(0, 0);
while(count--)
{
m_arPIVOTVD.push_back(elements_.front()); elements_.pop_front();
}
count = proc.repeated<PIVOTIVD>(0, 2);
while(count--)
{
m_arPIVOTIVD.push_back(elements_.front()); elements_.pop_front();
}
if (proc.optional<PIVOTPI>())
{
m_PIVOTPI= elements_.back();
elements_.pop_back();
}
count = proc.repeated<SXDI>(0, 0);
while(count--)
{
m_arSXDI.push_back(elements_.front()); elements_.pop_front();
}
count = proc.repeated<PIVOTLI>(0, 0);
while(count--)
{
m_arPIVOTLI.push_back(elements_.front()); elements_.pop_front();
}
if (proc.mandatory<PIVOTEX>())
{
m_PIVOTEX = elements_.back();
elements_.pop_back();
}
return true;
}
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of PIVOTCORE union of records
class PIVOTCORE: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTCORE)
......@@ -50,6 +48,15 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTCORE;
BaseObjectPtr m_SxView;
std::vector<BaseObjectPtr> m_arPIVOTVD;
std::vector<BaseObjectPtr> m_arPIVOTIVD;
BaseObjectPtr m_PIVOTPI;
std::vector<BaseObjectPtr> m_arSXDI;
std::vector<BaseObjectPtr> m_arPIVOTLI;
BaseObjectPtr m_PIVOTEX;
};
} // namespace XLS
......
......@@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of PIVOTFRT9 union of records
class PIVOTFRT9: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTFRT9)
......@@ -49,7 +47,12 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTFRT9;
static const ElementType type = typePIVOTFRT9;
BaseObjectPtr m_QsiSXTag;
BaseObjectPtr m_SXViewEx9;
BaseObjectPtr m_DBQUERYEXT;
BaseObjectPtr m_PIVOTVIEWEX;
};
} // namespace XLS
......
......@@ -61,7 +61,7 @@ const bool PIVOTRULE::loadContent(BinProcessor& proc)
{
return false;
}
proc.repeated<PRFILTER>(0, 0);
int count = proc.repeated<PRFILTER>(0, 0);
return true;
}
......
......@@ -61,7 +61,14 @@ const bool PIVOTVIEW::loadContent(BinProcessor& proc)
{
return false;
}
proc.optional<PIVOTFRT>();
m_PIVOTCORE = elements_.back();
elements_.pop_back();
if (proc.optional<PIVOTFRT>())
{
m_PIVOTFRT = elements_.back();
elements_.pop_back();
}
return true;
}
......
......@@ -315,7 +315,16 @@ const bool GlobalsSubstream::loadContent(BinProcessor& proc)
//}
}
}break;
case rt_SXStreamID: proc.repeated<PIVOTCACHEDEFINITION>(0, 0); break;
case rt_SXStreamID:
{
count = proc.repeated<PIVOTCACHEDEFINITION>(0, 0);
while(count > 0)
{
m_arPIVOTCACHEDEFINITION.insert(m_arPIVOTCACHEDEFINITION.begin(), elements_.back());
elements_.pop_back();
count--;
}
}break;
case rt_DocRoute: proc.repeated<DOCROUTE>(0, 0); break;
case rt_UserBView:
{
......
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