Compare commits

..

6 Commits

Author SHA1 Message Date
d61a955c38 . 2017-06-20 19:04:55 +03:00
acfb96e3c3 . 2017-06-20 17:53:11 +03:00
d2e3cc47f2 . 2017-06-20 17:16:27 +03:00
4f2f164af9 XlsFormat - pivot tables records 2017-06-20 14:09:53 +03:00
8addd6cb04 XlsFormat - pivot table records 2017-06-20 12:50:57 +03:00
92cda5bc80 fix bug #35146 2017-06-20 12:48:48 +03:00
67 changed files with 527 additions and 218 deletions

View File

@ -1155,8 +1155,8 @@ namespace NSBinPptxRW
str = L"<Relationship Id=\"rId" + std::to_wstring(m_lNextRelsID++) +
L"\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide\" Target=\"../notesSlides/notesSlide" +
std::to_wstring(nIndexNotes + 1) + L".xml\"/>";
m_pWriter->WriteString(str);
}
m_pWriter->WriteString(str);
}
void CRelsGenerator::StartNotes(int nIndexSlide)
{
@ -1209,10 +1209,14 @@ namespace NSBinPptxRW
m_pWriter->WriteString(strRels);
}
void CRelsGenerator::EndPresentationRels(const bool& bIsCommentsAuthors = false)
void CRelsGenerator::EndPresentationRels(const bool& bIsCommentsAuthors = false, const bool& bIsNotesMaster)
{
std::wstring strRels0 = L"<Relationship Id=\"rId" + std::to_wstring(m_lNextRelsID++) +
L"\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster\" Target=\"notesMasters/notesMaster1.xml\"/>";
if (bIsNotesMaster)
{
std::wstring strRels0 = L"<Relationship Id=\"rId" + std::to_wstring(m_lNextRelsID++) +
L"\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster\" Target=\"notesMasters/notesMaster1.xml\"/>";
m_pWriter->WriteString(strRels0);
}
std::wstring strRels1 = L"<Relationship Id=\"rId" + std::to_wstring(m_lNextRelsID++) +
L"\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps\" Target=\"presProps.xml\" />";
std::wstring strRels2 = L"<Relationship Id=\"rId" + std::to_wstring(m_lNextRelsID++) +
@ -1220,7 +1224,6 @@ namespace NSBinPptxRW
std::wstring strRels3 = L"<Relationship Id=\"rId" + std::to_wstring(m_lNextRelsID++) +
L"\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps\" Target=\"viewProps.xml\" />";
m_pWriter->WriteString(strRels0);
m_pWriter->WriteString(strRels1);
m_pWriter->WriteString(strRels2);
m_pWriter->WriteString(strRels3);

View File

@ -419,7 +419,7 @@ namespace NSBinPptxRW
int WriteRels (const std::wstring& bsType, const std::wstring& bsTarget, const std::wstring& bsTargetMode);
int WriteHyperlink (const std::wstring& strLink, const bool& bIsActionInit);
void EndPresentationRels (const bool& bIsCommentsAuthors);
void EndPresentationRels (const bool& bIsCommentsAuthors, const bool& bIsNotesMaster = false);
int GetNextId ();
void CloseRels ();

View File

@ -180,10 +180,11 @@ namespace NSBinPptxRW
CXmlWriter oXmlWriter;
// первым делом определим количество необходимого. если хоть одно из этих чисел - ноль, то ппту не корректный
LONG nCountThemes = 0;
LONG nCountMasters = 0;
LONG nCountLayouts = 0;
LONG nCountSlides = 0;
LONG nCountThemes = 0;
LONG nCountMasters = 0;
LONG nCountLayouts = 0;
LONG nCountSlides = 0;
bool bNotesMasterPresent = false;
pPair = m_mainTables.find(NSMainTables::Themes);
if (m_mainTables.end() != pPair)
@ -544,6 +545,7 @@ namespace NSBinPptxRW
m_oReader.m_pRels->Clear();
m_oReader.m_pRels->StartNotesMaster(m_arSlideMasters_Theme.size());
bNotesMasterPresent = true;
if (lCount > 0)
{
m_arNotesMasters.back().fromPPTY(&m_oReader);
@ -782,13 +784,16 @@ namespace NSBinPptxRW
}
m_oReader.m_pRels->WriteSlides(nCountSlides);
m_oReader.m_pRels->EndPresentationRels(m_oPresentation.commentAuthors.is_init());
m_oPresentation.notesMasterIdLst.clear();
m_oPresentation.notesMasterIdLst.push_back(PPTX::Logic::XmlId());
m_oPresentation.notesMasterIdLst[0].m_name = _T("notesMasterId");
m_oPresentation.notesMasterIdLst[0].rid = (size_t)nCurrentRels;
if (bNotesMasterPresent)
{
m_oPresentation.notesMasterIdLst.push_back(PPTX::Logic::XmlId());
m_oPresentation.notesMasterIdLst[0].m_name = _T("notesMasterId");
m_oPresentation.notesMasterIdLst[0].rid = (size_t)nCurrentRels;
++nCurrentRels;
}
m_oReader.m_pRels->EndPresentationRels(m_oPresentation.commentAuthors.is_init(), bNotesMasterPresent);
m_oReader.m_pRels->CloseRels();
oXmlWriter.ClearNoAttack();

View File

@ -56,11 +56,6 @@ void CrtMlFrt::readFields(CFRecord& record)
Log::error("CrtMlFrt record is not implemented.");
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
//
// if (cb > 0)
// {
// //XmlTkChain
// }
}
} // namespace XLS

