Commit 1746479d authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

XlsFile2

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63565 954022d7-b5bf-4e40-9824-e11837661b57
parent f37beb96
......@@ -398,9 +398,9 @@ ASCOfficeXlsFile2/ASCOfficeXlsFileTest svnc_tsvn_003alogminsize=5
ASCOfficeXlsFile2/ASCOfficeXlsFileTest/Guideline.docx svn_mime_002dtype=application%2Foctet-stream
ASCOfficeXlsFile2/linux svnc_tsvn_003alogminsize=5
ASCOfficeXlsFile2/source svnc_tsvn_003alogminsize=5
ASCOfficeXlsFile2/source/Common svnc_tsvn_003alogminsize=5
ASCOfficeXlsFile2/source/XlsFormat svnc_tsvn_003alogminsize=5
ASCOfficeXlsFile2/source/XlsFormat/Auxiliary svnc_tsvn_003alogminsize=5
ASCOfficeXlsFile2/source/XlsFormat/Auxiliary/nullable svnc_tsvn_003alogminsize=5
ASCOfficeXlsFile2/source/XlsFormat/Binary svnc_tsvn_003alogminsize=5
ASCOfficeXlsFile2/source/XlsFormat/Crypt svnc_tsvn_003alogminsize=5
ASCOfficeXlsFile2/source/XlsFormat/Crypt/rtl svnc_tsvn_003alogminsize=5
......@@ -487,7 +487,7 @@ namespace XMLSTUFF
const std::wstring tab2sheet_name(const short tabid, std::vector<std::wstring>& sheets_names)
{
if(tabid >= 0 && static_cast<unsigned __int16>(tabid) < sheets_names.size())
if(tabid >= 0 && static_cast<unsigned short>(tabid) < sheets_names.size())
{
return sheets_names[tabid];
}
......@@ -495,9 +495,9 @@ const std::wstring tab2sheet_name(const short tabid, std::vector<std::wstring>&
}
//
const std::wstring xti2sheets(const unsigned __int16 ixti, std::vector<std::wstring>& xti_parsed)
const std::wstring xti2sheets(const unsigned short ixti, std::vector<std::wstring>& xti_parsed)
{
if(ixti >= 0 && static_cast<unsigned __int16>(ixti) < xti_parsed.size())
if(ixti >= 0 && static_cast<unsigned short>(ixti) < xti_parsed.size())
{
return xti_parsed[ixti];
}
......@@ -522,7 +522,7 @@ const std::wstring xti_indexes2sheet_name(const short itabFirst, const short ita
return escaped_prefix;
}
const std::wstring make3dRef(const unsigned __int16 ixti, const std::wstring cell_ref, std::vector<std::wstring>& xti_parsed)
const std::wstring make3dRef(const unsigned short ixti, const std::wstring cell_ref, std::vector<std::wstring>& xti_parsed)
{
std::wstring sheets_prefix = xti2sheets(ixti, xti_parsed);
if(L"#REF!" == sheets_prefix)
......@@ -550,7 +550,7 @@ const std::wstring make3dRef(const unsigned __int16 ixti, const std::wstring cel
//}
//
//
//const unsigned __int16 sheetsnames2ixti(const std::wstring str, MSXML2::IXMLDOMDocumentPtr doc)
//const unsigned short sheetsnames2ixti(const std::wstring str, MSXML2::IXMLDOMDocumentPtr doc)
//{
// std::wstring sheet_first_id;
// std::wstring sheet_last_id;
......
......@@ -52,8 +52,8 @@ namespace XMLSTUFF
// Makes a new tag and append it to parent (no attributes set)
//BiffStructurePtr createElement(const std::wstring & tag_name, BiffStructurePtr & parent);
const std::wstring make3dRef(const unsigned __int16 ixti, const std::wstring cell_ref, std::vector<std::wstring>& xti_parsed);
//const unsigned __int16 sheetsnames2ixti(const std::wstring str, MSXML2::IXMLDOMDocumentPtr doc);
const std::wstring make3dRef(const unsigned short ixti, const std::wstring cell_ref, std::vector<std::wstring>& xti_parsed);
//const unsigned short sheetsnames2ixti(const std::wstring str, MSXML2::IXMLDOMDocumentPtr doc);
const std::wstring xti_indexes2sheet_name(const short itabFirst, const short itabLast, std::vector<std::wstring>& sheets_names);
......
#pragma once
#include <boost/optional.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/call_traits.hpp>
//#include "../../Exception/WrongAPIUsage.h"
template<typename T>
class nullable
{
private:
typedef typename boost::call_traits<T>::param_type Parameter;
public:
nullable() {}
nullable(Parameter value) : _value(value) {}
template<typename U>
const nullable<T>& operator =(const U& value)
{
return ::nullable_setter(*this, value);
}
template<typename U>
const nullable<T>& nullable_setter(const U& value)
{
_value = static_cast<T>(value);
return *this;
}
const nullable<T>& nullable_setter(const nullable<T>& value)
{
_value = value;
return *this;
}
operator Parameter() const {return _value.get();}
Parameter get() const {return _value.get();}
Parameter get_value_or(Parameter value) const {return _value.get_value_or(value);}
T const* operator->() const {return _value.get_ptr();}
T* operator->() {return _value.get_ptr();}
T const* get_ptr() const {return _value.get_ptr();}
T* get_ptr() {return _value.get_ptr();}
T const& operator*() const {return *_value;}
T& operator*() {return *_value;}
const bool is_init() const {return _value.is_init();}
void reset() {_value.reset();};
const bool operator== (nullable<T> const& rhs) const {return _value.get() == rhs._value.get();}
const bool operator!= (nullable<T> const& rhs) const {return _value.get() != rhs._value.get();}
const bool operator< (nullable<T> const& rhs) const {return _value.get() < rhs._value.get();}
const bool operator> (nullable<T> const& rhs) const {return _value.get() > rhs._value.get();}
const bool operator<= (nullable<T> const& rhs) const {return _value.get() <= rhs._value.get();}
const bool operator>= (nullable<T> const& rhs) const {return _value.get() >= rhs._value.get();}
const bool operator== (Parameter rhs) const {return _value.get() == rhs;}
const bool operator!= (Parameter rhs) const {return _value.get() != rhs;}
const bool operator< (Parameter rhs) const {return _value.get() < rhs;}
const bool operator> (Parameter rhs) const {return _value.get() > rhs;}
const bool operator<= (Parameter rhs) const {return _value.get() <= rhs;}
const bool operator>= (Parameter rhs) const {return _value.get() >= rhs;}
private:
template<class T, bool big_type>
class _nullable
{
private:
typedef typename boost::call_traits<T>::param_type Parameter;
public:
_nullable() {}
_nullable(Parameter val) : _value(new T(val)) {}
void operator =(Parameter val) { _value.reset(new T(val));}
void operator =(const nullable<T>& other)
{
if (other.is_init())
_value.reset(new T(other));
else
_value = boost::shared_ptr<T>();
}
Parameter get() const
{
if(is_init())
return *_value;
else
throw;// EXCEPT::LE::WrongAPIUsage("One of nullable objects was used uninitialized.", __FUNCTION__);
}
Parameter get_value_or(Parameter val) const {return is_init() ? get() : val;}
const bool is_init() const {return _value != 0;}
void reset() {_value.reset();}
T const* get_ptr() const {return _value.get();}
T* get_ptr() {return _value.get();}
T const& operator*() const {return get();}
T& operator*() {return get();}
private:
boost::shared_ptr<T> _value;
};
template<class T>
class _nullable<T, false>
{
private:
typedef typename boost::call_traits<T>::param_type Parameter;
public:
_nullable() {}
_nullable(Parameter value) : _value(value) {}
void operator =(Parameter val) {_value = val;}
void operator =(const nullable<T>& other)
{
if (other.is_init())
_value = other;
else
_value = boost::optional<T>();
}
Parameter get() const
{
if(is_init())
return _value.get();
else
throw;// EXCEPT::LE::WrongAPIUsage("One of nullable objects was used uninitialized.", __FUNCTION__);
}
Parameter get_value_or(Parameter val) const {return _value.get_value_or(val);}
const bool is_init() const {return _value.is_initialized();}
void reset() {_value.reset();}
T const* get_ptr() const {return _value.get_ptr();}
T* get_ptr() {return _value.get_ptr();}
T const& operator*() const {return get();}
T& operator*() {return get();}
private:
boost::optional<T> _value;
};
private:
static const int size_of_big_object = 128;
_nullable<T, sizeof(T) / (size_of_big_object + 1) >= 1> _value;
};
template<class T> const bool operator== (typename boost::call_traits<T>::param_type x, nullable<T> const& y) {return y == x;}
template<class T> const bool operator!= (typename boost::call_traits<T>::param_type x, nullable<T> const& y) {return y != x;}
template<class T> const bool operator< (typename boost::call_traits<T>::param_type x, nullable<T> const& y) {return y >= x;}
template<class T> const bool operator> (typename boost::call_traits<T>::param_type x, nullable<T> const& y) {return y <= x;}
template<class T> const bool operator<= (typename boost::call_traits<T>::param_type x, nullable<T> const& y) {return y > x;}
template<class T> const bool operator>= (typename boost::call_traits<T>::param_type x, nullable<T> const& y) {return y < x;}
template<typename T, typename U>
const nullable<T>& nullable_setter(nullable<T>& lhs, const U& rhs)
{
return lhs.nullable_setter(rhs);
}
......@@ -17,12 +17,12 @@ CFRecord::CFRecord(CFStreamPtr stream, GlobalWorkbookInfoPtr global_info)
{
file_ptr = static_cast<unsigned int>(stream->getStreamPointer()); // Assume that files have size < 4Gb
*stream >> type_id_;
unsigned __int16 size_short;
unsigned short size_short;
*stream >> size_short;
size_ = size_short;
data_ = new char[size_];
unsigned __int64 rec_data_pos = stream->getStreamPointer();
unsigned long rec_data_pos = stream->getStreamPointer();
stream->read(data_, size_);
if(global_info->decryptor && 0 != size_)
......@@ -64,7 +64,7 @@ void CFRecord::save(CFStreamPtr stream)
{
file_ptr = static_cast<unsigned int>(stream->getStreamPointer()); // Assume that files have size < 4Gb
*stream << type_id_;
unsigned __int16 size_short = static_cast<unsigned __int16>(size_);
unsigned short size_short = static_cast<unsigned short>(size_);
*stream << size_short;
if(data_)
{
......@@ -293,7 +293,7 @@ void CFRecord::registerDelayedDataReceiver(CFStream::DELAYED_DATA_SAVER fn, cons
//ASSERT(!data_); // This throws if used after Commit or while reading of binary
CFStream::ReceiverItem item;
item.fn = fn;
item.data_place = size_ + sizeof(unsigned __int16)/*size_short*/ + sizeof(CFRecordType::TypeId); // set offset relative to record beginning.
item.data_place = size_ + sizeof(unsigned short)/*size_short*/ + sizeof(CFRecordType::TypeId); // set offset relative to record beginning.
item.data_size = n;
item.receiver_id = rt_NONE == receiver_id ? getTypeId() : receiver_id;
receiver_items.push_back(item);
......
......@@ -4,8 +4,7 @@
#include "CFStream.h"
#include "BinSmartPointers.h"
#include "../Logic/GlobalWorkbookInfo.h"
#include "../Auxiliary/nullable/nullable.h"
#include <common.h>
namespace XLS
{;
......@@ -110,7 +109,7 @@ public:
GlobalWorkbookInfoPtr getGlobalWorkbookInfo() { return global_info_; }
CFRecord& operator>>(unsigned char& val) { loadAnyData(val); return *this; };
CFRecord& operator>>(unsigned __int16& val) { loadAnyData(val); return *this; };
CFRecord& operator>>(unsigned short& val) { loadAnyData(val); return *this; };
CFRecord& operator>>(unsigned int& val) { loadAnyData(val); return *this; };
CFRecord& operator>>(long& val) { loadAnyData(val); return *this; };
CFRecord& operator>>(double& val) { loadAnyData(val); return *this; };
......@@ -122,7 +121,7 @@ public:
CFRecord& operator>>(std::wstring & val);
CFRecord& operator<<(unsigned char& val) { storeAnyData(val); return *this; };
CFRecord& operator<<(unsigned __int16& val) { storeAnyData(val); return *this; };
CFRecord& operator<<(unsigned short& val) { storeAnyData(val); return *this; };
CFRecord& operator<<(unsigned int& val) { storeAnyData(val); return *this; };
CFRecord& operator<<(long& val) { storeAnyData(val); return *this; };
CFRecord& operator<<(double& val) { storeAnyData(val); return *this; };
......@@ -209,7 +208,7 @@ CFRecord& operator<<(CFRecord & record, std::basic_string<T, std::char_traits<T>
// moved out of the class to be higher in priority than the universal operator
template<class T>
CFRecord& operator>>(CFRecord & record, nullable<T>& val)
CFRecord& operator>>(CFRecord & record, _CP_OPT(T)& val)
{
T temp_val;
record.loadAnyData(temp_val);
......@@ -220,14 +219,14 @@ CFRecord& operator>>(CFRecord & record, nullable<T>& val)
// moved out of the class to be higher in priority than the universal operator
template<class T>
CFRecord& operator<<(CFRecord & record, nullable<T>& val)
CFRecord& operator<<(CFRecord & record, _CP_OPT(T)& val)
{
T temp_val(val);
T temp_val(*val);
record.storeAnyData(temp_val);
return record;
}
#define DET_TYPE(num_bits) num_bits <= 8 ? unsigned char : num_bits <=16 ? unsigned __int16 : unsigned int
#define DET_TYPE(num_bits) num_bits <= 8 ? unsigned char : num_bits <=16 ? unsigned short : unsigned int
#define GETBIT(from, num) ((from & (1 << num)) != 0)
#define GETBITS(from, numL, numH) ((from & (((1 << (numH - numL + 1)) - 1) << numL)) >> numL)
#define SETBIT(to, num, setorclear) {setorclear ? to |= (1 << num) : to &= ~(1 << num);}
......
......@@ -84,7 +84,7 @@ const bool CFStream::isEOF() const
// Stream pointer
const unsigned __int64 CFStream::getStreamPointer() const
const unsigned long CFStream::getStreamPointer() const
{
LARGE_INTEGER null_ptr;
null_ptr.QuadPart = 0;
......@@ -102,7 +102,7 @@ void CFStream::seekFromCurForward(const size_t offset)
}
void CFStream::seekFromBegin(const unsigned __int64 offset)
void CFStream::seekFromBegin(const unsigned long offset)
{
LARGE_INTEGER seek_ptr;
seek_ptr.QuadPart = offset;
......@@ -119,7 +119,7 @@ void CFStream::seekToEnd()
// Stream current size
const unsigned __int64 CFStream::getStreamSize() const
const unsigned long CFStream::getStreamSize() const
{
STATSTG info;
stream_->Stat(&info, STATFLAG_DEFAULT);
......@@ -166,7 +166,7 @@ void CFStream::writeAndApplyDelayedItems(void* buf, const size_t size, const Rec
// Then all items will be appended to the common queue
void CFStream::appendDelayedItems(const ReceiverItems& receiver_items_from_record, const SourceItems& source_items_from_record)
{
const unsigned int record_start_pointer = static_cast<unsigned int>(getStreamPointer()) - sizeof(unsigned __int16)/*size_short*/ - sizeof(CFRecordType::TypeId);
const unsigned int record_start_pointer = static_cast<unsigned int>(getStreamPointer()) - sizeof(unsigned short)/*size_short*/ - sizeof(CFRecordType::TypeId);
for(ReceiverItems::const_iterator it = receiver_items_from_record.begin(), itEnd = receiver_items_from_record.end(); it != itEnd; ++it)
{
......
......@@ -30,14 +30,14 @@ public:
void read(void* buf, const size_t size); // Read 'size' unsigned chars from the stream
void write(const void* buf, const size_t size); // Write 'size' unsigned chars to the stream
void seekFromCurForward(const size_t offset);
void seekFromBegin(const unsigned __int64 offset);
void seekFromBegin(const unsigned long offset);
void seekToEnd();
// If the current pointer is exactly at the end of the stream.
const bool isEOF() const;
// Stream pointer
const unsigned __int64 getStreamPointer() const;
const unsigned long getStreamPointer() const;
// Stream current size
const unsigned __int64 getStreamSize() const;
const unsigned long getStreamSize() const;
typedef void (*DELAYED_DATA_SAVER)(CFStream& stream, const unsigned int data_place, const unsigned int data);
typedef struct
......
......@@ -3,6 +3,7 @@
#include "objidl.h"
#include "BinSmartPointers.h"
#include <map>
namespace XLS
{;
......
......@@ -23,7 +23,7 @@ bool BiffDecoderBase::verifyPassword(const std::wstring& rPassword)
}
void BiffDecoderBase::decode(unsigned char* pnDestData, const unsigned char* pnSrcData, const __int64 nStreamPos, const unsigned __int16 nBytes)
void BiffDecoderBase::decode(unsigned char* pnDestData, const unsigned char* pnSrcData, const long nStreamPos, const unsigned short nBytes)
{
if(pnDestData && pnSrcData && (nBytes> 0))
{
......@@ -36,13 +36,13 @@ void BiffDecoderBase::decode(unsigned char* pnDestData, const unsigned char* pnS
/** Returns the block index of the passed stream position for RCF decryption. */
int lclGetRcfBlock(__int64 nStreamPos)
int lclGetRcfBlock(long nStreamPos)
{
return static_cast<int>(nStreamPos / BIFF_RCF_BLOCKSIZE);
}
/** Returns the offset of the passed stream position in a block for RCF decryption. */
int lclGetRcfOffset(__int64 nStreamPos)
int lclGetRcfOffset(long nStreamPos)
{
return static_cast<int>(nStreamPos % BIFF_RCF_BLOCKSIZE);
}
......@@ -62,14 +62,14 @@ bool BiffDecoder_RCF::implVerify(const std::wstring& rPassword)
int nLen = rPassword.length();
if((0 <nLen) && (nLen <16))
{
// copy string to unsigned __int16 array
// copy string to unsigned short array
maPassword.clear();
maPassword.resize(16, 0);
const wchar_t* pcChar = rPassword.c_str();
const wchar_t* pcCharEnd = pcChar + nLen;
std::vector<unsigned __int16>::iterator aIt = maPassword.begin();
std::vector<unsigned short>::iterator aIt = maPassword.begin();
for(; pcChar <pcCharEnd; ++pcChar, ++aIt)
*aIt = static_cast<unsigned __int16>(*pcChar);
*aIt = static_cast<unsigned short>(*pcChar);
// init codec
maCodec.initKey(&maPassword.front(), &maSalt.front());
......@@ -78,12 +78,12 @@ bool BiffDecoder_RCF::implVerify(const std::wstring& rPassword)
return false;
}
void BiffDecoder_RCF::implDecode(unsigned char* pnDestData, const unsigned char* pnSrcData, const __int64 nStreamPos, const unsigned __int16 nBytes)
void BiffDecoder_RCF::implDecode(unsigned char* pnDestData, const unsigned char* pnSrcData, const long nStreamPos, const unsigned short nBytes)
{
unsigned char* pnCurrDest = pnDestData;
const unsigned char* pnCurrSrc = pnSrcData;
__int64 nCurrPos = nStreamPos;
unsigned __int16 nBytesLeft = nBytes;
long nCurrPos = nStreamPos;
unsigned short nBytesLeft = nBytes;
while(nBytesLeft> 0)
{
// initialize codec for current stream position
......@@ -91,8 +91,8 @@ void BiffDecoder_RCF::implDecode(unsigned char* pnDestData, const unsigned char*
maCodec.skip(lclGetRcfOffset(nCurrPos));
// decode the block
unsigned __int16 nBlockLeft = static_cast<unsigned __int16>(BIFF_RCF_BLOCKSIZE - lclGetRcfOffset(nCurrPos));
unsigned __int16 nDecBytes = nBytesLeft < nBlockLeft ? nBytesLeft : nBlockLeft;
unsigned short nBlockLeft = static_cast<unsigned short>(BIFF_RCF_BLOCKSIZE - lclGetRcfOffset(nCurrPos));
unsigned short nDecBytes = nBytesLeft < nBlockLeft ? nBytesLeft : nBlockLeft;
maCodec.decode(pnCurrDest, pnCurrSrc, static_cast<int>(nDecBytes));
// prepare for next block
......
......@@ -7,7 +7,7 @@
namespace CRYPT
{;
const __int64 BIFF_RCF_BLOCKSIZE = 1024;
const long BIFF_RCF_BLOCKSIZE = 1024;
/** Base class for BIFF stream decoders. */
class BiffDecoderBase //: public ::comphelper::IDocPasswordVerifier
......@@ -24,7 +24,7 @@ public:
inline bool isValid() const { return mbValid; }
/** Decodes nBytes unsigned chars and writes encrypted data into the buffer pnDestData. */
void decode(unsigned char* pnDestData, const unsigned char* pnSrcData, const __int64 nStreamPos, const unsigned __int16 nBytes);
void decode(unsigned char* pnDestData, const unsigned char* pnSrcData, const long nStreamPos, const unsigned short nBytes);
private:
/** Derived classes implement password verification and initialization of
......@@ -32,7 +32,7 @@ private:
virtual bool implVerify(const std::wstring& rPassword) = 0;
/** Implementation of decryption of a memory block. */
virtual void implDecode(unsigned char* pnDestData, const unsigned char* pnSrcData, const __int64 nStreamPos, const unsigned __int16 nBytes) = 0;
virtual void implDecode(unsigned char* pnDestData, const unsigned char* pnSrcData, const long nStreamPos, const unsigned short nBytes) = 0;
private:
bool mbValid; /// True = decoder is correctly initialized.
......@@ -52,11 +52,11 @@ private:
virtual bool implVerify(const std::wstring& rPassword);
/** Implementation of decryption of a memory block. */
virtual void implDecode(unsigned char* pnDestData, const unsigned char* pnSrcData, const __int64 nStreamPos, const unsigned __int16 nBytes);
virtual void implDecode(unsigned char* pnDestData, const unsigned char* pnSrcData, const long nStreamPos, const unsigned short nBytes);
private:
BinaryCodec_RCF maCodec; /// Cipher algorithm implementation.
std::vector<unsigned __int16> maPassword;
std::vector<unsigned short> maPassword;
std::vector<unsigned char> maSalt;
std::vector<unsigned char> maVerifier;
std::vector<unsigned char> maVerifierHash;
......
......@@ -15,14 +15,14 @@ BinaryCodec_RCF::~BinaryCodec_RCF()
(void)memset( mpnDigestValue, 0, sizeof( mpnDigestValue ) );
}
void BinaryCodec_RCF::initKey( const unsigned __int16 pnPassData[ 16 ], const unsigned char pnSalt[ 16 ] )
void BinaryCodec_RCF::initKey( const unsigned short pnPassData[ 16 ], const unsigned char pnSalt[ 16 ] )
{
// create little-endian key data array from password data
unsigned char pnKeyData[ 64 ];
(void)memset( pnKeyData, 0, sizeof( pnKeyData ) );
const unsigned __int16* pnCurrPass = pnPassData;
const unsigned __int16* pnPassEnd = pnPassData + 16;
const unsigned short* pnCurrPass = pnPassData;
const unsigned short* pnPassEnd = pnPassData + 16;
unsigned char* pnCurrKey = pnKeyData;
size_t nPassSize = 0;
for( ; (pnCurrPass < pnPassEnd) && (*pnCurrPass != 0); ++pnCurrPass, ++nPassSize )
......
......@@ -34,7 +34,7 @@ public:
@param pnSalt
Random salt data block read from or written to the file.
*/
void initKey(const unsigned __int16 pnPassData[ 16 ], const unsigned char pnSalt[ 16 ] );
void initKey(const unsigned short pnPassData[ 16 ], const unsigned char pnSalt[ 16 ] );
/** Verifies the validity of the password using the passed salt data.
......
......@@ -10,7 +10,7 @@ class Crypt
public:
virtual void Encrypt(char* data, const size_t size) = 0;
virtual void Decrypt(char* data, const size_t size, const unsigned __int64 stream_pos) = 0;
virtual void Decrypt(char* data, const size_t size, const unsigned long stream_pos) = 0;
typedef enum
{
......
......@@ -14,7 +14,7 @@ Decryptor::Decryptor(const CRYPTO::RC4EncryptionHeader& header)
{
}
void Decryptor::Decrypt(char* data, const size_t size, const unsigned __int64 stream_pos)
void Decryptor::Decrypt(char* data, const size_t size, const unsigned long stream_pos)
{
crypt->Decrypt(data, size, stream_pos);
}
......
......@@ -15,7 +15,7 @@ class Decryptor
public:
Decryptor(const CRYPTO::RC4EncryptionHeader& header);
void Decrypt(char* data, const size_t size, const unsigned __int64 stream_pos);
void Decrypt(char* data, const size_t size, const unsigned long stream_pos);
private:
CryptPtr crypt;
......
......@@ -45,7 +45,7 @@ void RC4Crypt::CopyDWORDs2Bytes(const unsigned int b1, const unsigned int b2, co
byte_array[15] = static_cast<unsigned char>((b4 & 0xff000000) >> 24);
}
void RC4Crypt::Decrypt(char* data, const size_t size, const unsigned __int64 stream_pos)
void RC4Crypt::Decrypt(char* data, const size_t size, const unsigned long stream_pos)
{
static unsigned char quick_buf[256];
if(size <= 256)
......
......@@ -13,7 +13,7 @@ public:
RC4Crypt(const CRYPTO::RC4EncryptionHeader& header);
virtual void Encrypt(char* data, const size_t size);
virtual void Decrypt(char* data, const size_t size, const unsigned __int64 stream_pos);
virtual void Decrypt(char* data, const size_t size, const unsigned long stream_pos);
private:
void CopyDWORDs2Bytes(const unsigned int b1, const unsigned int b2, const unsigned int b3, const unsigned int b4, unsigned char* byte_array);
......
......@@ -22,7 +22,7 @@ BaseObjectPtr AlRuns::clone()
void AlRuns::writeFields(CFRecord& record)
{
unsigned __int16 cRuns = rgRuns.size();
unsigned short cRuns = rgRuns.size();
record << cRuns;
for(BiffStructurePtrVector::iterator it = rgRuns.begin(), itEnd = rgRuns.end(); it != itEnd; ++it)
{
......@@ -33,7 +33,7 @@ void AlRuns::writeFields(CFRecord& record)
void AlRuns::readFields(CFRecord& record)
{
unsigned __int16 cRuns;
unsigned short cRuns;
record >> cRuns;
for(int i = 0; i < cRuns; ++i)
{
......
......@@ -22,7 +22,7 @@ BaseObjectPtr Area::clone()
void Area::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fStacked);
SETBIT(flags, 1, f100);
SETBIT(flags, 2, fHasShadow);
......@@ -32,7 +32,7 @@ void Area::writeFields(CFRecord& record)
void Area::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> flags;
fStacked = GETBIT(flags, 0);
f100 = GETBIT(flags, 1);
......
......@@ -22,7 +22,7 @@ BaseObjectPtr AreaFormat::clone()
void AreaFormat::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fAuto);
SETBIT(flags, 1, fInvertNeg);
record << rgbFore << rgbBack << fls << flags << icvFore << icvBack;
......@@ -31,7 +31,7 @@ void AreaFormat::writeFields(CFRecord& record)
void AreaFormat::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> rgbFore >> rgbBack >> fls >> flags >> icvFore >> icvBack;
fAuto = GETBIT(flags, 0);
fInvertNeg = GETBIT(flags, 1);
......
......@@ -23,7 +23,7 @@ BaseObjectPtr Array::clone()
void Array::writeFields(CFRecord& record)
{
record << ref_;
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fAlwaysCalc);
record << flags;
record.reserveNunBytes(4); // unused
......@@ -34,7 +34,7 @@ void Array::writeFields(CFRecord& record)
void Array::readFields(CFRecord& record)
{
record >> ref_;
unsigned __int16 flags;
unsigned short flags;
record >> flags;
fAlwaysCalc = GETBIT(flags, 0);
record.skipNunBytes(4); // unused
......
......@@ -22,7 +22,7 @@ BaseObjectPtr AttachedLabel::clone()
void AttachedLabel::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fShowValue);
SETBIT(flags, 1, fShowPercent);
SETBIT(flags, 2, fShowLabelAndPerc);
......@@ -35,7 +35,7 @@ void AttachedLabel::writeFields(CFRecord& record)
void AttachedLabel::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> flags;
fShowValue = GETBIT(flags, 0);
fShowPercent = GETBIT(flags, 1);
......
......@@ -32,7 +32,7 @@ void AutoFilter::readFields(CFRecord& record)
m_bAutoFilter12 = false;
unsigned __int16 flags;
unsigned short flags;
record >> iEntry >> flags;
wJoin = static_cast<unsigned char>(GETBITS(flags, 0, 1));
fSimple1 = GETBIT(flags, 2);
......@@ -40,16 +40,16 @@ void AutoFilter::readFields(CFRecord& record)
fTopN = GETBIT(flags, 4);
fTop = GETBIT(flags, 5);
fPercent = GETBIT(flags, 6);
wTopN = static_cast<unsigned __int16>(GETBITS(flags, 7, 15));
wTopN = static_cast<unsigned short>(GETBITS(flags, 7, 15));
unsigned __int16 _iEntry = iEntry;
unsigned short _iEntry = iEntry;
unsigned char _wJoin = wJoin;
unsigned char _fSimple1 = fSimple1;
unsigned char _fSimple2 = fSimple2;
unsigned char _fTopN = fTopN;
unsigned char _fTop = fTop;
unsigned char _fPercent = fPercent;
unsigned __int16 _wTopN = wTopN;
unsigned short _wTopN = wTopN;
if (fTopN != 1)
record >> doper1;
......
......@@ -27,11 +27,11 @@ void AutoFilter12::writeFields(CFRecord& record)
void AutoFilter12::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
unsigned int unused2;
record >> frtRefHeader >> iEntry >> fHideArrow >> ft >> cft >> cCriteria >> cDateGroupings >> flags >> unused2 >> idList;
unsigned __int16 _iEntry = iEntry;
unsigned short _iEntry = iEntry;
unsigned int _fHideArrow = fHideArrow;
unsigned int _ft = ft;
unsigned int _cft = cft;
......
......@@ -22,7 +22,7 @@ BaseObjectPtr AxcExt::clone()
void AxcExt::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fAutoMin);
SETBIT(flags, 1, fAutoMax);
SETBIT(flags, 2, fAutoMajor);
......@@ -38,7 +38,7 @@ void AxcExt::writeFields(CFRecord& record)
void AxcExt::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> catMin >> catMax >> catMajor >> duMajor >> catMinor >> duMinor >> duBase >> catCrossDate >> flags;
fAutoMin = GETBIT(flags, 0);
......
......@@ -23,7 +23,7 @@ public:
static const ElementType type = typeAxisParent;
//-----------------------------
Boolean<unsigned __int16> iax;
Boolean<unsigned short> iax;
};
......
......@@ -76,7 +76,7 @@ void BOF::readFields(CFRecord& record)
record.skipNunBytes(2); // reserved
}
unsigned __int16 BOF::getSubstreamType()
unsigned short BOF::getSubstreamType()
{
return dt;
}
......
......@@ -24,7 +24,7 @@ public:
static const ElementType type = typeBOF;
unsigned __int16 getSubstreamType();
unsigned short getSubstreamType();
typedef enum
{
......
......@@ -22,7 +22,7 @@ BaseObjectPtr BRAI::clone()
void BRAI::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fUnlinkedIfmt);
record << id << rt << flags << ifmt;
formula.store(record);
......@@ -31,7 +31,7 @@ void BRAI::writeFields(CFRecord& record)
void BRAI::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> id >> rt >> flags;
fUnlinkedIfmt = static_cast<unsigned char>(GETBIT(flags, 0));
record >> ifmt;
......
......@@ -23,7 +23,7 @@ public:
static const ElementType type = typeBackup;
//-----------------------------
Boolean<unsigned __int16> fBackup;
Boolean<unsigned short> fBackup;
public:
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_ATTRIB(fBackup)
......
......@@ -22,7 +22,7 @@ BaseObjectPtr Bar::clone()
void Bar::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fTranspose);
SETBIT(flags, 1, fStacked);
SETBIT(flags, 2, f100);
......@@ -33,7 +33,7 @@ void Bar::writeFields(CFRecord& record)
void Bar::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> pcOverlap >> pcGap >> flags;
fTranspose = GETBIT(flags, 0);
fStacked = GETBIT(flags, 1);
......
......@@ -34,7 +34,7 @@ void BkHim::readFields(CFRecord& record)
//Log::error("BkHim record is not implemented.");
//record >> some_value;
unsigned __int16 cf;
unsigned short cf;
unsigned int lcb;
record >> cf;
......
......@@ -23,7 +23,7 @@ BaseObjectPtr BookBool::clone()
void BookBool::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fNoSaveSup);
SETBIT(flags, 2, fHasEnvelope);
SETBIT(flags, 3, fEnvelopeVisible);
......@@ -55,7 +55,7 @@ void BookBool::writeFields(CFRecord& record)
void BookBool::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> flags;
fNoSaveSup = GETBIT(flags, 0);
fHasEnvelope = GETBIT(flags, 2);
......
......@@ -22,7 +22,7 @@ BaseObjectPtr BopPop::clone()
void BopPop::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fHasShadow);
record << pst << fAutoSplit << split << iSplitPos << pcSplitPercent << pcPie2Size << pcGap << numSplitValue << flags;
}
......@@ -30,7 +30,7 @@ void BopPop::writeFields(CFRecord& record)
void BopPop::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> pst >> fAutoSplit >> split >> iSplitPos >> pcSplitPercent >> pcPie2Size >> pcGap >> numSplitValue >> flags;
fHasShadow = GETBIT(flags, 0);
}
......
......@@ -39,14 +39,14 @@ BiffStructurePtr BopPopCustomPiesIndices::clone()
void BopPopCustomPiesIndices::load(CFRecord& record)
{
unsigned __int16 cxi;
unsigned short cxi;
record >> cxi;
const unsigned __int16 padding = 8 - cxi % 8;
const unsigned short padding = 8 - cxi % 8;
unsigned char bit_data = 0;
for(unsigned __int16 i = padding; i < cxi - 1 + padding; i++)
for(unsigned short i = padding; i < cxi - 1 + padding; i++)
{
if(0 == i % 8 || padding == i)
{
......@@ -69,7 +69,7 @@ void BopPopCustomPiesIndices::load(CFRecord& record)
// {
// static std::wstring tag_name(L"pie");
// static std::wstring attr_name(L"index");
// for(std::vector<unsigned __int16>::const_iterator it = pie_indices.begin(), itEnd = pie_indices.end(); it != itEnd; ++it)
// for(std::vector<unsigned short>::const_iterator it = pie_indices.begin(), itEnd = pie_indices.end(); it != itEnd; ++it)
// {
// BiffStructurePtr rgi_tag = XMLSTUFF::createElement(tag_name, xml_tag);
// rgi_tag->setAttribute(attr_name, *it);
......
......@@ -17,7 +17,7 @@ public:
virtual void store(CFRecord& record){}
//-----------------------------
std::vector<unsigned __int16> pie_indices;
std::vector<unsigned short> pie_indices;
};
......
......@@ -24,7 +24,7 @@ void BoundSheet8::writeFields(CFRecord& record)
{
record.registerDelayedDataReceiver(NULL, sizeof(unsigned int));
unsigned __int16 flags = 0;
unsigned short flags = 0;
unsigned char hsState_num;
if(hsState == std::wstring (L"visible"))
{
......@@ -50,7 +50,7 @@ void BoundSheet8::writeFields(CFRecord& record)
void BoundSheet8::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> lbPlyPos >> flags >> stName;
record.getGlobalWorkbookInfo()->sheets_names.push_back(stName);
......
......@@ -25,8 +25,8 @@ BaseObjectPtr CF::clone()
void CF::writeFields(CFRecord& record)
{
record << ct << cp;
record.registerDelayedDataReceiver(NULL, sizeof(unsigned __int16)/*cce*/);
record.registerDelayedDataReceiver(NULL, sizeof(unsigned __int16)/*cce*/);
record.registerDelayedDataReceiver(NULL, sizeof(unsigned short)/*cce*/);
record.registerDelayedDataReceiver(NULL, sizeof(unsigned short)/*cce*/);
record << rgbdxf;
rgce1.store(record);
rgce2.store(record);
......@@ -37,8 +37,8 @@ void CF::writeFields(CFRecord& record)
void CF::readFields(CFRecord& record)
{
unsigned __int16 cce1;
unsigned __int16 cce2;
unsigned short cce1;
unsigned short cce2;
record >> ct >> cp >> cce1 >> cce2;
record >> rgbdxf;
rgce1.load(record, cce1);
......
......@@ -36,8 +36,8 @@ void CF12::readFields(CFRecord& record)
{
record >> frtRefHeader;
record >> ct >> cp;
unsigned __int16 cce1;
unsigned __int16 cce2;
unsigned short cce1;
unsigned short cce2;
record >> cce1 >> cce2;
record >> dxf;
rgce1.load(record, cce1);
......
......@@ -39,7 +39,7 @@ void CFEx::readFields(CFRecord& record)
}
const unsigned __int16 CFEx::getID() const
const unsigned short CFEx::getID() const
{
return nID;
}
......
......@@ -24,7 +24,7 @@ public:
static const ElementType type = typeCFEx;
const unsigned __int16 getID() const;
const unsigned short getID() const;
//-----------------------------
FrtRefHeaderU frtRefHeaderU;
Boolean<unsigned int> fIsCF12;
......
......@@ -23,7 +23,7 @@ public:
static const ElementType type = typeCalcIter;
//-----------------------------
Boolean<unsigned __int16> vfIter;
Boolean<unsigned short> vfIter;
};
......
......@@ -23,7 +23,7 @@ public:
static const ElementType type = typeCalcPrecision;
//-----------------------------
Boolean<unsigned __int16> fFullPrec;
Boolean<unsigned short> fFullPrec;
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_ATTRIB(fFullPrec)
......
......@@ -23,7 +23,7 @@ BaseObjectPtr CalcRefMode::clone()
void CalcRefMode::writeFields(CFRecord& record)
{
Boolean<unsigned __int16> fRef;
Boolean<unsigned short> fRef;
if(fRefA1 == std::wstring (L"A1"))
{
fRef = true;
......@@ -42,7 +42,7 @@ void CalcRefMode::writeFields(CFRecord& record)
void CalcRefMode::readFields(CFRecord& record)
{
Boolean<unsigned __int16> fRef;
Boolean<unsigned short> fRef;
record >> fRef;
if(fRef)
{
......
......@@ -23,7 +23,7 @@ public:
static const ElementType type = typeCalcSaveRecalc;
//-----------------------------
Boolean<unsigned __int16> fSaveRecalc;
Boolean<unsigned short> fSaveRecalc;
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_ATTRIB(fSaveRecalc)
......
......@@ -24,7 +24,7 @@ BaseObjectPtr CatLab::clone()
void CatLab::writeFields(CFRecord& record)
{
FrtHeaderOld frtHeaderOld(rt_CatLab);
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, cAutoCatLabelReal);
record << frtHeaderOld << wOffset << at << flags;
record.reserveNunBytes(2); // reserved
......@@ -34,7 +34,7 @@ void CatLab::writeFields(CFRecord& record)
void CatLab::readFields(CFRecord& record)
{
FrtHeaderOld frtHeaderOld;
unsigned __int16 flags;
unsigned short flags;
record >> frtHeaderOld >> wOffset >> at >> flags;
cAutoCatLabelReal = GETBIT(flags, 0);
record.skipNunBytes(2); // reserved
......
......@@ -22,7 +22,7 @@ BaseObjectPtr CatSerRange::clone()
void CatSerRange::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fBetween);
SETBIT(flags, 1, fMaxCross);
SETBIT(flags, 2, fReverse);
......@@ -33,7 +33,7 @@ void CatSerRange::writeFields(CFRecord& record)
void CatSerRange::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> catCross >> catLabel >> catMark >> flags;
fBetween = GETBIT(flags, 0);
......
......@@ -22,21 +22,21 @@ BaseObjectPtr Chart3d::clone()
void Chart3d::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fPerspective);
SETBIT(flags, 1, fCluster);
SETBIT(flags, 2, f3DScaling);
SETBIT(flags, 4, fNotPieChart);
SETBIT(flags, 5, fWalls2D);
unsigned __int16 pcHeight_raw = static_cast<unsigned __int16>(pcHeight);
unsigned short pcHeight_raw = static_cast<unsigned short>(pcHeight);
record << anRot << anElev << pcDist << pcHeight_raw << pcDepth << pcGap << flags;
}
void Chart3d::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned __int16 pcHeight_raw;
unsigned short flags;
unsigned short pcHeight_raw;
record >> anRot >> anElev >> pcDist >> pcHeight_raw >> pcDepth >> pcGap >> flags;
fPerspective = GETBIT(flags, 0);
fCluster = GETBIT(flags, 1);
......
......@@ -23,7 +23,7 @@ BaseObjectPtr ChartFormat::clone()
void ChartFormat::writeFields(CFRecord& record)
{
record.reserveNunBytes(16); // reserved
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fVaried);
record << flags << icrt;
}
......@@ -32,7 +32,7 @@ void ChartFormat::writeFields(CFRecord& record)
void ChartFormat::readFields(CFRecord& record)
{
record.skipNunBytes(16); // reserved
unsigned __int16 flags;
unsigned short flags;
record >> flags >> icrt;
fVaried = GETBIT(flags, 0);
}
......
......@@ -33,7 +33,7 @@ void ChartFrtInfo::readFields(CFRecord& record)
{
FrtHeaderOld frtHeaderOld;
record >> frtHeaderOld >> verOriginator >> verWriter;
unsigned __int16 cCFRTID;
unsigned short cCFRTID;
record >> cCFRTID;
#pragma message("####################### ChartFrtInfo record is not implemented")
......
......@@ -22,7 +22,7 @@ BaseObjectPtr ColInfo::clone()
void ColInfo::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fHidden);
SETBIT(flags, 1, fUserSet);
SETBIT(flags, 2, fBestFit);
......@@ -36,7 +36,7 @@ void ColInfo::writeFields(CFRecord& record)
void ColInfo::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> colFirst >> colLast >> coldx >> ixfe >> flags;
fHidden = GETBIT(flags, 0);
fUserSet = GETBIT(flags, 1);
......
......@@ -22,7 +22,7 @@ BaseObjectPtr CondFmt::clone()
void CondFmt::writeFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record << ccf;
SETBIT(flags, 0, fToughRecalc);
SETBITS(flags, 1, 15, nID);
......@@ -36,7 +36,7 @@ void CondFmt::writeFields(CFRecord& record)
void CondFmt::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> ccf >> flags;
fToughRecalc = GETBIT(flags, 0);
nID = GETBITS(flags, 1, 15);
......
......@@ -26,7 +26,7 @@ void CrtLayout12::writeFields(CFRecord& record)
FrtHeader frtHeader(rt_CrtLayout12);
record << frtHeader;
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBITS(flags, 1, 4, autolayouttype);
record << dwCheckSum << flags << wXMode << wYMode << wWidthMode << wHeightMode << x << y << dx << dy;
record.reserveNunBytes(2); // reserved2
......@@ -38,7 +38,7 @@ void CrtLayout12::readFields(CFRecord& record)
FrtHeader frtHeader;
record >> frtHeader;
unsigned __int16 flags;
unsigned short flags;
record >> dwCheckSum >> flags >> wXMode >> wYMode >> wWidthMode >> wHeightMode >> x >> y >> dx >> dy;
autolayouttype = GETBITS(flags, 1, 4);
record.skipNunBytes(2); // reserved2
......
......@@ -28,7 +28,7 @@ void DBCell::catchUnusedCellOffset(CFStream& stream, const unsigned int data_pla
void DBCell::offsetFromRowMaker(CFStream& stream, const unsigned int data_place, const unsigned int data)
{
stream.seekFromBegin(data_place);
unsigned int offset_from_Row = data_place - sizeof(unsigned __int16)/*size_short*/ - sizeof(CFRecordType::TypeId) - data /* Row file ptr */;
unsigned int offset_from_Row = data_place - sizeof(unsigned short)/*size_short*/ - sizeof(CFRecordType::TypeId) - data /* Row file ptr */;
stream.write(&offset_from_Row, sizeof(unsigned int)/*dbRtrw*/);
}
......@@ -41,7 +41,7 @@ void DBCell::writeFields(CFRecord& record)
for(unsigned int i = 0; i < num_pointers ; ++i)
{
record.registerDelayedDataReceiver(NULL, sizeof(unsigned __int16)/*FilePointer*/);
record.registerDelayedDataReceiver(NULL, sizeof(unsigned short)/*FilePointer*/);
}
}
......
......@@ -23,10 +23,10 @@ public:
static const ElementType type = typeDCon;
//-----------------------------
// BIFF_WORD userName;
unsigned __int16 iiftab;
unsigned __int16 fLeftCat;
unsigned __int16 fTopCat;
unsigned __int16 fLinkConsole;
unsigned short iiftab;
unsigned short fLeftCat;
unsigned short fTopCat;
unsigned short fLinkConsole;
public:
......
......@@ -22,7 +22,7 @@ BaseObjectPtr DVal::clone()
void DVal::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fWnClosed);
record << flags << xLeft << yTop << idObj << idvMac;
}
......@@ -30,7 +30,7 @@ void DVal::writeFields(CFRecord& record)
void DVal::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> flags >> xLeft >> yTop >> idObj >> idvMac;
fWnClosed = GETBIT(flags, 0);
}
......
......@@ -31,7 +31,7 @@ void DXF::writeFields(CFRecord& record)
void DXF::readFields(CFRecord& record)
{
record >> frtRefHeaderU;
unsigned __int16 flags;
unsigned short flags;
record >> flags >> xfprops;
fNewBorder = GETBIT(flags, 1);
}
......
......@@ -22,7 +22,7 @@ BaseObjectPtr Dat::clone()
void Dat::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fHasBordHorz);
SETBIT(flags, 1, fHasBordVert);
SETBIT(flags, 2, fHasBordOutline);
......@@ -33,7 +33,7 @@ void Dat::writeFields(CFRecord& record)
void Dat::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> flags;
fHasBordHorz = GETBIT(flags, 0);
fHasBordVert = GETBIT(flags, 1);
......
......@@ -22,7 +22,7 @@ BaseObjectPtr DataFormat::clone()
void DataFormat::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fUnknown);
record << xi << yi << iss << flags;
}
......@@ -30,7 +30,7 @@ void DataFormat::writeFields(CFRecord& record)
void DataFormat::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> xi >> yi >> iss >> flags;
fUnknown = GETBIT(flags, 0);
}
......
......@@ -26,7 +26,7 @@ void DataLabExtContents::writeFields(CFRecord& record)
FrtHeader frtHeader(rt_DataLabExtContents);
record << frtHeader;
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fSerName);
SETBIT(flags, 1, fCatName);
SETBIT(flags, 2, fValue);
......@@ -42,7 +42,7 @@ void DataLabExtContents::readFields(CFRecord& record)
FrtHeader frtHeader;
record >> frtHeader;
unsigned __int16 flags;
unsigned short flags;
record >> flags >> rgchSep;
fSerName = GETBIT(flags, 0);
......
......@@ -23,7 +23,7 @@ public:
static const ElementType type = typeDate1904;
//-----------------------------
Boolean<unsigned __int16> f1904DateSystem;
Boolean<unsigned short> f1904DateSystem;
public:
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_ATTRIB(f1904DateSystem)
......
......@@ -22,7 +22,7 @@ BaseObjectPtr DefaultRowHeight::clone()
void DefaultRowHeight::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fUnsynced);
SETBIT(flags, 1, fDyZero);
SETBIT(flags, 2, fExAsc);
......@@ -41,7 +41,7 @@ void DefaultRowHeight::writeFields(CFRecord& record)
void DefaultRowHeight::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> flags;
fUnsynced = GETBIT(flags, 0);
fDyZero = GETBIT(flags, 1);
......
......@@ -28,8 +28,8 @@ void Dimensions::writeFields(CFRecord& record)
CellRangeRef ref_ref(ref_);
rwMic = ref_ref.getRowFirst();
rwMac = ref_ref.getRowLast() + 1;// zero-based index of the row after the last row in the sheet that contains a used cell
colMic = static_cast<unsigned __int16>(ref_ref.getColumnFirst());
colMac = static_cast<unsigned __int16>(ref_ref.getColumnLast()) + 1; // zero-based index of the column after the last column in the sheet that contains a used cell
colMic = static_cast<unsigned short>(ref_ref.getColumnFirst());
colMac = static_cast<unsigned short>(ref_ref.getColumnLast()) + 1; // zero-based index of the column after the last column in the sheet that contains a used cell
}
else
{
......
......@@ -33,9 +33,9 @@ void DropDownObjIds::readFields(CFRecord& record)
{
FrtHeader frtHeader(rt_DropDownObjIds);
record >> frtHeader;
unsigned __int16 cidObj;
unsigned short cidObj;
record >> cidObj;
for(unsigned __int16 i = 0; i < cidObj; ++i)
for(unsigned short i = 0; i < cidObj; ++i)
{
DropDownObjIdPtr id(new DropDownObjId);
record >> *id;
......
......@@ -25,7 +25,7 @@ void EndObject::writeFields(CFRecord& record)
{
FrtHeaderOld rt(rt_EndObject);
record >> rt;
unsigned __int16 unused1 = 0, unused2 = 0, unused3 = 0;
unsigned short unused1 = 0, unused2 = 0, unused3 = 0;
record << iObjectKind << unused1 << unused2 << unused3;
}
......@@ -34,7 +34,7 @@ void EndObject::readFields(CFRecord& record)
{
FrtHeaderOld rt;
record >> rt;
unsigned __int16 unused1, unused2, unused3;
unsigned short unused1, unused2, unused3;
record >> iObjectKind >> unused1 >> unused2 >> unused3;
}
......
......@@ -27,7 +27,7 @@ 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 __int16)/*ISSTInf::cbOffset*/);
record.registerDelayedDataReceiver(NULL, sizeof(unsigned short)/*ISSTInf::cbOffset*/);
record.reserveNunBytes(2);
}
}
......
......@@ -4,7 +4,7 @@
namespace XLS
{;
ExternName::ExternName(const unsigned __int16 supporting_link_type)
ExternName::ExternName(const unsigned short supporting_link_type)
: supbook_cch(supporting_link_type)
{
}
......@@ -23,7 +23,7 @@ BaseObjectPtr ExternName::clone()
void ExternName::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fBuiltIn);
SETBIT(flags, 1, fWantAdvise);
SETBIT(flags, 2, fWantPict);
......@@ -39,7 +39,7 @@ void ExternName::writeFields(CFRecord& record)
void ExternName::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> flags;
fBuiltIn = GETBIT(flags, 0);
fWantAdvise = GETBIT(flags, 1);
......
......@@ -17,7 +17,7 @@ class ExternName: public BiffRecord
BIFF_RECORD_DEFINE_TYPE_INFO(ExternName)
BASE_OBJECT_DEFINE_CLASS_NAME(ExternName)
public:
ExternName(const unsigned __int16 supporting_link_type);
ExternName(const unsigned short supporting_link_type);
~ExternName();
BaseObjectPtr clone();
......
......@@ -24,7 +24,7 @@ public:
static const ElementType type = typeExternSheet;
//-----------------------------
ForwardOnlyParam<unsigned __int16> cXTI;
ForwardOnlyParam<unsigned short> cXTI;
BiffStructurePtrVector rgXTI;
public:
//BO_ATTRIB_MARKUP_BEGIN
......
......@@ -35,8 +35,8 @@ void Feature11::readFields(CFRecord& record)
record >> cbFeatData;
record.skipNunBytes(2); // reserved3
unsigned __int16 _isf = isf;
unsigned __int16 _cref2 = cref2;
unsigned short _isf = isf;
unsigned short _cref2 = cref2;
unsigned int _cbFeatData = cbFeatData;
std::wstring sqref_str;
......
......@@ -42,7 +42,7 @@ void FilePass::readFields(CFRecord& record)
}
else
{
majorVer = *record.getCurData<unsigned __int16>();
majorVer = *record.getCurData<unsigned short>();
if(0x0001 == majorVer) // RC4 encryption header structure
{
record >> rc4Header;
......
......@@ -27,7 +27,7 @@ public:
static const ElementType type = typeFilePass;
//-----------------------------
Boolean<unsigned __int16> wEncryptionType;
Boolean<unsigned short> wEncryptionType;
XORObfuscation key;
BIFF_WORD majorVer;
CRYPTO::RC4EncryptionHeader rc4Header;
......
......@@ -24,8 +24,8 @@ public:
static const ElementType type = typeFileSharing;
//-----------------------------
Boolean<unsigned __int16> fReadOnlyRec;
unsigned __int16 wResPassNum;
Boolean<unsigned short> fReadOnlyRec;
unsigned short wResPassNum;
BIFF_BSTR wResPass;
BIFF_WORD iNoResPass;
XLUnicodeString stUNUsername;
......
#include "precompiled_xls.h"
#include "Font.h"
#include <simple_xml_writer.h>
namespace XLS
{;
......@@ -22,7 +24,7 @@ BaseObjectPtr Font::clone()
void Font::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 1, fItalic);
SETBIT(flags, 3, fStrikeOut);
SETBIT(flags, 4, fOutline);
......@@ -39,7 +41,7 @@ void Font::writeFields(CFRecord& record)
void Font::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> dyHeight >> flags;
fItalic = GETBIT(flags, 1);
fStrikeOut = GETBIT(flags, 3);
......@@ -53,5 +55,131 @@ void Font::readFields(CFRecord& record)
record >> fontName;
}
int Font::serialize(std::wostream & stream)
{
CP_XML_WRITER(stream)
{
CP_XML_NODE(L"font")
{
//if (font.bold)
//{
// CP_XML_NODE(L"b")
// {
// CP_XML_ATTR(L"val", (int)(*font.bold));
// }
//}
if (bCharSet.value())
{
CP_XML_NODE(L"charset")
{
CP_XML_ATTR(L"val", *bCharSet.value());
}
}
//if (icv.val)
// xlsx_serialize(CP_XML_STREAM(), *icv.val);
if (fCondense.value())
{
CP_XML_NODE(L"condense")
{
CP_XML_ATTR(L"val", (int)(*fCondense.value()));
}
}
if (fExtend.value())
{
CP_XML_NODE(L"extend")
{
CP_XML_ATTR(L"val", (int)(*fExtend.value()));
}
}
if (bFamily.value())
{
CP_XML_NODE(L"family")
{
CP_XML_ATTR(L"val", (int)(*bFamily.value()));
}
}
if (fItalic.value())
{
CP_XML_NODE(L"i")
{
CP_XML_ATTR(L"val", (int)(*fItalic.value()));
}
}
if (!fontName.value().empty())
{
CP_XML_NODE(L"name")
{
CP_XML_ATTR(L"val", fontName.value());
}
}
if (fOutline.value())
{
CP_XML_NODE(L"outline")
{
CP_XML_ATTR(L"val", (int)(*fOutline.value()));
}
}
//if (font.scheme)
//{
// CP_XML_NODE(L"scheme")
// {
// CP_XML_ATTR(L"val", *font.scheme);
// }
//}
if (fShadow.value())
{
CP_XML_NODE(L"shadow")
{
CP_XML_ATTR(L"val", (int)(*fShadow.value()));
}
}
if (fStrikeOut.value())
{
CP_XML_NODE(L"strike")
{
CP_XML_ATTR(L"val", (int)(*fStrikeOut.value()));
}
}
if (dyHeight.value())
{
CP_XML_NODE(L"sz")
{
CP_XML_ATTR(L"val", *dyHeight.value()/20);
}
}
//if (font.u)
//{
// CP_XML_NODE(L"u")
// {
// CP_XML_ATTR(L"val", *font.u);
// }
//}
//if (font.vertAlign)
//{
// CP_XML_NODE(L"vertAlign")
// {
// CP_XML_ATTR(L"val", *font.vertAlign);
// }
//}
}
}
return 0;
}
} // namespace XLS
......@@ -23,6 +23,8 @@ public:
static const ElementType type = typeFont;
int serialize(std::wostream & stream);
//-----------------------------
BIFF_WORD dyHeight; // measured in twips (1/20 of of a printer's point)
......
......@@ -24,7 +24,7 @@ BaseObjectPtr Formula::clone()
void Formula::writeFields(CFRecord& record)
{
record << cell << val;
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fAlwaysCalc);
SETBIT(flags, 2, fFill);
SETBIT(flags, 3, fShrFmla);
......@@ -40,7 +40,7 @@ void Formula::writeFields(CFRecord& record)
void Formula::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> cell >> val >> flags;
fAlwaysCalc = GETBIT(flags, 0);
fFill = GETBIT(flags, 2);
......
......@@ -22,7 +22,7 @@ BaseObjectPtr Frame::clone()
void Frame::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fAutoSize);
SETBIT(flags, 1, fAutoPosition);
record << frt << flags;
......@@ -31,7 +31,7 @@ void Frame::writeFields(CFRecord& record)
void Frame::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> frt >> flags;
fAutoSize = GETBIT(flags, 0);
fAutoPosition = GETBIT(flags, 1);
......
......@@ -22,7 +22,7 @@ BaseObjectPtr GridSet::clone()
void GridSet::writeFields(CFRecord& record)
{
unsigned __int16 reserved = 1;
unsigned short reserved = 1;
record << reserved;
}
......
......@@ -23,7 +23,7 @@ public:
static const ElementType type = typeHCenter;
//-----------------------------
Boolean<unsigned __int16> hcenter;
Boolean<unsigned short> hcenter;
public:
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_ATTRIB(hcenter)
......
......@@ -37,7 +37,7 @@ void HFPicture::readFields(CFRecord& record)
FrtHeader frtHeader(rt_HFPicture);
record >> frtHeader;
unsigned __int16 flags;
unsigned short flags;
record >> flags;
fIsDrawing = GETBIT(flags, 0);
fIsDrawingGroup = GETBIT(flags, 0);
......
......@@ -32,7 +32,7 @@ void HeaderFooter::writeFields(CFRecord& record)
throw;// EXCEPT::LE::AttributeDataWrong(L"guid", L"HeaderFooter", guidSView);
}
record << guid_num;
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fHFDiffOddEven);
SETBIT(flags, 1, fHFDiffFirst);
SETBIT(flags, 2, fHFScaleWithDoc);
......@@ -66,7 +66,7 @@ void HeaderFooter::readFields(CFRecord& record)
{
FrtHeader frtHeader(rt_HeaderFooter);
record >> frtHeader;
unsigned __int16 flags;
unsigned short flags;
GUID guid_num;
record >> guid_num >> flags;
guidSView = STR::guid2bstr(guid_num);
......
......@@ -31,14 +31,14 @@ void LRng::writeFields(CFRecord& record)
void LRng::readFields(CFRecord& record)
{
record >> crefRw;
for(unsigned __int16 i = 0; i < crefRw; ++i)
for(unsigned short i = 0; i < crefRw; ++i)
{
Ref8U cell_ref;
record >> cell_ref;
refRow.push_back(CellRangeRefPtr(new Ref8U(cell_ref)));
}
record >> crefCol;
for(unsigned __int16 i = 0; i < crefCol; ++i)
for(unsigned short i = 0; i < crefCol; ++i)
{
Ref8U cell_ref;
record >> cell_ref;
......
......@@ -23,7 +23,7 @@ BaseObjectPtr Lbl::clone()
void Lbl::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fHidden);
SETBIT(flags, 1, fFunc);
SETBIT(flags, 2, fOB);
......@@ -37,7 +37,7 @@ void Lbl::writeFields(CFRecord& record)
record << flags << chKey;
unsigned char cch = static_cast<std::wstring >(Name).length();
record << cch;
record.registerDelayedDataReceiver(NULL, sizeof(unsigned __int16)/*cce*/);
record.registerDelayedDataReceiver(NULL, sizeof(unsigned short)/*cce*/);
record.reserveNunBytes(2);
record << itab;
record.reserveNunBytes(4);
......@@ -129,7 +129,7 @@ void Lbl::writeFields(CFRecord& record)
void Lbl::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> flags >> chKey;
fHidden = GETBIT(flags, 0);
fFunc = GETBIT(flags, 1);
......@@ -141,7 +141,7 @@ void Lbl::readFields(CFRecord& record)
fPublished = GETBIT(flags, 13);
fWorkbookParam = GETBIT(flags, 14);
unsigned char cch;
unsigned __int16 cce;
unsigned short cce;
record >> cch >> cce;
record.skipNunBytes(2);
record >> itab;
......
......@@ -22,7 +22,7 @@ BaseObjectPtr Legend::clone()
void Legend::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fAutoPosition);
SETBIT(flags, 2, fAutoPosX);
SETBIT(flags, 3, fAutoPosY);
......@@ -36,7 +36,7 @@ void Legend::writeFields(CFRecord& record)
void Legend::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> x >> y >> dx >> dy;
record.skipNunBytes(1); // unused
record >> wSpace >> flags;
......
......@@ -22,7 +22,7 @@ BaseObjectPtr Line::clone()
void Line::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fStacked);
SETBIT(flags, 1, f100);
SETBIT(flags, 2, fHasShadow);
......@@ -32,7 +32,7 @@ void Line::writeFields(CFRecord& record)
void Line::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> flags;
fStacked = GETBIT(flags, 0);
f100 = GETBIT(flags, 1);
......
......@@ -22,7 +22,7 @@ BaseObjectPtr LineFormat::clone()
void LineFormat::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fAuto);
SETBIT(flags, 2, fAxisOn);
SETBIT(flags, 3, fAutoCo);
......@@ -32,7 +32,7 @@ void LineFormat::writeFields(CFRecord& record)
void LineFormat::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> rgb >> lns >> we >> flags >> icv;
fAuto = GETBIT(flags, 0);
fAxisOn = GETBIT(flags, 2);
......
......@@ -31,7 +31,7 @@ void List12::readFields(CFRecord& record)
record >> lsd;
record >> idList;
unsigned __int16 _lsd = lsd;
unsigned short _lsd = lsd;
switch (lsd)
{
......
......@@ -22,7 +22,7 @@ BaseObjectPtr MarkerFormat::clone()
void MarkerFormat::writeFields(CFRecord& record)
{
unsigned __int16 flags = 0;
unsigned short flags = 0;
SETBIT(flags, 0, fAuto);
SETBIT(flags, 4, fNotShowInt);
SETBIT(flags, 5, fNotShowBrd);
......@@ -32,7 +32,7 @@ void MarkerFormat::writeFields(CFRecord& record)
void MarkerFormat::readFields(CFRecord& record)
{
unsigned __int16 flags;
unsigned short flags;
record >> rgbFore >> rgbBack >> imk >> flags >> icvFore >> icvBack >> miSize;
fAuto = GETBIT(flags, 0);
fNotShowInt = GETBIT(flags, 4);
......
......@@ -31,7 +31,7 @@ void MulBlank::writeFields(CFRecord& record)
void MulBlank::readFields(CFRecord& record)
{
// A little hack to extract colLast before it is used
record.skipNunBytes(record.getDataSize() - sizeof(unsigned __int16));
record.skipNunBytes(record.getDataSize() - sizeof(unsigned short));
record >> colLast;
record.resetPointerToBegin();
//------------------
......@@ -39,12 +39,12 @@ void MulBlank::readFields(CFRecord& record)
rgixfe.load(record, colLast - colFirst + 1);
record.skipNunBytes(sizeof(unsigned __int16));
record.skipNunBytes(sizeof(unsigned short));
}
const long MulBlank::GetRow() const
{
return static_cast<unsigned __int16>(rw);
return static_cast<unsigned short>(rw);
}
......@@ -60,7 +60,7 @@ BiffStructurePtr IXFCellMulBlankSpecial::clone()
void IXFCellMulBlankSpecial::load(CFRecord& record, const size_t num_cells)
{
unsigned __int16 ixfe;
unsigned short ixfe;
for(size_t i = 0; i < num_cells; ++i)
{
record >> ixfe;
......
......@@ -21,8 +21,8 @@ public:
virtual void store(CFRecord& record){};
//-----------------------------
unsigned __int16 common_ixfe;
std::vector<unsigned __int16> rgixfe;
unsigned short common_ixfe;
std::vector<unsigned short> rgixfe;
};
......
......@@ -33,12 +33,12 @@ void MulRk::readFields(CFRecord& record)
Col colFirst;
Col colLast;
// A little hack to extract colLast before it is used
record.skipNunBytes(record.getDataSize() - sizeof(unsigned __int16));
record.skipNunBytes(record.getDataSize() - sizeof(unsigned short));
record >> colLast;
record.resetPointerToBegin();
//------------------
record >> rw >> colFirst;
for(unsigned __int16 i = colFirst; i <= colLast; ++i)
for(unsigned short i = colFirst; i <= colLast; ++i)
{
RkRec rec;
record >> rec;
......@@ -46,12 +46,12 @@ void MulRk::readFields(CFRecord& record)
cells.push_back(CellPtr(new Cell(rw, i, rec.get_ixfe())));
}
record.skipNunBytes(sizeof(unsigned __int16));
record.skipNunBytes(sizeof(unsigned short));
}
const long MulRk::GetRow() const
{
return static_cast<unsigned __int16>(rw);
return static_cast<unsigned short>(rw);
}
} // namespace XLS
......
......@@ -31,8 +31,8 @@ void NameCmt::writeFields(CFRecord& record)
{
FrtHeader frtHeader(rt_HeaderFooter);
record << frtHeader;
unsigned __int16 cchName = static_cast<unsigned __int16>(name.getSize());
unsigned __int16 cchComment = static_cast<unsigned __int16>(comment.getSize());
unsigned short cchName = static_cast<unsigned short>(name.getSize());
unsigned short cchComment = static_cast<unsigned short>(comment.getSize());
record << cchName << cchComment;
record << name << comment;
}
......@@ -42,8 +42,8 @@ void NameCmt::readFields(CFRecord& record)
{
FrtHeader frtHeader(rt_HeaderFooter);
record >> frtHeader;
unsigned __int16 cchName;
unsigned __int16 cchComment;
unsigned short cchName;
unsigned short cchComment;
record >> cchName >> cchComment;
name.setSize(cchName);
comment.setSize(cchComment);
......
......@@ -32,7 +32,7 @@ void NamePublish::readFields(CFRecord& record)
{
record.skipNunBytes(12);
#pragma message("############################ frtHeader skipped here")
unsigned __int16 flags;
unsigned short flags;
record >> flags >> strName;
fPublished = GETBIT(flags, 0);
fWorkbookParam = GETBIT(flags, 0);
......
......@@ -26,8 +26,8 @@ void Obj::writeFields(CFRecord& record)
if(0 == cmo.ot)
{
// FtGmo
unsigned __int16 ft = 0x06;
unsigned __int16 cb = 0x02;
unsigned short ft = 0x06;
unsigned short cb = 0x02;
record << ft << cb; // reserved
record.reserveNunBytes(2); // unused
}
......@@ -38,16 +38,16 @@ void Obj::writeFields(CFRecord& record)
if(0x0B == cmo.ot || 0x0C == cmo.ot)
{
// FtCbls
unsigned __int16 ft = 0x0A;
unsigned __int16 cb = 0x0C;
unsigned short ft = 0x0A;
unsigned short cb = 0x0C;
record << ft << cb; // reserved
record.reserveNunBytes(cb); // unused
}
if(0x0C == cmo.ot)
{
// FtRbo
unsigned __int16 ft = 0x0B;
unsigned __int16 cb = 0x06;
unsigned short ft = 0x0B;
unsigned short cb = 0x06;
record << ft << cb; // reserved
record.reserveNunBytes(cb); // unused
}
......
......@@ -23,7 +23,7 @@ public:
static const ElementType type = typeObjProtect;
//-----------------------------
Boolean<unsigned __int16> fLockObj;
Boolean<unsigned short> fLockObj;
public:
//BO_ATTRIB_MARKUP_BEGIN
//BO_ATTRIB_MARKUP_ATTRIB(fLockObj)
......
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