Commit 4f2f164a authored by ElenaSubbotina's avatar ElenaSubbotina

XlsFormat - pivot tables records

parent 8addd6cb
...@@ -56,11 +56,6 @@ void CrtMlFrt::readFields(CFRecord& record) ...@@ -56,11 +56,6 @@ void CrtMlFrt::readFields(CFRecord& record)
Log::error("CrtMlFrt record is not implemented."); Log::error("CrtMlFrt record is not implemented.");
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
//
// if (cb > 0)
// {
// //XmlTkChain
// }
} }
} // namespace XLS } // namespace XLS
......
...@@ -54,7 +54,6 @@ void DBQueryExt::readFields(CFRecord& record) ...@@ -54,7 +54,6 @@ void DBQueryExt::readFields(CFRecord& record)
{ {
#pragma message("####################### DBQueryExt record is not implemented") #pragma message("####################### DBQueryExt record is not implemented")
Log::error("DBQueryExt record is not implemented."); Log::error("DBQueryExt record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -52,8 +52,7 @@ BaseObjectPtr DCon::clone() ...@@ -52,8 +52,7 @@ BaseObjectPtr DCon::clone()
void DCon::readFields(CFRecord& record) void DCon::readFields(CFRecord& record)
{ {
#pragma message("####################### DCon record is not implemented") record >> iiftab >> fLeftCat >> fTopCat >> fLinkConsole;
//record >> iiftab >> fLeftCat >> fTopCat >> fLinkConsole;
} }
} // namespace XLS } // namespace XLS
......
...@@ -36,8 +36,6 @@ ...@@ -36,8 +36,6 @@
namespace XLS namespace XLS
{ {
// Logical representation of DCon record in BIFF8
class DCon: public BiffRecord class DCon: public BiffRecord
{ {
BIFF_RECORD_DEFINE_TYPE_INFO(DCon) BIFF_RECORD_DEFINE_TYPE_INFO(DCon)
......
...@@ -53,9 +53,17 @@ BaseObjectPtr DConBin::clone() ...@@ -53,9 +53,17 @@ BaseObjectPtr DConBin::clone()
void DConBin::readFields(CFRecord& record) void DConBin::readFields(CFRecord& record)
{ {
#pragma message("####################### DConBin record is not implemented") unsigned short reserved1;
Log::error("DConBin record is not implemented."); unsigned char reserved2;
//record >> some_value; record >> nBuiltin >> reserved1 >> reserved2 >> cchFile;
if (cchFile > 0 && cchFile < 0xffff)
{
stFile.setSize(cchFile);
record >> stFile;
}
// skip unused
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -32,12 +32,11 @@ ...@@ -32,12 +32,11 @@
#pragma once #pragma once
#include "BiffRecord.h" #include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
namespace XLS namespace XLS
{ {
// Logical representation of DConBin record in BIFF8
class DConBin: public BiffRecord class DConBin: public BiffRecord
{ {
BIFF_RECORD_DEFINE_TYPE_INFO(DConBin) BIFF_RECORD_DEFINE_TYPE_INFO(DConBin)
...@@ -48,11 +47,13 @@ public: ...@@ -48,11 +47,13 @@ public:
BaseObjectPtr clone(); BaseObjectPtr clone();
void readFields(CFRecord& record); void readFields(CFRecord& record);
static const ElementType type = typeDConBin; static const ElementType type = typeDConBin;
unsigned char nBuiltin;
unsigned short cchFile;
XLUnicodeStringNoCch stFile;
}; };
......
...@@ -54,7 +54,6 @@ void DbOrParamQry::readFields(CFRecord& record) ...@@ -54,7 +54,6 @@ void DbOrParamQry::readFields(CFRecord& record)
{ {
#pragma message("####################### DbOrParamQry record is not implemented") #pragma message("####################### DbOrParamQry record is not implemented")
Log::error("DbOrParamQry record is not implemented."); Log::error("DbOrParamQry record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); record.skipNunBytes(record.getDataSize() - record.getRdPtr());
} }
......
...@@ -53,7 +53,7 @@ BaseObjectPtr FnGrp12::clone() ...@@ -53,7 +53,7 @@ BaseObjectPtr FnGrp12::clone()
void FnGrp12::readFields(CFRecord& record) void FnGrp12::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> astFnGrp; record >> astFnGrp;
} }
......
...@@ -53,7 +53,7 @@ BaseObjectPtr ForceFullCalculation::clone() ...@@ -53,7 +53,7 @@ BaseObjectPtr ForceFullCalculation::clone()
void ForceFullCalculation::readFields(CFRecord& record) void ForceFullCalculation::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
_UINT32 temp; _UINT32 temp;
record >> temp; record >> temp;
......
...@@ -53,7 +53,7 @@ BaseObjectPtr GUIDTypeLib::clone() ...@@ -53,7 +53,7 @@ BaseObjectPtr GUIDTypeLib::clone()
void GUIDTypeLib::readFields(CFRecord& record) void GUIDTypeLib::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
_GUID_ guid_num; _GUID_ guid_num;
record >> guid_num; record >> guid_num;
guid = STR::guid2bstr(guid_num); guid = STR::guid2bstr(guid_num);
......
...@@ -53,7 +53,7 @@ BaseObjectPtr MDB::clone() ...@@ -53,7 +53,7 @@ BaseObjectPtr MDB::clone()
void MDB::readFields(CFRecord& record) void MDB::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
while(!record.isEOF()) while(!record.isEOF())
{ {
MDirPtr element(new MDir); MDirPtr element(new MDir);
......
...@@ -53,7 +53,7 @@ BaseObjectPtr MDTInfo::clone() ...@@ -53,7 +53,7 @@ BaseObjectPtr MDTInfo::clone()
void MDTInfo::readFields(CFRecord& record) void MDTInfo::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
_UINT32 flags; _UINT32 flags;
record >> flags; record >> flags;
......
...@@ -53,7 +53,7 @@ BaseObjectPtr MDXKPI::clone() ...@@ -53,7 +53,7 @@ BaseObjectPtr MDXKPI::clone()
void MDXKPI::readFields(CFRecord& record) void MDXKPI::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> istrConnName >> tfnSrc >> kpiprop >> istrKPIName >> istrMbrKPI; record >> istrConnName >> tfnSrc >> kpiprop >> istrKPIName >> istrMbrKPI;
} }
......
...@@ -54,7 +54,7 @@ BaseObjectPtr MDXProp::clone() ...@@ -54,7 +54,7 @@ BaseObjectPtr MDXProp::clone()
void MDXProp::readFields(CFRecord& record) void MDXProp::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> istrConnName >> tfnSrc >> istrMbr >> istrProp; record >> istrConnName >> tfnSrc >> istrMbr >> istrProp;
} }
......
...@@ -54,7 +54,7 @@ BaseObjectPtr MDXSet::clone() ...@@ -54,7 +54,7 @@ BaseObjectPtr MDXSet::clone()
void MDXSet::readFields(CFRecord& record) void MDXSet::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> istrConnName >> tfnSrc >> sso >> istrSetDef >> cistr; record >> istrConnName >> tfnSrc >> sso >> istrSetDef >> cistr;
while(!record.isEOF()) while(!record.isEOF())
{ {
......
...@@ -54,7 +54,7 @@ BaseObjectPtr MDXStr::clone() ...@@ -54,7 +54,7 @@ BaseObjectPtr MDXStr::clone()
void MDXStr::readFields(CFRecord& record) void MDXStr::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> st; record >> st;
} }
......
...@@ -54,7 +54,7 @@ BaseObjectPtr MDXTuple::clone() ...@@ -54,7 +54,7 @@ BaseObjectPtr MDXTuple::clone()
void MDXTuple::readFields(CFRecord& record) void MDXTuple::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> istrConnName >> tfnSrc >> cistr; record >> istrConnName >> tfnSrc >> cistr;
while(!record.isEOF()) while(!record.isEOF())
{ {
......
...@@ -53,7 +53,7 @@ BaseObjectPtr NameFnGrp12::clone() ...@@ -53,7 +53,7 @@ BaseObjectPtr NameFnGrp12::clone()
void NameFnGrp12::readFields(CFRecord& record) void NameFnGrp12::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> cachName >> fgrp >> rgach; record >> cachName >> fgrp >> rgach;
} }
......
...@@ -53,7 +53,7 @@ BaseObjectPtr NamePublish::clone() ...@@ -53,7 +53,7 @@ BaseObjectPtr NamePublish::clone()
void NamePublish::readFields(CFRecord& record) void NamePublish::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
unsigned short flags; unsigned short flags;
record >> flags >> strName; record >> flags >> strName;
fPublished = GETBIT(flags, 0); fPublished = GETBIT(flags, 0);
......
...@@ -52,9 +52,20 @@ BaseObjectPtr Qsir::clone() ...@@ -52,9 +52,20 @@ BaseObjectPtr Qsir::clone()
void Qsir::readFields(CFRecord& record) void Qsir::readFields(CFRecord& record)
{ {
#pragma message("####################### Qsir record is not implemented") _UINT32 flags;
Log::error("Qsir record is not implemented.");
//record >> some_value; record >> frtRefHeaderU >> cbQsirSaved >> cbQsifSaved >> flags >> iSortCustom >> cQsif >> cpstDeleted >> idFieldNext >> ccolExtraLeft >> ccolExtraRight;
record >> idList >> rgbTitle;
fPersist = GETBIT(flags, 0);
fPersistSort = GETBIT(flags, 1);
fPersistAutoFilter = GETBIT(flags, 2);
fSorted = GETBIT(flags, 20);
fCaseSensSort = GETBIT(flags, 21);
fHdrRowSort = GETBIT(flags, 22);
fidWrapped = GETBIT(flags, 23);
fTitlesOld = GETBIT(flags, 25);
wVerBeforeRefreshAlert = GETBITS(flags, 26, 30);
} }
} // 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/FrtRefHeaderU.h"
#include "../Biff_structures/BiffString.h"
namespace XLS namespace XLS
{ {
// Logical representation of Qsir record in BIFF8
class Qsir: public BiffRecord class Qsir: public BiffRecord
{ {
BIFF_RECORD_DEFINE_TYPE_INFO(Qsir) BIFF_RECORD_DEFINE_TYPE_INFO(Qsir)
...@@ -47,11 +47,32 @@ public: ...@@ -47,11 +47,32 @@ public:
~Qsir(); ~Qsir();
BaseObjectPtr clone(); BaseObjectPtr clone();
void readFields(CFRecord& record); void readFields(CFRecord& record);
static const ElementType type = typeQsir; static const ElementType type = typeQsir;
FrtRefHeaderU frtRefHeaderU;
unsigned short cbQsirSaved;
unsigned short cbQsifSaved;
bool fPersist;
bool fPersistSort;
bool fPersistAutoFilter;
bool fSorted;
bool fCaseSensSort;
bool fHdrRowSort;
bool fidWrapped;
bool fTitlesOld;
unsigned char wVerBeforeRefreshAlert;
_UINT32 iSortCustom;
_UINT32 cQsif;
_UINT32 cpstDeleted;
_UINT32 idFieldNext;
unsigned short ccolExtraLeft;
unsigned short ccolExtraRight;
_UINT32 idList; //options
XLUnicodeString rgbTitle;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -52,7 +52,7 @@ BaseObjectPtr SortData::clone() ...@@ -52,7 +52,7 @@ BaseObjectPtr SortData::clone()
void SortData::readFields(CFRecord& record) void SortData::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
unsigned short flags; unsigned short flags;
record >> flags; record >> flags;
......
...@@ -53,7 +53,7 @@ BaseObjectPtr StyleExt::clone() ...@@ -53,7 +53,7 @@ BaseObjectPtr StyleExt::clone()
void StyleExt::readFields(CFRecord& record) void StyleExt::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
unsigned char flags; unsigned char flags;
record >> flags; record >> flags;
......
...@@ -53,7 +53,7 @@ BaseObjectPtr TableStyle::clone() ...@@ -53,7 +53,7 @@ BaseObjectPtr TableStyle::clone()
void TableStyle::readFields(CFRecord& record) void TableStyle::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
unsigned short flags; unsigned short flags;
record >> flags; record >> flags;
fIsPivot = GETBIT(flags, 1); fIsPivot = GETBIT(flags, 1);
......
...@@ -54,7 +54,7 @@ BaseObjectPtr TableStyleElement::clone() ...@@ -54,7 +54,7 @@ BaseObjectPtr TableStyleElement::clone()
void TableStyleElement::readFields(CFRecord& record) void TableStyleElement::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> tseType >> size >> index; record >> tseType >> size >> index;
} }
......
...@@ -53,7 +53,7 @@ BaseObjectPtr TableStyles::clone() ...@@ -53,7 +53,7 @@ BaseObjectPtr TableStyles::clone()
void TableStyles::readFields(CFRecord& record) void TableStyles::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
unsigned short cchDefTableStyle; unsigned short cchDefTableStyle;
unsigned short cchDefPivotStyle; unsigned short cchDefPivotStyle;
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
*/ */
#pragma once #pragma once
#include <Logic/Biff_structures/FrtHeader.h>
#include "BiffRecord.h" #include "BiffRecord.h"
#include "../Biff_structures/FrtHeader.h"
namespace XLS namespace XLS
{ {
......
...@@ -55,7 +55,7 @@ BaseObjectPtr Theme::clone() ...@@ -55,7 +55,7 @@ BaseObjectPtr Theme::clone()
void Theme::readFields(CFRecord& record) void Theme::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> dwThemeVersion; record >> dwThemeVersion;
if(!dwThemeVersion) if(!dwThemeVersion)
......
...@@ -53,7 +53,7 @@ BaseObjectPtr XFCRC::clone() ...@@ -53,7 +53,7 @@ BaseObjectPtr XFCRC::clone()
void XFCRC::readFields(CFRecord& record) void XFCRC::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
record.skipNunBytes(2); // reserved record.skipNunBytes(2); // reserved
record >> cxfs >> crc; record >> cxfs >> crc;
} }
......
...@@ -53,7 +53,7 @@ BaseObjectPtr XFExt::clone() ...@@ -53,7 +53,7 @@ BaseObjectPtr XFExt::clone()
void XFExt::readFields(CFRecord& record) void XFExt::readFields(CFRecord& record)
{ {
record.skipNunBytes(12); record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here") #pragma message(">>>>>>>>>>> frtHeader skipped here")
record.skipNunBytes(2); // reserved record.skipNunBytes(2); // reserved
record >> ixfe; record >> ixfe;
record.skipNunBytes(2); // reserved record.skipNunBytes(2); // reserved
......
...@@ -124,104 +124,6 @@ CHARTSHEETCONTENT = [WriteProtect] [SheetExt] [WebPub] *HFPicture PAGESETUP Prin ...@@ -124,104 +124,6 @@ CHARTSHEETCONTENT = [WriteProtect] [SheetExt] [WebPub] *HFPicture PAGESETUP Prin
*/ */
const bool ChartSheetSubstream::loadContent(BinProcessor& proc) const bool ChartSheetSubstream::loadContent(BinProcessor& proc)
{ {
// pGlobalWorkbookInfo = proc.getGlobalWorkbookInfo();
//
// if(!proc.mandatory<BOF>())
// {
// return false;
// }
// int count = 0 ;
//
// proc.optional<WriteProtect>();
// proc.optional<SheetExt>();
// proc.optional<WebPub>();
// proc.repeated<HFPicture>(0, 0);
// proc.mandatory<PAGESETUP>();
// proc.mandatory<PrintSize>();
// proc.optional<HeaderFooter>();
//
// if (proc.optional<BACKGROUND>())
// {
// m_BACKGROUND = elements_.back();
// elements_.pop_back();
// }
//
// count = proc.repeated<Fbi>(0, 0);
// while(count > 0)
// {
// m_arFbi.insert(m_arFbi.begin(), elements_.back());
// elements_.pop_back();
// count--;
// }
// count = proc.repeated<Fbi2>(0, 0);
//
// while(count > 0 && m_arFbi.empty())//??? разделить
// {
// m_arFbi.insert(m_arFbi.begin(), elements_.back());
// elements_.pop_back();
// count--;
// }
//
// proc.optional<ClrtClient>();
// proc.optional<PROTECTION_COMMON>();
// proc.optional<Palette>();
// proc.optional<SXViewLink>();
// proc.optional<PivotChartBits>();
// proc.optional<SBaseRef>();
//
// MsoDrawingGroup mso_drawing_group(true);
// proc.optional(mso_drawing_group);
//
// OBJECTS objects(true);
// if (proc.mandatory(objects))
// {
// m_OBJECTSCHART = elements_.back();
// elements_.pop_back();
// }
//
// proc.mandatory<Units>();
// if ( proc.mandatory<CHARTFORMATS>() )
// {
// m_CHARTFORMATS = elements_.back();
// elements_.pop_back();
//
// recalc((CHARTFORMATS*)m_CHARTFORMATS.get());
// }
// if ( proc.mandatory<SERIESDATA>() )
// {
// m_SERIESDATA = elements_.back();
// elements_.pop_back();
//
// recalc((SERIESDATA*)m_SERIESDATA.get());
// }
//
// count = proc.repeated<WINDOW>(0, 0);
// while(count > 0)
// {
// m_arWINDOW.insert(m_arWINDOW.begin(), elements_.back());
// elements_.pop_back();
// count--;
// }
//
// count = proc.repeated<CUSTOMVIEW>(0, 0);
// while(count > 0)
// {
// m_arCUSTOMVIEW.insert(m_arCUSTOMVIEW.begin(), elements_.back());
// elements_.pop_back();
// count--;
// }
//
// proc.optional<CodeName>();
// proc.optional<CRTMLFRT>();
//
//#pragma message("####################### Some trash records may be skipped here")
// proc.SeekToEOF(); // Thus we skip problems with the trash at the end of the stream (found in Domens.xls)
//
// proc.mandatory<EOF_T>();
//
// return true;
//------------------------------------------------------------------------------
pGlobalWorkbookInfo = proc.getGlobalWorkbookInfo(); pGlobalWorkbookInfo = proc.getGlobalWorkbookInfo();
int count = 0 ; int count = 0 ;
......
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