View File

@ -54,7 +54,6 @@ void DBQueryExt::readFields(CFRecord& record)
{
#pragma message("####################### DBQueryExt record is not implemented")
Log::error("DBQueryExt record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}

View File

@ -52,8 +52,7 @@ BaseObjectPtr DCon::clone()
void DCon::readFields(CFRecord& record)
{
#pragma message("####################### DCon record is not implemented")
//record >> iiftab >> fLeftCat >> fTopCat >> fLinkConsole;
record >> iiftab >> fLeftCat >> fTopCat >> fLinkConsole;
}
} // namespace XLS

View File

@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of DCon record in BIFF8
class DCon: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(DCon)

View File

@ -53,9 +53,17 @@ BaseObjectPtr DConBin::clone()
void DConBin::readFields(CFRecord& record)
{
#pragma message("####################### DConBin record is not implemented")
Log::error("DConBin record is not implemented.");
//record >> some_value;
unsigned short reserved1;
unsigned char reserved2;
record >> nBuiltin >> reserved1 >> reserved2 >> cchFile;
if (cchFile > 0 && cchFile < 0xffff)
{
stFile.setSize(cchFile);
record >> stFile;
}
// skip unused
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}

View File

@ -32,12 +32,11 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
namespace XLS
{
// Logical representation of DConBin record in BIFF8
class DConBin: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(DConBin)
@ -48,11 +47,13 @@ public:
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeDConBin;
static const ElementType type = typeDConBin;
unsigned char nBuiltin;
unsigned short cchFile;
XLUnicodeStringNoCch stFile;
};

View File

@ -54,7 +54,6 @@ void DbOrParamQry::readFields(CFRecord& record)
{
#pragma message("####################### DbOrParamQry record is not implemented")
Log::error("DbOrParamQry record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}

View File

@ -53,7 +53,7 @@ BaseObjectPtr FnGrp12::clone()
void FnGrp12::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> astFnGrp;
}

View File

@ -53,7 +53,7 @@ BaseObjectPtr ForceFullCalculation::clone()
void ForceFullCalculation::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
_UINT32 temp;
record >> temp;

View File

@ -53,7 +53,7 @@ BaseObjectPtr GUIDTypeLib::clone()
void GUIDTypeLib::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
_GUID_ guid_num;
record >> guid_num;
guid = STR::guid2bstr(guid_num);

View File

@ -53,7 +53,7 @@ BaseObjectPtr MDB::clone()
void MDB::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
while(!record.isEOF())
{
MDirPtr element(new MDir);

View File

@ -53,7 +53,7 @@ BaseObjectPtr MDTInfo::clone()
void MDTInfo::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
_UINT32 flags;
record >> flags;

View File

@ -53,7 +53,7 @@ BaseObjectPtr MDXKPI::clone()
void MDXKPI::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> istrConnName >> tfnSrc >> kpiprop >> istrKPIName >> istrMbrKPI;
}

View File

@ -54,7 +54,7 @@ BaseObjectPtr MDXProp::clone()
void MDXProp::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> istrConnName >> tfnSrc >> istrMbr >> istrProp;
}

View File

@ -54,7 +54,7 @@ BaseObjectPtr MDXSet::clone()
void MDXSet::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> istrConnName >> tfnSrc >> sso >> istrSetDef >> cistr;
while(!record.isEOF())
{

View File

@ -54,7 +54,7 @@ BaseObjectPtr MDXStr::clone()
void MDXStr::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> st;
}

View File

@ -54,7 +54,7 @@ BaseObjectPtr MDXTuple::clone()
void MDXTuple::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> istrConnName >> tfnSrc >> cistr;
while(!record.isEOF())
{

View File

@ -53,7 +53,7 @@ BaseObjectPtr NameFnGrp12::clone()
void NameFnGrp12::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> cachName >> fgrp >> rgach;
}

View File

@ -53,7 +53,7 @@ BaseObjectPtr NamePublish::clone()
void NamePublish::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
unsigned short flags;
record >> flags >> strName;
fPublished = GETBIT(flags, 0);

View File

@ -52,9 +52,20 @@ BaseObjectPtr Qsir::clone()
void Qsir::readFields(CFRecord& record)
{
#pragma message("####################### Qsir record is not implemented")
Log::error("Qsir record is not implemented.");
//record >> some_value;
_UINT32 flags;
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

View File

@ -32,12 +32,12 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/FrtRefHeaderU.h"
#include "../Biff_structures/BiffString.h"
namespace XLS
{
// Logical representation of Qsir record in BIFF8
class Qsir: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(Qsir)
@ -47,11 +47,32 @@ public:
~Qsir();
BaseObjectPtr clone();
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

View File

@ -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

View File

@ -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

View File

@ -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;
};

View File

@ -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

View File

@ -50,6 +50,8 @@ public:
static const ElementType type = typeSXTBRGIITM;
unsigned short cItems;
};
} // namespace XLS

