Commit 786ddeeb authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

XlsFormat - уточнение ддиапазонов в DefinedNames, коррекция формул с...

XlsFormat - уточнение ддиапазонов в DefinedNames, коррекция формул с defiedNames; небольшой рефакторинг

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@67902 954022d7-b5bf-4e40-9824-e11837661b57
parent e9cefc9e
......@@ -637,7 +637,12 @@ const std::wstring xti_indexes2sheet_name(const short itabFirst, const short ita
static boost::wregex correct_sheet_name(L"^\\w[\\w\\d.]*(:\\w[\\w\\d.]*)?$");
if(!boost::regex_search(escaped_prefix.begin(), escaped_prefix.end(), correct_sheet_name))
{
return L'\'' + escaped_prefix + L'\'';
//int res_1 = escaped_prefix.find(L"\''");
//int res_2 = escaped_prefix.rfind(L"\''");
//if (res_1 != 0 || res_2 !=escaped_prefix.length() - 1)
{
return L'\'' + escaped_prefix + L'\'';
}
}
return escaped_prefix;
}
......
......@@ -82,8 +82,8 @@ CipherARCFOUR::rtlCipherError CipherARCFOUR::Decode(const void *pvData, const si
CipherARCFOUR::rtlCipherError CipherARCFOUR::Update(const unsigned char *pData, const size_t nDatLen, unsigned char *pBuffer, const size_t nBufLen)
{
register unsigned int *S;
register unsigned int x, y, t;
_UINT32 *S;
_UINT32 x, y, t;
size_t k;
/* Check arguments. */
......
#pragma once
#include <stddef.h>
#include "../../../Common/DocxFormat/Source/Base/Types_32.h"
class CipherARCFOUR
{
......@@ -33,11 +34,11 @@ private:
rtlCipherError Update(const unsigned char *pData, const size_t nDatLen, unsigned char *pBuffer, const size_t nBufLen);
private:
static const unsigned int CIPHER_CBLOCK_ARCFOUR = 256;
static const _UINT32 CIPHER_CBLOCK_ARCFOUR = 256;
typedef struct
{
unsigned int m_S[CIPHER_CBLOCK_ARCFOUR];
unsigned int m_X, m_Y;
_UINT32 m_S[CIPHER_CBLOCK_ARCFOUR];
_UINT32 m_X, m_Y;
} CipherContext;
rtlCipherDirection m_direction;
......
......@@ -47,16 +47,16 @@ void DigestMD5::InitContext()
{
memset(&m_context, 0, sizeof (DigestContextMD5));
m_context.m_nA = (unsigned int)0x67452301L;
m_context.m_nB = (unsigned int)0xefcdab89L;
m_context.m_nC = (unsigned int)0x98badcfeL;
m_context.m_nD = (unsigned int)0x10325476L;
m_context.m_nA = (_UINT32)0x67452301L;
m_context.m_nB = (_UINT32)0xefcdab89L;
m_context.m_nC = (_UINT32)0x98badcfeL;
m_context.m_nD = (_UINT32)0x10325476L;
}
void DigestMD5::UpdateContext()
{
register unsigned int A, B, C, D;
register unsigned int *X;
_UINT32 A, B, C, D;
_UINT32 *X;
A = m_context.m_nA;
B = m_context.m_nB;
......@@ -146,8 +146,8 @@ void DigestMD5::EndContext()
};
register const unsigned char *p = end;
register unsigned int *X;
register int i;
register _UINT32 *X;
register _INT32 i;
X = m_context.m_pData;
i = (m_context.m_nDatLen >> 2);
......@@ -273,6 +273,7 @@ DigestMD5::rtlDigestError DigestMD5::Raw(unsigned char *pBuffer, const unsigned
RTL_DIGEST_LTOC (m_context.m_nB, p);
RTL_DIGEST_LTOC (m_context.m_nC, p);
RTL_DIGEST_LTOC (m_context.m_nD, p);
InitContext();
return rtl_Digest_E_None;
......
#pragma once
#include "../../../Common/DocxFormat/Source/Base/Types_32.h"
class DigestMD5
{
......@@ -26,15 +27,15 @@ private:
void EndContext();
private:
static const unsigned int DIGEST_CBLOCK_MD5 = 64;
static const unsigned int DIGEST_LBLOCK_MD5 = 16;
static const _UINT32 DIGEST_CBLOCK_MD5 = 64;
static const _UINT32 DIGEST_LBLOCK_MD5 = 16;
typedef struct digestMD5_context_st
{
unsigned int m_nDatLen;
unsigned int m_pData[DIGEST_LBLOCK_MD5];
unsigned int m_nA, m_nB, m_nC, m_nD;
unsigned int m_nL, m_nH;
_UINT32 m_nDatLen;
_UINT32 m_pData[DIGEST_LBLOCK_MD5];
_UINT32 m_nA, m_nB, m_nC, m_nD;
_UINT32 m_nL, m_nH;
} DigestContextMD5;
DigestContextMD5 m_context;
......
......@@ -27,17 +27,18 @@ void AutoFilter12::writeFields(CFRecord& record)
void AutoFilter12::readFields(CFRecord& record)
{
unsigned short flags;
unsigned int unused2;
_UINT16 flags;
_UINT32 unused2;
record >> frtRefHeader >> iEntry >> fHideArrow >> ft >> cft >> cCriteria >> cDateGroupings >> flags >> unused2 >> idList;
unsigned short _iEntry = iEntry;
unsigned int _fHideArrow = fHideArrow;
unsigned int _ft = ft;
unsigned int _cft = cft;
unsigned int _cCriteria = cCriteria;
unsigned int _cDateGroupings = cDateGroupings;
unsigned int _idList = idList;
_UINT16 _iEntry = iEntry;
_UINT32 _fHideArrow = fHideArrow;
_UINT32 _ft = ft;
_UINT32 _cft = cft;
_UINT32 _cCriteria = cCriteria;
_UINT32 _cDateGroupings = cDateGroupings;
_UINT32 _idList = idList;
// TODO
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
......
......@@ -29,7 +29,8 @@ void BOF::writeFields(CFRecord& record)
record.registerDelayedFilePointerSource(rt_BoundSheet8);
}
record << vers << dt << rupBuild << rupYear;
unsigned int flags = 0;
_UINT32 flags = 0;
SETBIT(flags, 0, fWin);
SETBIT(flags, 1, fRisc);
SETBIT(flags, 2, fBeta);
......@@ -43,6 +44,7 @@ void BOF::writeFields(CFRecord& record)
SETBITS(flags, 14,17, verXLHigh);
record << flags;
record << verLowestBiff;
unsigned char flags2 = 0;
SETBITS(flags2, 0, 3, verLastXLSaved);
record << flags2;
......@@ -56,7 +58,7 @@ void BOF::readFields(CFRecord& record)
if (vers == (_UINT16)0x600)
{
unsigned int flags;
_UINT32 flags;
record >> flags;
fWin = GETBIT(flags, 0);
......@@ -76,6 +78,7 @@ void BOF::readFields(CFRecord& record)
unsigned char flags2;
record >> flags2;
verLastXLSaved = GETBITS(flags2, 0, 3);
stream_ptr = record.getStreamPointer();
record.skipNunBytes(2); // reserved
}
......
......@@ -57,6 +57,7 @@ public:
BIFF_WORD verXLHigh;
BIFF_BYTE verLowestBiff;
BIFF_BYTE verLastXLSaved;
ForwardOnlyParam<unsigned int> stream_ptr;
};
......
......@@ -34,8 +34,8 @@ void BkHim::readFields(CFRecord& record)
//Log::error("BkHim record is not implemented.");
//record >> some_value;
unsigned short cf;
unsigned int lcb;
_UINT16 cf;
_UINT32 lcb;
record >> cf;
record.skipNunBytes(2);
......
......@@ -27,7 +27,8 @@ void BookExt::writeFields(CFRecord& record)
FrtHeader header(rt_BookExt);
record << header;
record << cb;
unsigned int flags = 0;
_UINT32 flags = 0;
SETBIT(flags, 0, fDontAutoRecover);
SETBIT(flags, 1, fHidePivotList);
SETBIT(flags, 2, fFilterPrivacy);
......@@ -51,7 +52,7 @@ void BookExt::readFields(CFRecord& record)
record >> header;
record >> cb;
unsigned int flags;
_UINT32 flags;
if (record.loadAnyData(flags))
{
......
......@@ -24,7 +24,7 @@ public:
static const ElementType type = typeBoundSheet8;
//-----------------------------
ForwardOnlyParam<unsigned int> lbPlyPos;
ForwardOnlyParam<_UINT32> lbPlyPos;
BIFF_BSTR hsState;
BIFF_BYTE dt;
ShortXLUnicodeString stName;
......
......@@ -32,8 +32,13 @@ void Compat12::writeFields(CFRecord& record)
void Compat12::readFields(CFRecord& record)
{
FrtHeader frtHeader(rt_Compat12);
record >> frtHeader;
record >> fNoCompatChk;
_UINT32 flag = 0;
record >> flag;
fNoCompatChk = (bool)flag;
}
} // namespace XLS
......
......@@ -23,7 +23,7 @@ public:
static const ElementType type = typeCompat12;
//-----------------------------
Boolean<unsigned int> fNoCompatChk;
bool fNoCompatChk;
};
} // namespace XLS
......
......@@ -26,17 +26,9 @@ public:
static const ElementType type = typeDBCell;
//-----------------------------
ForwardOnlyParam<unsigned int> dbRtrw;
ForwardOnlyParam<_UINT32> dbRtrw;
BiffStructurePtrVector rgdb;
BackwardOnlyParam<unsigned int> num_pointers;
public:
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_ATTRIB(dbRtrw)
//BO_ATTRIB_MARKUP_ATTRIB(num_pointers)
//BO_ATTRIB_MARKUP_VECTOR_COMPLEX(rgdb, FileOffset)
//BO_ATTRIB_MARKUP_END
BackwardOnlyParam<_UINT32> num_pointers;
};
} // namespace XLS
......
......@@ -20,11 +20,13 @@ void Dv::writeFields(CFRecord& record)
void Dv::readFields(CFRecord& record)
{
unsigned int flags;
_UINT32 flags;
record >> flags;
valType = static_cast<unsigned char>(GETBITS(flags, 0, 3));
errStyle = static_cast<unsigned char>(GETBITS(flags, 4, 6));
fStrLookup = GETBIT(flags, 7);
fStrLookup = GETBIT(flags, 7);
fAllowBlank = GETBIT(flags, 8);
fSuppressCombo = GETBIT(flags, 9);
mdImeMode = static_cast<unsigned char>(GETBITS(flags, 10, 17));
......
......@@ -26,8 +26,8 @@ void ExtSST::writeFields(CFRecord& record)
for(size_t i = 0; i < num_sets; ++i)
{
record.registerDelayedDataReceiver(NULL, sizeof(unsigned int)/*ISSTInf::ib*/);
record.registerDelayedDataReceiver(NULL, sizeof(unsigned short)/*ISSTInf::cbOffset*/);
record.registerDelayedDataReceiver(NULL, sizeof(_UINT32)/*ISSTInf::ib*/);
record.registerDelayedDataReceiver(NULL, sizeof(_UINT16)/*ISSTInf::cbOffset*/);
record.reserveNunBytes(2);
}
}
......
......@@ -26,13 +26,7 @@ public:
//-----------------------------
BIFF_WORD dsst;
BiffStructurePtrVector rgISSTInf;
BackwardOnlyParam<unsigned int> num_sets;
public:
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_ATTRIB(dsst)
//BO_ATTRIB_MARKUP_VECTOR_COMPLEX(rgISSTInf, ISSTInf);
//BO_ATTRIB_MARKUP_ATTRIB(num_sets)
//BO_ATTRIB_MARKUP_END
BackwardOnlyParam<_UINT32> num_sets;
};
......
......@@ -24,14 +24,8 @@ public:
static const ElementType type = typeExternSheet;
//-----------------------------
ForwardOnlyParam<unsigned short> cXTI;
ForwardOnlyParam<_UINT16> cXTI;
BiffStructurePtrVector rgXTI;
public:
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_ATTRIB(cXTI)
//BO_ATTRIB_MARKUP_VECTOR_COMPLEX(rgXTI, XTI)
//BO_ATTRIB_MARKUP_END
};
} // namespace XLS
......
......@@ -32,7 +32,11 @@ void ForceFullCalculation::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
record >> fNoDeps;
_UINT32 temp;
record >> temp;
fNoDeps = temp;
}
} // namespace XLS
......
......@@ -23,11 +23,7 @@ public:
static const ElementType type = typeForceFullCalculation;
//-----------------------------
Boolean<unsigned int> fNoDeps;
public:
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_ATTRIB(fNoDeps)
//BO_ATTRIB_MARKUP_END
bool fNoDeps;
};
......
......@@ -24,14 +24,16 @@ BaseObjectPtr Formula::clone()
void Formula::writeFields(CFRecord& record)
{
record << cell << val;
unsigned short flags = 0;
_UINT16 flags = 0;
SETBIT(flags, 0, fAlwaysCalc);
SETBIT(flags, 2, fFill);
SETBIT(flags, 3, fShrFmla);
SETBIT(flags, 5, fClearErrors);
record << flags;
unsigned int chn = 0;
_UINT32 chn = 0;
record << chn;
formula.store(record);
//formula.store(record, cell.getLocation());
......@@ -48,7 +50,7 @@ void Formula::readFields(CFRecord& record)
fShrFmla = GETBIT(flags, 3);
fClearErrors = GETBIT(flags, 5);
unsigned int chn = 0;
_UINT32 chn = 0;
record >> chn;
formula.load(record);
......
......@@ -24,11 +24,11 @@ void Index::writeFields(CFRecord& record)
{
record.reserveNunBytes(4); // reserved
record << rwMic << rwMac;
record.registerDelayedDataReceiver(NULL, sizeof(unsigned int)/*ibXF*/);
record.registerDelayedDataReceiver(NULL, sizeof(_UINT32)/*ibXF*/);
for(unsigned int i = 0; i < num_pointers ; ++i)
{
record.registerDelayedDataReceiver(NULL, sizeof(unsigned int)/*FilePointer*/);
record.registerDelayedDataReceiver(NULL, sizeof(_UINT32)/*FilePointer*/);
}
}
......@@ -37,6 +37,7 @@ void Index::readFields(CFRecord& record)
{
record.skipNunBytes(4); // reserved
record >> rwMic >> rwMac >> ibXF;
while(!record.isEOF())
{
FilePointerPtr element(new FilePointer);
......
......@@ -24,20 +24,12 @@ public:
static const ElementType type = typeIndex;
//-----------------------------
BackwardOnlyParam<unsigned int> rwMic;
BackwardOnlyParam<unsigned int> rwMac;
ForwardOnlyParam<unsigned int> ibXF;
BackwardOnlyParam<unsigned int> num_pointers;
BackwardOnlyParam<_UINT32> rwMic;
BackwardOnlyParam<_UINT32> rwMac;
ForwardOnlyParam<_UINT32> ibXF;
BackwardOnlyParam<_UINT32> num_pointers;
BiffStructurePtrVector rgibRw;
public:
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_ATTRIB(rwMic)
//BO_ATTRIB_MARKUP_ATTRIB(rwMac)
// "ibXF" and "FilePointer" are not used in XSLT
// //BO_ATTRIB_MARKUP_ATTRIB(ibXF)
//BO_ATTRIB_MARKUP_ATTRIB(num_pointers)
// //BO_ATTRIB_MARKUP_VECTOR_COMPLEX(rgibRw, FilePointer)
//BO_ATTRIB_MARKUP_END
};
......
......@@ -147,9 +147,12 @@ void Lbl::readFields(CFRecord& record)
record >> cch >> cce;
record.skipNunBytes(2);
record >> itab;
record.skipNunBytes(4);
Name_bin.setSize(cch); // this is to process built-in string values
record >> Name_bin;
rgce.load(record, cce);
if(!fBuiltin)
......
......@@ -37,6 +37,7 @@ public:
BIFF_BYTE fGrp;
bool fPublished;
bool fWorkbookParam;
BIFF_BYTE chKey;
BIFF_WORD itab;
XLUnicodeStringNoCch Name_bin;
......
......@@ -32,8 +32,10 @@ void MDTInfo::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
unsigned int flags;
_UINT32 flags;
record >> flags;
fGhostRow = GETBIT(flags, 0);
fGhostCol = GETBIT(flags, 1);
fEdit = GETBIT(flags, 2);
......
......@@ -31,8 +31,12 @@ void MTRSettings::writeFields(CFRecord& record)
void MTRSettings::readFields(CFRecord& record)
{
record.skipNunBytes(12);
_UINT32 temp1, temp2;
#pragma message("############################ frtHeader skipped here")
record >> fMTREnabled >> fUserSetThreadCount >> cUserThreadCount;
record >> temp1 >> temp2 >> cUserThreadCount;
fMTREnabled = temp1;
fUserSetThreadCount = temp2;
}
} // namespace XLS
......
......@@ -20,15 +20,10 @@ public:
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
//-----------------------------
Boolean<unsigned int> fMTREnabled;
Boolean<unsigned int> fUserSetThreadCount;
bool fMTREnabled;
bool fUserSetThreadCount;
BIFF_DWORD cUserThreadCount;
public:
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_ATTRIB(fMTREnabled)
//BO_ATTRIB_MARKUP_ATTRIB(fUserSetThreadCount)
//BO_ATTRIB_MARKUP_ATTRIB(cUserThreadCount)
//BO_ATTRIB_MARKUP_END
};
......
......@@ -24,12 +24,6 @@ public:
//-----------------------------
XLUnicodeStringNoCch name;
XLUnicodeStringNoCch comment;
public:
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_ATTRIB(name)
//BO_ATTRIB_MARKUP_ATTRIB(comment)
//BO_ATTRIB_MARKUP_END
};
} // namespace XLS
......
......@@ -23,13 +23,8 @@ public:
//-----------------------------
BIFF_WORD cachName;
BIFF_WORD fgrp;
XLNameUnicodeString rgach;
public:
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_ATTRIB(cachName)
//BO_ATTRIB_MARKUP_ATTRIB(fgrp)
//BO_ATTRIB_MARKUP_ATTRIB(rgach)
//BO_ATTRIB_MARKUP_END
};
......
......@@ -26,14 +26,8 @@ public:
//-----------------------------
bool fPublished;
bool fWorkbookParam;
XLNameUnicodeString strName;
public:
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_ATTRIB(fPublished)
//BO_ATTRIB_MARKUP_ATTRIB(fWorkbookParam)
//BO_ATTRIB_MARKUP_ATTRIB(strName)
//BO_ATTRIB_MARKUP_END
XLNameUnicodeString strName;
};
} // namespace XLS
......
......@@ -38,7 +38,8 @@ public:
bool fExAsc;
bool fExDes;
bool fPhonetic;
BackwardOnlyParam<unsigned int> in_block_position;
BackwardOnlyParam<_UINT32> in_block_position;
};
} // namespace XLS
......
......@@ -36,7 +36,7 @@ void SST::writeFields(CFRecord& record)
}
CFRecord& current_record = recs.size() ? *recs.back() : record; // Points to the original 'record' or the last created 'Continue'
unsigned int ssss;
_UINT32 ssss;
if(!current_record.checkFitWriteSafe(ssss = element->getNonVariablePartSize())) // If we cannot write non-variable part into the current record
{
current_record.commitData();
......
......@@ -36,7 +36,7 @@ void ShapePropsStream::readFields(CFRecord& record)
record >> dwChecksum;
unsigned int cb=0;
_UINT32 cb=0;
record >> cb;
if (cb > 0)
......
......@@ -24,8 +24,8 @@ public:
FrtHeader frtHeader;
unsigned short wObjContext;
unsigned int dwChecksum;
_UINT16 wObjContext;
_UINT32 dwChecksum;
std::string xml_;
......
......@@ -38,8 +38,10 @@ void SheetExt::readFields(CFRecord& record)
record >> frtHeader;
record >> cb;
unsigned int flags;
_UINT32 flags;
record >> flags;
icvPlain = static_cast<unsigned char>(GETBITS(flags, 0, 6));
if(0x00000028 == cb)
......
......@@ -33,7 +33,7 @@ void TextPropsStream::readFields(CFRecord& record)
record >> frtHeader;
record >> dwChecksum;
unsigned int cb=0;
_UINT32 cb=0;
record >> cb;
if (cb > 0)
......
......@@ -24,7 +24,7 @@ public:
static const ElementType type = typeTextPropsStream;
FrtHeader frtHeader;
unsigned int dwChecksum;
_UINT32 dwChecksum;
std::string xml_;
};
......
......@@ -48,7 +48,7 @@ void Tick::readFields(CFRecord& record)
fAutoRot = GETBIT(flags, 5);
iReadingOrder = GETBITS(flags, 14, 15);
rott = rot;
_rott = rot;
}
int Tick::serialize(std::wostream & _stream)
......
......@@ -41,7 +41,7 @@ public:
Icv icv;
BIFF_WORD trot;
int rott;
int _rott;
};
} // namespace XLS
......
......@@ -36,7 +36,7 @@ void AFDOperRk::load(CFRecord& record)
record >> rk;
record.skipNunBytes(4);
unsigned int _rk = rk;
_UINT32 _rk = rk;
}
......
......@@ -18,8 +18,7 @@ public:
virtual void load(XLS::CFRecord& record);
virtual void store(XLS::CFRecord& record);
private:
unsigned int count;
_UINT32 count;
};
} // namespace OSHARED
......
......@@ -165,7 +165,7 @@ struct BErr : public BiffStructure_NoVtbl
struct XColorType : public BiffStructure_NoVtbl
{
unsigned int type;
_UINT32 type;
enum
{
XCLRAUTO = 0x00000000, // Automatic color
......@@ -179,7 +179,7 @@ struct XColorType : public BiffStructure_NoVtbl
struct RevisionType : public BiffStructure_NoVtbl
{
unsigned short type;
_UINT16 type;
enum
{
REVTINSRW = 0x0000, // Insert Row.
......@@ -268,15 +268,14 @@ struct ExtSheetPair : public BiffStructure_NoVtbl
struct CondDataValue : public BiffStructure_NoVtbl
{
unsigned int condDataValue;
private:
unsigned int reserved;
_UINT32 condDataValue;
_UINT32 reserved;
};
struct KPISets : public BiffStructure_NoVtbl
{
unsigned int set;
_UINT32 set;
enum {
KPINIL = 0xFFFFFFFF, // Sort by no-icon
KPI3ARROWS = 0x00000000, // Kpi3 Arrows set
......
......@@ -21,9 +21,9 @@ private:
private:
unsigned char reserved2_1;
unsigned int reserved2_2;
unsigned int reserved2_3;
unsigned int reserved2_4;
_UINT32 reserved2_2;
_UINT32 reserved2_3;
_UINT32 reserved2_4;
};
......@@ -36,10 +36,10 @@ private:
unsigned short ctp;
private:
unsigned short reserved_1;
unsigned int reserved_2;
unsigned int reserved_3;
unsigned int reserved_4;
_UINT16 reserved_1;
_UINT32 reserved_2;
_UINT32 reserved_3;
_UINT32 reserved_4;
};
......@@ -52,10 +52,10 @@ private:
unsigned short dateOp;
private:
unsigned short reserved_1;
unsigned int reserved_2;
unsigned int reserved_3;
unsigned int reserved_4;
_UINT16 reserved_1;
_UINT32 reserved_2;
_UINT32 reserved_3;
_UINT32 reserved_4;
};
......@@ -69,9 +69,9 @@ private:
private:
unsigned short reserved_1;
unsigned int reserved_2;
unsigned int reserved_3;
unsigned int reserved_4;
_UINT32 reserved_2;
_UINT32 reserved_3;
_UINT32 reserved_4;
};
......@@ -81,10 +81,10 @@ public:
//void toXML(BiffStructurePtr & parent);
private:
unsigned int unused1;
unsigned int unused2;
unsigned int unused3;
unsigned int unused4;
_UINT32 unused1;
_UINT32 unused2;
_UINT32 unused3;
_UINT32 unused4;
};
......
......@@ -120,9 +120,12 @@ public:
RwType rwLast;
ColType colFirst;
ColType colLast;
record >> rwFirst >> rwLast >> colFirst >> colLast;
rowFirst = rwFirst;
rowLast = rwLast;
switch(rel_info)
{
case rel_Present:
......
......@@ -20,7 +20,8 @@ BiffStructurePtr CellXF::clone()
void CellXF::store(CFRecord& record)
{
unsigned int flags = 0;
_UINT32 flags = 0;
SETBITS(flags, 0, 2, alc);
SETBIT(flags, 3, fWrap);
SETBITS(flags, 4, 6, alcV);
......@@ -68,11 +69,13 @@ void CellXF::load(CFRecord& record)
{
m_GlobalWorkbookInfo = record.getGlobalWorkbookInfo();
unsigned int flags1;
unsigned int flags2;
unsigned int flags3;
unsigned short flags4;
_UINT32 flags1;
_UINT32 flags2;
_UINT32 flags3;
_UINT16 flags4;
record >> flags1 >> flags2 >> flags3 >> flags4;
alc = static_cast<unsigned char>(GETBITS(flags1, 0, 2));
fWrap = GETBIT(flags1, 3);
alcV = static_cast<unsigned char>(GETBITS(flags1, 4, 6));
......
......@@ -46,7 +46,8 @@ BiffStructurePtr DXFALC::clone()
//
void DXFALC::store(CFRecord& record)
{
unsigned int flags = 0;
_UINT32 flags = 0;
SETBITS(flags, 0, 2, alc);
SETBIT(flags, 3, fWrap);
SETBITS(flags, 4, 6, alcv);
......@@ -63,8 +64,9 @@ void DXFALC::store(CFRecord& record)
void DXFALC::load(CFRecord& record)
{
unsigned int flags;
_UINT32 flags;
record >> flags;
alc = static_cast<unsigned char>(GETBITS(flags, 0, 2));
fWrap = GETBIT(flags, 3);
alcv = static_cast<unsigned char>(GETBITS(flags, 4, 6));
......
......@@ -18,17 +18,17 @@ public:
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
unsigned char alc;
bool fWrap;
unsigned char alcv;
bool fJustLast;
unsigned char trot;
unsigned char cIndent;
bool fShrinkToFit;
bool fMergeCell;
unsigned char iReadingOrder;
unsigned int iIndent;
unsigned char alc;
bool fWrap;
unsigned char alcv;
bool fJustLast;
unsigned char trot;
unsigned char cIndent;
bool fShrinkToFit;
bool fMergeCell;
unsigned char iReadingOrder;
_UINT32 iIndent;
};
} // namespace XLS
......
......@@ -50,7 +50,8 @@ BiffStructurePtr DXFBdr::clone()
//
void DXFBdr::store(CFRecord& record)
{
unsigned int flags = 0;
_UINT32 flags = 0;
SETBITS(flags, 0, 3, dgLeft);
SETBITS(flags, 4, 7, dgRight);
SETBITS(flags, 8, 11, dgTop);
......@@ -61,7 +62,8 @@ void DXFBdr::store(CFRecord& record)
SETBIT(flags, 31, bitDiagUp);
record << flags;
unsigned int flags2 = 0;
_UINT32 flags2 = 0;
SETBITS(flags2, 0, 6, icvTop);
SETBITS(flags2, 7, 13, icvBottom);
SETBITS(flags2, 14, 20, icvDiag);
......@@ -72,14 +74,16 @@ void DXFBdr::store(CFRecord& record)
void DXFBdr::load(CFRecord& record)
{
unsigned int flags;
_UINT32 flags;
record >> flags;
dgLeft = static_cast<unsigned char>(GETBITS(flags, 0, 3));
dgRight = static_cast<unsigned char>(GETBITS(flags, 4, 7));
dgTop = static_cast<unsigned char>(GETBITS(flags, 8, 11));
dgBottom = static_cast<unsigned char>(GETBITS(flags, 12, 15));
icvLeft = static_cast<unsigned char>(GETBITS(flags, 16, 22));
icvRight = static_cast<unsigned char>(GETBITS(flags, 23, 29));
bitDiagDown = GETBIT(flags, 30);
bitDiagUp = GETBIT(flags, 31);
......
......@@ -22,15 +22,17 @@ public:
virtual void store(CFRecord& record);
XLUnicodeStringNoCch stFontName;
Stxp stxp;
int icvFore;
Ts tsNinch;
Boolean<unsigned int> fSssNinch;
Boolean<unsigned int> fUlsNinch;
Boolean<unsigned int> fBlsNinch;
int ich;
int cch;
unsigned short iFnt;
Stxp stxp;
_INT32 icvFore;
Ts tsNinch;
_UINT32 fSssNinch;
_UINT32 fUlsNinch;
_UINT32 fBlsNinch;
_INT32 ich;
_INT32 cch;
_UINT16 iFnt;
};
......
......@@ -22,7 +22,7 @@ public:
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
unsigned int index;
_UINT32 index;
};
} // namespace XLS
......
......@@ -137,7 +137,8 @@ BiffStructurePtr DXFN::clone()
//
void DXFN::store(CFRecord& record)
{
unsigned int flags = 0;
_UINT32 flags = 0;
SETBIT(flags, 0, alchNinch);
SETBIT(flags, 1, alcvNinch);
SETBIT(flags, 2, wrapNinch);
......@@ -167,7 +168,8 @@ void DXFN::store(CFRecord& record)
SETBIT(flags, 30, ibitAtrProt);
SETBIT(flags, 31, iReadingOrderNinch);
record << flags;
unsigned short flags2 = 0;
_UINT16 flags2 = 0;
SETBIT(flags2, 0, fIfmtUser);
SETBIT(flags2, 2, fNewBorder);
SETBIT(flags2, 15, fZeroInited);
......@@ -202,8 +204,9 @@ void DXFN::store(CFRecord& record)
void DXFN::load(CFRecord& record)
{
unsigned int flags;
_UINT32 flags;
record >> flags;
alchNinch = GETBIT(flags, 0);
alcvNinch = GETBIT(flags, 1);
wrapNinch = GETBIT(flags, 2);
......
......@@ -20,9 +20,9 @@ public:
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
unsigned int cbDxf;
DXFNPtr dxfn;
XFExtNoFRTPtr xfext;
_UINT32 cbDxf;
DXFNPtr dxfn;
XFExtNoFRTPtr xfext;
};
} // namespace XLS
......
......@@ -20,11 +20,11 @@ public:
virtual void store(XLS::CFRecord& record);
EncryptionHeaderFlags Flags;
int AlgID;
int AlgIDHash;
unsigned int KeySize;
unsigned int ProviderType;
std::wstring CSPName;
_INT32 AlgID;
_INT32 AlgIDHash;
_UINT32 KeySize;
_UINT32 ProviderType;
std::wstring CSPName;
};
} // namespace CRYPTO
......
......@@ -18,25 +18,28 @@ public:
virtual void load(XLS::CFRecord& record);
virtual void store(XLS::CFRecord& record);
unsigned int SaltSize;
struct SALT_TAG {
unsigned int b1;
unsigned int b2;
unsigned int b3;
unsigned int b4;
_UINT32 SaltSize;
struct SALT_TAG
{
_UINT32 b1;
_UINT32 b2;
_UINT32 b3;
_UINT32 b4;
} Salt;
struct ENCRYPTED_VERIFIER_TAG {
unsigned int b1;
unsigned int b2;
unsigned int b3;
unsigned int b4;
struct ENCRYPTED_VERIFIER_TAG
{
_UINT32 b1;
_UINT32 b2;
_UINT32 b3;
_UINT32 b4;
} EncryptedVerifier;
unsigned int VerifierHashSize;
struct ENCRYPTED_VERIFIER_HASH_TAG {
unsigned int b1;
unsigned int b2;
unsigned int b3;
unsigned int b4;
_UINT32 VerifierHashSize;
struct ENCRYPTED_VERIFIER_HASH_TAG
{
_UINT32 b1;
_UINT32 b2;
_UINT32 b3;
_UINT32 b4;
} EncryptedVerifierHash;
};
......
......@@ -20,9 +20,9 @@ public:
static const ElementType type = typeExternOleDdeLink;
unsigned int lStgName;
ShortXLUnicodeString linkName;
MOper moper;
_UINT32 lStgName;
ShortXLUnicodeString linkName;
MOper moper;
};
} // namespace XLS
......
......@@ -22,7 +22,7 @@ void FactoidType::store(XLS::CFRecord& record)
void FactoidType::load(XLS::CFRecord& record)
{
unsigned int cbFactoid;
_UINT32 cbFactoid;
record >> cbFactoid >> id >> rgbUri >> rgbTag >> rgbDownLoadURL;
}
......
......@@ -20,7 +20,7 @@ public:
virtual void load(XLS::CFRecord& record);
virtual void store(XLS::CFRecord& record);
unsigned int id;
_UINT32 id;
PBString rgbUri;
PBString rgbTag;
PBString rgbDownLoadURL;
......
......@@ -45,7 +45,7 @@ void Feat11FdaAutoFilter::load(CFRecord& record)
record >> cbAutoFilter;
record.skipNunBytes(2);
unsigned int size = cbAutoFilter;
_UINT32 size = cbAutoFilter;
if (cbAutoFilter)
recAutoFilter.readFields(record);
}
......
......@@ -65,7 +65,7 @@ void Feat11FieldDataItem::load(CFRecord& record)
record >> cbFmtAgg;
record >> istnAgg;
unsigned int flags;
_UINT32 flags;
record >> flags;
fAutoFilter = static_cast<unsigned char>(GETBIT(flags, 0));
......
......@@ -35,7 +35,7 @@ void FeatProtection::store(CFRecord& record)
void FeatProtection::load(CFRecord& record)
{
unsigned int flags;
_UINT32 flags;
record >> flags;
fSD = GETBIT(flags, 0);
record >> wPassword >> stTitle;
......
......@@ -23,10 +23,11 @@ public:
static const ElementType type = typeFeatProtection;
bool fSD;
unsigned int wPassword;
_UINT32 wPassword;
XLUnicodeString stTitle;
SDContainer sdContainer;
bool sdContainer_set;
SDContainer sdContainer;
bool sdContainer_set;
};
} // namespace XLS
......
......@@ -22,8 +22,8 @@ public:
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
unsigned int hashValue;
std::vector<FactoidData> rgFactoid;
_UINT32 hashValue;
std::vector<FactoidData> rgFactoid;
};
} // namespace XLS
......
......@@ -33,13 +33,14 @@ void FileMoniker::store(XLS::CFRecord& record)
void FileMoniker::load(XLS::CFRecord& record)
{
unsigned int ansiLength;
_UINT32 ansiLength;
record >> cAnti >> ansiLength >> ansiPath >> endServer >> versionNumber;
record.skipNunBytes(20); // reserved
record >> cbUnicodePathSize;
if(cbUnicodePathSize)
{
unsigned int cbUnicodePathBytes;
_UINT32 cbUnicodePathBytes;
record >> cbUnicodePathBytes >> usKeyValue;
#if defined(_WIN32) || defined(_WIN64)
......
......@@ -20,13 +20,13 @@ public:
virtual void load(XLS::CFRecord& record);
virtual void store(XLS::CFRecord& record);
unsigned short cAnti;
std::string ansiPath;
unsigned short endServer;
unsigned short versionNumber;
unsigned int cbUnicodePathSize;
unsigned short usKeyValue;
std::wstring unicodePath;
_UINT16 cAnti;
std::string ansiPath;
_UINT16 endServer;
_UINT16 versionNumber;
_UINT32 cbUnicodePathSize;
_UINT16 usKeyValue;
std::wstring unicodePath;
};
} // namespace OSHARED
......
......@@ -21,7 +21,7 @@ public:
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
unsigned int offset;
_UINT32 offset;
};
typedef boost::shared_ptr<FilePointer> FilePointerPtr;
......
......@@ -25,9 +25,9 @@ public:
virtual void load(CFRecord& record){}
virtual void store(CFRecord& record){}
ObjFmla fmla;
unsigned int lPosInCtlStm;
unsigned int cbBufInCtlStm;
ObjFmla fmla;
_UINT32 lPosInCtlStm;
_UINT32 cbBufInCtlStm;
PictFmlaKey key;
};
......
......@@ -21,7 +21,7 @@ public:
unsigned char icv;
unsigned char xclrType;
short nTintShade;
unsigned int xclrValue;
_UINT32 xclrValue;
};
} // namespace XLS
......@@ -19,11 +19,12 @@ public:
static const ElementType type = typeGradStop;
unsigned short xclrType;
unsigned int xclrValue;
LongRGBA xclrValue_rgb;
double numPosition;
double numTint;
_UINT16 xclrType;
_UINT32 xclrValue;
LongRGBA xclrValue_rgb;
double numPosition;
double numTint;
};
} // namespace XLS
......@@ -15,7 +15,8 @@ XLS::BiffStructurePtr HyperlinkObject::clone()
void HyperlinkObject::store(XLS::CFRecord& record)
{
unsigned int flags = 0;
_UINT32 flags = 0;
SETBIT(flags, 0, hlstmfHasMoniker);
SETBIT(flags, 1, hlstmfIsAbsolute);
SETBIT(flags, 2, hlstmfSiteGaveDisplayName);
......@@ -67,7 +68,8 @@ void HyperlinkObject::store(XLS::CFRecord& record)
void HyperlinkObject::load(XLS::CFRecord& record)
{
unsigned int flags;
_UINT32 flags;
record >> streamVersion >> flags;
hlstmfHasMoniker = GETBIT(flags, 0);
......
......@@ -28,7 +28,7 @@ public:
virtual void load(XLS::CFRecord& record);
virtual void store(XLS::CFRecord& record);
unsigned int streamVersion;
_UINT32 streamVersion;
static const XLS::ElementType type = XLS::typeHyperlinkObject;
......
......@@ -18,8 +18,8 @@ public:
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
unsigned int ib;
unsigned short cbOffset;
_UINT32 ib;
_UINT16 cbOffset;
};
typedef boost::shared_ptr<ISSTInf> ISSTInfPtr;
......
......@@ -49,8 +49,9 @@ void ItemMoniker::store(XLS::CFRecord& record)
void ItemMoniker::load(XLS::CFRecord& record)
{
unsigned int delimiterLength;
_UINT32 delimiterLength;
record >> delimiterLength >> delimiterAnsi;
int sizeof_delimiterUnicode = delimiterLength - (delimiterAnsi.length() + 1);
if(sizeof_delimiterUnicode > 0)
......@@ -63,8 +64,9 @@ void ItemMoniker::load(XLS::CFRecord& record)
record.skipNunBytes(sizeof_delimiterUnicode);
}
unsigned int itemLength;
_UINT32 itemLength;
record >> itemLength >> itemAnsi;
int sizeof_itemUnicode = itemLength - (itemAnsi.length() + 1);
if(sizeof_itemUnicode > 0)
......
......@@ -18,7 +18,7 @@ public:
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
unsigned int index;
_UINT32 index;
};
typedef boost::shared_ptr<MDXStrIndex> MDXStrIndexPtr;
......
......@@ -18,8 +18,8 @@ public:
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
int imdt;
unsigned short mdd;
_INT32 imdt;
_UINT16 mdd;
};
typedef boost::shared_ptr<MDir> MDirPtr;
......
......@@ -23,21 +23,23 @@ public:
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
RRD rrd;
bool bitfDelNote;
bool bitfAddNote;
RwU row;
ColU col;
bool fShow;
bool fRwHidden;
bool fColHidden;
_GUID_ guid;
unsigned int ichEnd;
unsigned int cchNote;
XLUnicodeString stAuthor;
RRD rrd;
bool bitfDelNote;
bool bitfAddNote;
RwU row;
ColU col;
bool fShow;
bool fRwHidden;
bool fColHidden;
_GUID_ guid;
_UINT32 ichEnd;
_UINT32 cchNote;
XLUnicodeString stAuthor;
};
} // namespace XLS
......
......@@ -55,13 +55,16 @@ void OfficeArtBStoreContainerFileBlock::load(XLS::CFRecord& record)
unsigned short tag;
record >> tag;
unsigned int size;
_UINT32 size;
record >> size;
unsigned int cRef;
_UINT32 cRef;
record >> cRef;
unsigned int foDelay;
_UINT32 foDelay;
record >> foDelay;
record.skipNunBytes(1);
char cbName;
record >> cbName;
record.skipNunBytes(2);
......
......@@ -38,10 +38,10 @@ public:
XLS::RwU rwB;
short dyB;
unsigned int _dxL;
unsigned int _dyT;
unsigned int _dxR;
unsigned int _dyB;
_UINT32 _dxL;
_UINT32 _dyT;
_UINT32 _dxR;
_UINT32 _dyB;
};
typedef boost::shared_ptr<OfficeArtClientAnchorSheet> OfficeArtClientAnchorSheetPtr;
......@@ -65,10 +65,10 @@ public:
short dxR;
short dyB;
unsigned int _dxL;
unsigned int _dyT;
unsigned int _dxR;
unsigned int _dyB;
_UINT32 _dxL;
_UINT32 _dyT;
_UINT32 _dxR;
_UINT32 _dyB;
};
typedef boost::shared_ptr<OfficeArtChildAnchor> OfficeArtChildAnchorPtr;
......
......@@ -23,8 +23,8 @@ public:
static const XLS::ElementType type = XLS::typeOfficeArtFDG;
unsigned int csp;
unsigned int spidCur;
_UINT32 csp;
_UINT32 spidCur;
};
typedef boost::shared_ptr<OfficeArtFDG> OfficeArtFDGPtr;
......
......@@ -43,7 +43,7 @@ XLS::BiffStructurePtr OfficeArtFDGGBlock::clone()
void OfficeArtFDGGBlock::storeFields(XLS::CFRecord& record)
{
unsigned int cidcl = Rgidcl.size();
_UINT32 cidcl = Rgidcl.size();
record << spidMax << cidcl << cspSaved << cdgSaved;
record << Rgidcl;
}
......@@ -51,7 +51,7 @@ void OfficeArtFDGGBlock::storeFields(XLS::CFRecord& record)
void OfficeArtFDGGBlock::loadFields(XLS::CFRecord& record)
{
unsigned int cidcl;
_UINT32 cidcl;
record >> spidMax >> cidcl >> cspSaved >> cdgSaved;
for(size_t i = 0; i < cidcl - 1; ++i)
......
......@@ -25,9 +25,10 @@ public:
virtual void loadFields(XLS::CFRecord& record);
virtual void storeFields(XLS::CFRecord& record);
unsigned int spidMax;
unsigned int cspSaved;
unsigned int cdgSaved;
_UINT32 spidMax;
_UINT32 cspSaved;
_UINT32 cdgSaved;
std::vector<OfficeArtIDCL> Rgidcl;
};
......
......@@ -596,6 +596,7 @@ void MSOPOINT::load(XLS::CFRecord& record)
{
unsigned char x_;
record >> x_;
x = GETBITS(x_,0 , 3) << 8;
y = GETBITS(x_,4 , 8) << 8;
}
......
......@@ -573,8 +573,8 @@ class MSOPOINT : public XLS::BiffStructure
static const XLS::ElementType type = XLS::typeOfficeArtRecord;
int x;
int y;
_INT32 x;
_INT32 y;
int cbElement;
};
......
......@@ -20,7 +20,8 @@ XLS::BiffStructurePtr OfficeArtFSP::clone()
void OfficeArtFSP::storeFields(XLS::CFRecord& record)
{
unsigned int flags = 0;
_UINT32 flags = 0;
SETBIT(flags, 0, fGroup);
SETBIT(flags, 1, fChild);
SETBIT(flags, 2, fPatriarch);
......@@ -40,7 +41,7 @@ void OfficeArtFSP::storeFields(XLS::CFRecord& record)
void OfficeArtFSP::loadFields(XLS::CFRecord& record)
{
unsigned int flags;
_UINT32 flags;
record >> spid >> flags;
fGroup = GETBIT(flags, 0);
......
......@@ -26,8 +26,8 @@ public:
const unsigned short GetInstanceToStore();
unsigned short shape_id;
unsigned int spid;
_UINT16 shape_id;
_UINT32 spid;
bool fGroup;
bool fChild;
......
......@@ -23,10 +23,10 @@ public:
virtual void loadFields(XLS::CFRecord& record);
virtual void storeFields(XLS::CFRecord& record);
int xLeft;
int yTop;
int xRight;
int yBottom;
_INT32 xLeft;
_INT32 yTop;
_INT32 xRight;
_INT32 yBottom;
};
typedef boost::shared_ptr<OfficeArtFSPGR> OfficeArtFSPGRPtr;
......
......@@ -21,9 +21,8 @@ public:
virtual void load(XLS::CFRecord& record);
virtual void store(XLS::CFRecord& record);
public:
unsigned int dgid;
unsigned int cspidCur;
_UINT32 dgid;
_UINT32 cspidCur;
};
typedef boost::shared_ptr<OfficeArtIDCL> OfficeArtIDCLPtr;
......
......@@ -42,10 +42,10 @@ public:
virtual void store(XLS::CFRecord& record);
virtual void load(XLS::CFRecord& record);
unsigned int cbSize;
_UINT32 cbSize;
RECT rcBounds;
POINT ptSize;
unsigned int cbSave;
_UINT32 cbSave;
unsigned char compression;
unsigned char filter;
};
......
......@@ -28,7 +28,7 @@ public:
unsigned char recVer;
unsigned short recInstance;
unsigned short recType;
unsigned int recLen;
_UINT32 recLen;
};
typedef boost::shared_ptr<OfficeArtRecordHeader> OfficeArtRecordHeaderPtr;
......
......@@ -82,12 +82,12 @@ public:
static const XLS::ElementType type = XLS::typeOfficeArtClientData;//FConnectorRule
unsigned int ruid;
unsigned int spidA;
unsigned int spidB;
unsigned int spidC;
unsigned int cptiA;
unsigned int cptiB;
_UINT32 ruid;
_UINT32 spidA;
_UINT32 spidB;
_UINT32 spidC;
_UINT32 cptiA;
_UINT32 cptiB;
};
......
......@@ -40,7 +40,7 @@ void PictFmlaKey::store(CFRecord& record)
void PictFmlaKey::load(CFRecord& record)
{
unsigned int cbKey;
_UINT32 cbKey;
record >> cbKey;
record.skipNunBytes(cbKey); // ActiveX license key is here
......
......@@ -42,8 +42,9 @@ void PropertyBagStore::store(XLS::CFRecord& record)
void PropertyBagStore::load(XLS::CFRecord& record)
{
unsigned int cFactoidType;
_UINT32 cFactoidType;
record >> cFactoidType;
for(size_t i = 0; i < cFactoidType; ++i)
{
FactoidType f;
......@@ -52,7 +53,7 @@ void PropertyBagStore::load(XLS::CFRecord& record)
}
record >> cbHdr >> sVer;
record.skipNunBytes(4); // ignored
unsigned int cste;
_UINT32 cste;
record >> cste;
for(size_t i = 0; i < cste; ++i)
{
......
......@@ -42,11 +42,13 @@ void PtgExtraElf::store(CFRecord& record)
void PtgExtraElf::load(CFRecord& record)
{
unsigned int flags;
_UINT32 flags;
record >> flags;
unsigned int count = flags & 0x3fffffff;
_UINT32 count = flags & 0x3fffffff;
fRel = GETBIT(flags, 31);
for(unsigned int i = 0; i < count; ++i)
for(_UINT32 i = 0; i < count; ++i)
{
RgceElfLocExtra cell_ref;
record >> cell_ref;
......
......@@ -73,6 +73,18 @@ void PtgFuncVar::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data)
if(0xFF == tab.getIndex() && ptg_stack.size() > 0) // user-defined function
{
func_name = ptg_stack.top();
if ( func_name == L"WEEKS" ||
func_name == L"DAYSINYEAR" ||
func_name == L"DAYSINMONTH" ||
func_name == L"ISLEAPYEAR" ||
func_name == L"MONTHS" ||
func_name == L"WEEKS" ||
func_name == L"WEEKSINYEAR" ||
func_name == L"YEARS")
{
func_name = L"_xll." + func_name;
}
ptg_stack.pop();
}
ptg_stack.push(func_name + L'(' + arguments + L')');
......
......@@ -54,9 +54,9 @@ void PtgName::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data)
std::wstring ptg;
if ((global_info) && (nameindex <= global_info->defineNames.size()))
if ((global_info) && (nameindex <= global_info->arDefineNames.size()))
{
ptg = global_info->defineNames[nameindex-1];
ptg = global_info->arDefineNames[nameindex-1];
}
if(!ptg.empty())
......
......@@ -24,7 +24,7 @@ public:
static const unsigned short fixed_id = 0x03;
unsigned int nameindex;
_UINT32 nameindex;
private:
GlobalWorkbookInfoPtr global_info;
};
......
......@@ -50,10 +50,23 @@ void PtgNameX::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data)
return;
}
std::wstring udfName;
if(nameindex > 0 && nameindex <= global_info->AddinUdfs.size() && !(udfName = global_info->AddinUdfs[nameindex - 1]).empty())
std::wstring _Name;
if(nameindex > 0 && nameindex <= global_info->AddinUdfs.size() && !(_Name = global_info->AddinUdfs[nameindex - 1]).empty())
{
ptg_stack.push(udfName);
ptg_stack.push(_Name);
}
else if(ixti > 0 && ixti <= global_info->xti_parsed.size())
{
std::wstring sheet = global_info->xti_parsed[ixti-1];
if (!sheet.empty()) sheet += L"!";
if (nameindex > 0 && nameindex <= global_info->arDefineNames.size())
{
_Name = global_info->arDefineNames[nameindex - 1];
}
ptg_stack.push(sheet + _Name);
}
else
{
......
......@@ -25,8 +25,8 @@ public:
void fromString(const std::wstring& word);
unsigned short ixti;
unsigned int nameindex;
_UINT16 ixti;
_UINT32 nameindex;
private:
GlobalWorkbookInfoPtr global_info;
};
......
......@@ -20,7 +20,7 @@ public:
virtual void assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data);
private:
unsigned int sxIndex;
_UINT32 sxIndex;
};
} // namespace XLS
......
......@@ -24,7 +24,7 @@ public:
Version EncryptionVersionInfo;
EncryptionHeaderFlags Flags;
unsigned int EncryptionHeaderSize;
_UINT32 EncryptionHeaderSize;
EncryptionHeader encryptionHeader;
EncryptionVerifier encryptionVerifier;
};
......
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