View File

@ -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.skipNunBytes(record.getDataSize() - record.getRdPtr());
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);
fDragToRow = GETBIT(flags2, 0);
fDragToColumn = GETBIT(flags2, 1);
fDragToPage = GETBIT(flags2, 2);
fDragToData = GETBIT(flags2, 3);
fDragToHide = GETBIT(flags2, 4);
}
} // namespace XLS

View File

@ -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

View File

@ -55,7 +55,6 @@ public:
unsigned short cPages;
bool fAutoPage;
};
} // namespace XLS

View File

@ -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

View File

@ -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

View File

@ -52,7 +52,7 @@ BaseObjectPtr SortData::clone()
void SortData::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
unsigned short flags;
record >> flags;

View File

@ -53,7 +53,7 @@ BaseObjectPtr StyleExt::clone()
void StyleExt::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
unsigned char flags;
record >> flags;

View File

@ -32,7 +32,7 @@
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/BiffString.h>
#include "../Biff_structures/BiffString.h"
namespace XLS
{

View File

@ -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

View File

@ -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

View File

@ -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.skipNunBytes(record.getDataSize() - record.getRdPtr());
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);
fSelected = GETBIT(flags2, 0);
}
} // namespace XLS

View File

@ -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

View File

@ -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

View File

@ -49,6 +49,9 @@ public:
void readFields(CFRecord& record);
static const ElementType type = typeSxFormat;
unsigned char rlType;
unsigned short cbData;
};
} // namespace XLS

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);
}
}

View File

@ -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;
};

View File

@ -53,7 +53,7 @@ BaseObjectPtr TableStyle::clone()
void TableStyle::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
unsigned short flags;
record >> flags;
fIsPivot = GETBIT(flags, 1);

View File

@ -54,7 +54,7 @@ BaseObjectPtr TableStyleElement::clone()
void TableStyleElement::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> tseType >> size >> index;
}

View File

@ -53,7 +53,7 @@ BaseObjectPtr TableStyles::clone()
void TableStyles::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
unsigned short cchDefTableStyle;
unsigned short cchDefPivotStyle;

View File

@ -31,8 +31,8 @@
*/
#pragma once
#include <Logic/Biff_structures/FrtHeader.h>
#include "BiffRecord.h"
#include "../Biff_structures/FrtHeader.h"
namespace XLS
{

View File

@ -55,7 +55,7 @@ BaseObjectPtr Theme::clone()
void Theme::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
record >> dwThemeVersion;
if(!dwThemeVersion)

View File

@ -53,7 +53,7 @@ BaseObjectPtr XFCRC::clone()
void XFCRC::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
record.skipNunBytes(2); // reserved
record >> cxfs >> crc;
}

View File

@ -53,7 +53,7 @@ BaseObjectPtr XFExt::clone()
void XFExt::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
#pragma message(">>>>>>>>>>> frtHeader skipped here")
record.skipNunBytes(2); // reserved
record >> ixfe;
record.skipNunBytes(2); // reserved

View File

@ -32,7 +32,7 @@
#pragma once
#include "BiffStructure.h"
#include <Logic/Biff_structures/Boolean.h>
#include "Boolean.h"
namespace XLS
{

View File

@ -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;
};

View File

@ -0,0 +1,58 @@
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "HiddenMemberSet.h"
#include "BiffString.h"
namespace XLS
{
BiffStructurePtr HiddenMemberSet::clone()
{
return BiffStructurePtr(new HiddenMemberSet(*this));
}
void HiddenMemberSet::load(CFRecord& record)
{
record >> cMemberName;
for (_UINT32 i = 0; i < cMemberName; i++)
{
XLUnicodeString val;
record >> val;
rgMemberName.push_back(val.value());
}
}
} // namespace XLS

View File

@ -0,0 +1,54 @@
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "BiffStructure.h"
namespace XLS
{
class HiddenMemberSet : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(HiddenMemberSet)
public:
BiffStructurePtr clone();
static const ElementType type = typeHiddenMemberSet;
virtual void load(CFRecord& record);
_UINT32 cMemberName;
std::vector<std::wstring> rgMemberName;
};
} // namespace XLS

View File

@ -0,0 +1,58 @@
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "SXVIFlags.h"
#include "BiffString.h"
namespace XLS
{
BiffStructurePtr SXVIFlags::clone()
{
return BiffStructurePtr(new SXVIFlags(*this));
}
void SXVIFlags::load(CFRecord& record)
{
unsigned short flags;
record >> flags;
fDrilledMember = GETBIT(flags, 0);
fHasChildren = GETBIT(flags, 1);
fCollapsedMember = GETBIT(flags, 2);
fHasChildrenEst = GETBIT(flags, 3);
fOlapFilterSelected = GETBIT(flags, 4);
}
} // namespace XLS

View File

@ -0,0 +1,57 @@
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "BiffStructure.h"
namespace XLS
{
class SXVIFlags : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXVIFlags)
public:
BiffStructurePtr clone();
static const ElementType type = typeSXVIFlags;
virtual void load(CFRecord& record);
bool fDrilledMember;
bool fHasChildren;
bool fCollapsedMember;
bool fHasChildrenEst;
bool fOlapFilterSelected;
};
} // namespace XLS

View File

@ -124,104 +124,6 @@ CHARTSHEETCONTENT = [WriteProtect] [SheetExt] [WebPub] *HFPicture PAGESETUP Prin
*/
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();
int count = 0 ;

View File

@ -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,

View File

@ -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 \

View File

@ -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"

View File

@ -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"
>

View File

@ -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)
{