Commit 2710cabd authored by ElenaSubbotina's avatar ElenaSubbotina

XlsFormatReader - delete unuseds, fix extended crypt, ..

parent 1d55b122

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -42,6 +42,9 @@
#include "../../OfficeUtils/src/OfficeUtils.h"
#pragma comment(lib,"Shell32.lib")
#pragma comment(lib,"Advapi32.lib")
int _tmain(int argc, _TCHAR* argv[])
{
HRESULT hr = S_OK;
......
......@@ -326,13 +326,6 @@ CFRecord& CFRecord::operator>>(bool& val)
CFRecord& CFRecord::operator<<(bool& val)
{
throw;// EXCEPT::LE::WrongAPIUsage("This function may only be called by mistake.", __FUNCTION__);
}
void CFRecord::registerDelayedDataReceiver(CFStream::DELAYED_DATA_SAVER fn, const size_t n, const CFRecordType::TypeId receiver_id)
{
//ASSERT(!data_); // This throws if used after Commit or while reading of binary
......
......@@ -72,21 +72,20 @@ static std::wstring convertUtf16ToWString(const UTF16 * Data, int nLength)
return wstr;
}
// Binary representation of a record in BIFF8
class CFRecord
{
public:
CFRecord(CFStreamPtr stream, GlobalWorkbookInfoPtr global_info); // Create a record an read its data from the stream
CFRecord(CFRecordType::TypeId type_id, GlobalWorkbookInfoPtr global_info); // Create an empty record
~CFRecord();
void save(CFStreamPtr stream);
void commitData();
/* ID */
const CFRecordType::TypeId getTypeId() const;
const CFRecordType::TypeId getTypeId() const;
const CFRecordType::TypeString& getTypeString() const;
// File Pointer to the start of the record in file
const unsigned int getStreamPointer() const;
/* Data */
// Pointer to the beginning of the cached data
const char* getData() const ;
const size_t getDataSize() const;
......@@ -95,7 +94,6 @@ public:
void appendRawData(const char* raw_data, const size_t size);
void insertDataFromRecordToBeginning(CFRecordPtr where_from);
/* Pointers */
const bool isEOF() const; // whether all the data have bean read
// Checks whether the specified number of unsigned chars present in the non-read part of the buffer
// Doesn't generate an exception
......@@ -129,20 +127,11 @@ public:
size_ += n;
}
/* Markup delayed data */
// Registers data receiver place and reserves n unsigned chars for it
void registerDelayedDataReceiver(CFStream::DELAYED_DATA_SAVER fn, const size_t n, const CFRecordType::TypeId receiver_id = rt_NONE);
// Registers delayed source data as any user-defined unsigned int
void registerDelayedDataSource(const unsigned int data, const CFRecordType::TypeId receiver_id);
// Registers delayed source data as file pointer of the start of the record
void registerDelayedFilePointerSource(const CFRecordType::TypeId receiver_id);
// Registers delayed source data as file pointer of the start of the record and the specified offset added
void registerDelayedFilePointerAndOffsetSource(const unsigned int offset, const CFRecordType::TypeId receiver_id);
// Extract the specified type of data without moving rdPtr
template<class T>
const T* getCurData() const
{
......@@ -187,25 +176,12 @@ public:
CFRecord& operator>>(char& val) { loadAnyData(val); return *this; }
CFRecord& operator>>(bool& val);
CFRecord& operator<<(unsigned char& 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<<(int& val) { storeAnyData(val); return *this; }
CFRecord& operator<<(double& val) { storeAnyData(val); return *this; }
CFRecord& operator<<(_GUID_& val) { storeAnyData(val); return *this; }
CFRecord& operator<<(short& val) { storeAnyData(val); return *this; }
CFRecord& operator<<(char& val) { storeAnyData(val); return *this; }
CFRecord& operator<<(wchar_t& val) { storeAnyData(val); return *this; }
CFRecord& operator<<(bool& val);
private:
static const size_t MAX_RECORD_SIZE = 8224;
private:
CFStream::ReceiverItems receiver_items;
CFStream::SourceItems source_items;
private: // parts of the record
unsigned int file_ptr;
CFRecordType::TypeId type_id_;
size_t size_;
......@@ -213,7 +189,6 @@ private: // parts of the record
size_t rdPtr;
static char intData[MAX_RECORD_SIZE];
private:
GlobalWorkbookInfoPtr global_info_;
};
......@@ -262,16 +237,6 @@ CFRecord& operator<<(CFRecord& record, std::vector<T>& vec)
CFRecord& operator>>(CFRecord & record, std::wstring & str);
#endif
template<class T>
CFRecord& operator<<(CFRecord & record, std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
{
for(typename std::basic_string<T, std::char_traits<T>, std::allocator<T> >::iterator it = str.begin(), itEnd = str.end(); it != itEnd; ++it)
{
record << *it;
}
record.storeAnyData(static_cast<T>(0));
return record;
}
template<class T>
CFRecord& operator>>(CFRecord & record, _CP_OPT(T)& val)
......
......@@ -51,15 +51,6 @@ BaseObjectPtr AnyObject::clone()
return BaseObjectPtr(new AnyObject(*this));
}
void AnyObject::writeFields(CFRecord& record)
{
#pragma message("####################### AnyObject record is not implemented")
Log::info("AnyObject record is not implemented.");
//record << some_value;
}
void AnyObject::readFields(CFRecord& record)
{
tag_name = record.getTypeString();
......
......@@ -48,7 +48,7 @@ public:
~AnyObject();
BaseObjectPtr clone();
virtual void writeFields(CFRecord& record);
virtual void readFields(CFRecord& record);
std::string tag_name;
......
......@@ -36,7 +36,7 @@
#include <sstream>
#include "Logging/Log.h"
#include "XlsElementsType.h" //шоб со строками не работать
#include "XlsElementsType.h"
#include <simple_xml_writer.h>
......@@ -45,27 +45,21 @@ namespace XLS
class CFStream;
class BinProcessor;
//class BinWriterProcessor;
class CFStreamCacheReader;
class BaseObject;
typedef boost::shared_ptr<BaseObject> BaseObjectPtr;
// Logical representation of an XML record
class BaseObject //: public boost::enable_shared_from_this<BaseObject>
class BaseObject
{
public:
BaseObject(){}
~BaseObject(){}
//BaseObjectPtr get_BaseObjectPtr() { return shared_from_this(); }
virtual boost::shared_ptr<BaseObject> clone() = 0;
virtual const bool read(CFStreamCacheReader& reader, BaseObject* parent, const bool mandatory) = 0; // Read self and children
//virtual void toFrom(BinProcessor& proc) = 0; // This function shall contain only mark functions and is the universal XML serialiser
virtual const std::string & getClassName() const = 0; // Must be overridden in every deriver. The return value must be a reference to a static variable inside the getter
void add_child (BaseObjectPtr e) {elements_.push_back(e);}
......
......@@ -51,17 +51,6 @@ BaseObjectPtr AlRuns::clone()
}
void AlRuns::writeFields(CFRecord& record)
{
unsigned short cRuns = rgRuns.size();
record << cRuns;
for(BiffStructurePtrVector::iterator it = rgRuns.begin(), itEnd = rgRuns.end(); it != itEnd; ++it)
{
(*it)->store(record);
}
}
void AlRuns::readFields(CFRecord& record)
{
unsigned short cRuns;
......
......@@ -49,7 +49,6 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeAlRuns;
......
......@@ -50,17 +50,6 @@ BaseObjectPtr Area::clone()
return BaseObjectPtr(new Area(*this));
}
void Area::writeFields(CFRecord& record)
{
unsigned short flags = 0;
SETBIT(flags, 0, fStacked);
SETBIT(flags, 1, f100);
SETBIT(flags, 2, fHasShadow);
record << flags;
}
void Area::readFields(CFRecord& record)
{
unsigned short flags;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
int serialize(std::wostream & _stream);
......
......@@ -50,16 +50,6 @@ BaseObjectPtr AreaFormat::clone()
return BaseObjectPtr(new AreaFormat(*this));
}
void AreaFormat::writeFields(CFRecord& record)
{
unsigned short flags = 0;
SETBIT(flags, 0, fAuto);
SETBIT(flags, 1, fInvertNeg);
record << rgbFore << rgbBack << fls << flags << icvFore << icvBack;
}
void AreaFormat::readFields(CFRecord& record)
{
unsigned short flags;
......
......@@ -49,7 +49,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeAreaFormat;
......
......@@ -50,18 +50,6 @@ BaseObjectPtr Array::clone()
return BaseObjectPtr(new Array(*this));
}
void Array::writeFields(CFRecord& record)
{
record << ref_;
unsigned short flags = 0;
SETBIT(flags, 0, fAlwaysCalc);
record << flags;
record.reserveNunBytes(4); // unused
formula.store(record);
}
void Array::readFields(CFRecord& record)
{
record >> ref_;
......
......@@ -50,7 +50,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeArray;
......
......@@ -52,19 +52,6 @@ BaseObjectPtr AttachedLabel::clone()
}
void AttachedLabel::writeFields(CFRecord& record)
{
unsigned short flags = 0;
SETBIT(flags, 0, fShowValue);
SETBIT(flags, 1, fShowPercent);
SETBIT(flags, 2, fShowLabelAndPerc);
SETBIT(flags, 4, fShowLabel);
SETBIT(flags, 5, fShowBubbleSizes);
SETBIT(flags, 6, fShowSeriesName);
record << flags;
}
void AttachedLabel::readFields(CFRecord& record)
{
unsigned short flags;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeAttachedLabel;
......
......@@ -79,12 +79,6 @@ BaseObjectPtr AutoFilter::clone()
return BaseObjectPtr(new AutoFilter(*this));
}
void AutoFilter::writeFields(CFRecord& record)
{
}
void AutoFilter::readFields(CFRecord& record)
{
m_bAutoFilter12 = false;
......
......@@ -49,7 +49,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeAutoFilter;
......
......@@ -51,11 +51,6 @@ BaseObjectPtr AutoFilter12::clone()
}
void AutoFilter12::writeFields(CFRecord& record)
{
}
void AutoFilter12::readFields(CFRecord& record)
{
_UINT16 flags;
......
......@@ -53,7 +53,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeAutoFilter12;
......
......@@ -51,12 +51,6 @@ BaseObjectPtr AutoFilterInfo::clone()
}
void AutoFilterInfo::writeFields(CFRecord& record)
{
record << cEntries;
}
void AutoFilterInfo::readFields(CFRecord& record)
{
record >> cEntries;
......
......@@ -50,7 +50,7 @@ class AutoFilterInfo: public BiffRecord
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
//-----------------------------
_UINT16 cEntries;
......
......@@ -51,22 +51,6 @@ BaseObjectPtr AxcExt::clone()
}
void AxcExt::writeFields(CFRecord& record)
{
unsigned short flags = 0;
SETBIT(flags, 0, fAutoMin);
SETBIT(flags, 1, fAutoMax);
SETBIT(flags, 2, fAutoMajor);
SETBIT(flags, 3, fAutoMinor);
SETBIT(flags, 4, fDateAxis);
SETBIT(flags, 5, fAutoBase);
SETBIT(flags, 6, fAutoCross);
SETBIT(flags, 7, fAutoDate);
record >> catMin >> catMax >> catMajor >> duMajor >> catMinor >> duMinor >> duBase >> catCrossDate >> flags;
}
void AxcExt::readFields(CFRecord& record)
{
unsigned char flags, reserved;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeAxcExt;
......
......@@ -50,13 +50,6 @@ BaseObjectPtr AxesUsed::clone()
return BaseObjectPtr(new AxesUsed(*this));
}
void AxesUsed::writeFields(CFRecord& record)
{
record << cAxes;
}
void AxesUsed::readFields(CFRecord& record)
{
record >> cAxes;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeAxesUsed;
......
......@@ -50,14 +50,6 @@ BaseObjectPtr Axis::clone()
return BaseObjectPtr(new Axis(*this));
}
void Axis::writeFields(CFRecord& record)
{
record << wType;
record.reserveNunBytes(16); // reserved
}
void Axis::readFields(CFRecord& record)
{
record >> wType;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeAxis;
......
......@@ -50,13 +50,6 @@ BaseObjectPtr AxisLine::clone()
return BaseObjectPtr(new AxisLine(*this));
}
void AxisLine::writeFields(CFRecord& record)
{
record << id;
}
void AxisLine::readFields(CFRecord& record)
{
record >> id;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeAxisLine;
......
......@@ -50,14 +50,6 @@ BaseObjectPtr AxisParent::clone()
return BaseObjectPtr(new AxisParent(*this));
}
void AxisParent::writeFields(CFRecord& record)
{
record << iax;
record.reserveNunBytes(16);// unused
}
void AxisParent::readFields(CFRecord& record)
{
record >> iax;
......
......@@ -48,13 +48,13 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeAxisParent;
//-----------------------------
Boolean<unsigned short> iax;
unsigned short iax;
};
......
......@@ -67,37 +67,6 @@ BaseObjectPtr BOF::clone()
return BaseObjectPtr(new BOF(*this));
}
void BOF::writeFields(CFRecord& record)
{
if(BOF::st_Worksheet == dt)
{
record.registerDelayedFilePointerSource(rt_BoundSheet8);
}
record << vers << dt << rupBuild << rupYear;
_UINT32 flags = 0;
SETBIT(flags, 0, fWin);
SETBIT(flags, 1, fRisc);
SETBIT(flags, 2, fBeta);
SETBIT(flags, 3, fWinAny);
SETBIT(flags, 4, fMacAny);
SETBIT(flags, 5, fBetaAny);
SETBIT(flags, 8, fRiscAny);
SETBIT(flags, 9, fOOM);
SETBIT(flags, 10, fGlJmp);
SETBIT(flags, 13, fFontLimit);
SETBITS(flags, 14,17, verXLHigh);
record << flags;
record << verLowestBiff;
unsigned char flags2 = 0;
SETBITS(flags2, 0, 3, verLastXLSaved);
record << flags2;
record.reserveNunBytes(2); // reserved
}
void BOF::readFields(CFRecord& record)
{
record >> vers >> dt >> rupBuild >> rupYear;
......
......@@ -50,7 +50,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBOF;
......
......@@ -51,15 +51,6 @@ BaseObjectPtr BRAI::clone()
}
void BRAI::writeFields(CFRecord& record)
{
unsigned short flags = 0;
SETBIT(flags, 0, fUnlinkedIfmt);
record << id << rt << flags << ifmt;
formula.store(record);
}
void BRAI::readFields(CFRecord& record)
{
unsigned short flags;
......
......@@ -51,7 +51,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBRAI;
......
......@@ -50,13 +50,6 @@ BaseObjectPtr Backup::clone()
return BaseObjectPtr(new Backup(*this));
}
void Backup::writeFields(CFRecord& record)
{
record << fBackup;
}
void Backup::readFields(CFRecord& record)
{
record >> fBackup;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBackup;
......
......@@ -52,17 +52,6 @@ BaseObjectPtr Bar::clone()
}
void Bar::writeFields(CFRecord& record)
{
unsigned short flags = 0;
SETBIT(flags, 0, fTranspose);
SETBIT(flags, 1, fStacked);
SETBIT(flags, 2, f100);
SETBIT(flags, 3, fHasShadow);
record >> pcOverlap >> pcGap >> flags;
}
void Bar::readFields(CFRecord& record)
{
unsigned short flags;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBar;
......
......@@ -50,13 +50,6 @@ BaseObjectPtr Begin::clone()
return BaseObjectPtr(new Begin(*this));
}
void Begin::writeFields(CFRecord& record)
{
// no data
}
void Begin::readFields(CFRecord& record)
{
// no data
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBegin;
......
......@@ -33,7 +33,6 @@
#include "BiffRecord.h"
#include <Binary/CFStream.h>
#include "Binary/CFStreamCacheReader.h"
#include "Binary/CFStreamCacheWriter.h"
namespace XLS
......
......@@ -40,7 +40,6 @@ namespace XLS
class CFStream;
// Logical representation of a record in BIFF8
class BiffRecord: public BaseObject
{
public:
......@@ -48,10 +47,8 @@ public:
~BiffRecord();
virtual const bool read(CFStreamCacheReader& reader, BaseObject* parent, const bool is_mandatory); // Read self and children
//virtual const bool write(BinWriterProcessor& proc, const bool is_mandatory); // Write self and children
virtual void readFields(CFRecord& record) = 0;
virtual void writeFields(CFRecord& record) = 0;
virtual const CFRecordType::TypeId getTypeId() const = 0; // made virtual to let derived assign their own names (for example, EOF_T)
......@@ -59,9 +56,6 @@ public:
virtual ElementType get_type() const { return type; }
//-----------------------------
virtual void readFollowingContinue(CFStreamCacheReader& reader);
//virtual void writeCreatedContinueRecords(CFStreamCacheWriter& writer);
//-----------------------------
virtual const bool storeRecordAndDecideProceeding(CFRecordPtr record); // This function is overridden in BiffRecordSplit
protected:
......
......@@ -32,7 +32,6 @@
#include "BiffRecordContinued.h"
#include "Binary/CFStreamCacheReader.h"
#include "Binary/CFStreamCacheWriter.h"
namespace XLS
......@@ -75,21 +74,5 @@ void BiffRecordContinued::readFollowingContinue(CFStreamCacheReader& reader)
}
// Read all the Continue records that follow the record
void BiffRecordContinued::writeCreatedContinueRecords(CFStreamCacheWriter& writer)
{
for(ContinuesMap::const_iterator it = continue_records.begin(), itEnd = continue_records.end(); it != itEnd; ++it)
{
CFRecordType::TypeId continue_type = (*it).first;
CFRecordPtrList continues_list = (*it).second;
for(CFRecordPtrList::iterator it2 = continues_list.begin(), it2End = continues_list.end(); it2 != it2End; ++it2)
{
writer.storeNextRecord(*it2);
}
}
continue_records.clear();
}
} // namespace XLS
......@@ -49,7 +49,6 @@ protected:
//-----------------------------
virtual void readFollowingContinue(CFStreamCacheReader& reader);
virtual void writeCreatedContinueRecords(CFStreamCacheWriter& writer);
};
......
......@@ -32,8 +32,6 @@
#include "BiffRecordSplit.h"
#include "Binary/CFStreamCacheReader.h"
#include "Binary/CFStreamCacheWriter.h"
namespace XLS
{
......
......@@ -50,13 +50,6 @@ BaseObjectPtr BigName::clone()
return BaseObjectPtr(new BigName(*this));
}
void BigName::writeFields(CFRecord& record)
{
}
void BigName::readFields(CFRecord& record)
{
#pragma message("####################### BigName record is not implemented")
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBigName;
......
......@@ -50,13 +50,6 @@ BaseObjectPtr BkHim::clone()
return BaseObjectPtr(new BkHim(*this));
}
void BkHim::writeFields(CFRecord& record)
{
}
void BkHim::readFields(CFRecord& record)
{
record >> cf;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBkHim;
......
......@@ -49,13 +49,6 @@ BaseObjectPtr Blank::clone()
}
void Blank::writeFields(CFRecord& record)
{
resender.store(record);
record << cell;
}
void Blank::readFields(CFRecord& record)
{
global_info_ = record.getGlobalWorkbookInfo();
......
......@@ -50,7 +50,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBlank;
......
......@@ -51,39 +51,6 @@ BaseObjectPtr BookBool::clone()
return BaseObjectPtr(new BookBool(*this));
}
void BookBool::writeFields(CFRecord& record)
{
unsigned short flags = 0;
SETBIT(flags, 0, fNoSaveSup);
SETBIT(flags, 2, fHasEnvelope);
SETBIT(flags, 3, fEnvelopeVisible);
SETBIT(flags, 4, fEnvelopeInitDone);
unsigned char grUpdateLinks_num;
if(grUpdateLinks == std::wstring (L"userSet"))
{
grUpdateLinks_num = 0;
}
else if(grUpdateLinks == std::wstring (L"never"))
{
grUpdateLinks_num = 1;
}
else if(grUpdateLinks == std::wstring (L"always"))
{
grUpdateLinks_num = 2;
}
else
{
// EXCEPT::LE::AttributeDataWrong(L"grUpdateLinks", record.getTypeString().c_str(), grUpdateLinks);
}
SETBITS(flags, 5, 6, grUpdateLinks_num);
SETBIT(flags, 8, fHideBorderUnselLists);
record << flags;
}
void BookBool::readFields(CFRecord& record)
{
unsigned short flags;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBookBool;
......
......@@ -52,31 +52,6 @@ BaseObjectPtr BookExt::clone()
return BaseObjectPtr(new BookExt(*this));
}
void BookExt::writeFields(CFRecord& record)
{
FrtHeader header(rt_BookExt);
record << header;
record << cb;
_UINT32 flags = 0;
SETBIT(flags, 0, fDontAutoRecover);
SETBIT(flags, 1, fHidePivotList);
SETBIT(flags, 2, fFilterPrivacy);
SETBIT(flags, 3, fEmbedFactoids);
SETBITS(flags, 4, 5, mdFactoidDisplay);
SETBIT(flags, 6, fSavedDuringRecovery);
SETBIT(flags, 7, fCreatedViaMinimalSave);
SETBIT(flags, 8, fOpenedViaDataRecovery);
SETBIT(flags, 9, fOpenedViaSafeLoad);
record << flags;
record << grbit1;
record << grbit2;
}
void BookExt::readFields(CFRecord& record)
{
FrtHeader header(rt_BookExt);
......
......@@ -50,7 +50,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBookExt;
......
......@@ -49,14 +49,6 @@ BaseObjectPtr BoolErr::clone()
return BaseObjectPtr(new BoolErr(*this));
}
void BoolErr::writeFields(CFRecord& record)
{
resender.store(record);
record << cell << bes;
}
void BoolErr::readFields(CFRecord& record)
{
global_info_ = record.getGlobalWorkbookInfo();
......
......@@ -51,7 +51,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBoolErr;
......
......@@ -52,14 +52,6 @@ BaseObjectPtr BopPop::clone()
}
void BopPop::writeFields(CFRecord& record)
{
unsigned short flags = 0;
SETBIT(flags, 0, fHasShadow);
record << pst << fAutoSplit << split << iSplitPos << pcSplitPercent << pcPie2Size << pcGap << numSplitValue << flags;
}
void BopPop::readFields(CFRecord& record)
{
unsigned short flags;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBopPop;
......
......@@ -51,12 +51,6 @@ BaseObjectPtr BopPopCustom::clone()
}
void BopPopCustom::writeFields(CFRecord& record)
{
// We don't support xlsx to xls conversion
}
void BopPopCustom::readFields(CFRecord& record)
{
record >> rggrbit;
......
......@@ -43,7 +43,6 @@ public:
BiffStructurePtr clone();
virtual void load(CFRecord& record);
virtual void store(CFRecord& record){}
static const ElementType type = typeBopPopCustomPiesIndices;
//-----------------------------
......@@ -63,7 +62,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBopPopCustom;
......
......@@ -50,13 +50,6 @@ BaseObjectPtr BottomMargin::clone()
return BaseObjectPtr(new BottomMargin(*this));
}
void BottomMargin::writeFields(CFRecord& record)
{
record << num;
}
void BottomMargin::readFields(CFRecord& record)
{
record >> num;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBottomMargin;
......
......@@ -52,36 +52,6 @@ BaseObjectPtr BoundSheet8::clone()
return BaseObjectPtr(new BoundSheet8(*this));
}
void BoundSheet8::writeFields(CFRecord& record)
{
record.registerDelayedDataReceiver(NULL, sizeof(unsigned int));
unsigned short flags = 0;
unsigned char hsState_num;
if(hsState == std::wstring (L"visible"))
{
hsState_num = 0;
}
else if(hsState == std::wstring (L"hidden"))
{
hsState_num = 1;
}
else if(hsState == std::wstring (L"veryHidden"))
{
hsState_num = 3;
}
else
{
// EXCEPT::LE::AttributeDataWrong(L"hsState", record.getTypeString().c_str(), hsState);
}
ShortXLUnicodeString stName = name_;
SETBITS(flags, 0, 1, hsState_num);
SETBITS(flags, 8, 15, dt);
record << flags << stName;
}
void BoundSheet8::readFields(CFRecord& record)
{
unsigned short flags;
......
......@@ -49,7 +49,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBoundSheet8;
......
......@@ -50,13 +50,6 @@ BaseObjectPtr BuiltInFnGroupCount::clone()
return BaseObjectPtr(new BuiltInFnGroupCount(*this));
}
void BuiltInFnGroupCount::writeFields(CFRecord& record)
{
record << count;
}
void BuiltInFnGroupCount::readFields(CFRecord& record)
{
record >> count;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeBuiltInFnGroupCount;
......
......@@ -58,22 +58,6 @@ BaseObjectPtr CF::clone()
}
void CF::writeFields(CFRecord& record)
{
record << ct << cp;
record.registerDelayedDataReceiver(NULL, sizeof(unsigned short)/*cce*/);
record.registerDelayedDataReceiver(NULL, sizeof(unsigned short)/*cce*/);
record << rgbdxf;
rgce1.store(record);
rgce2.store(record);
record.registerDelayedDataSource(rgce1.getCCE(), rt_CF);
record.registerDelayedDataSource(rgce2.getCCE(), rt_CF);
}
void CF::readFields(CFRecord& record)
{
......
......@@ -50,7 +50,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeCF;
......
......@@ -61,13 +61,6 @@ BaseObjectPtr CF12::clone()
return BaseObjectPtr(new CF12(*this));
}
void CF12::writeFields(CFRecord& record)
{
}
void CF12::readFields(CFRecord& record)
{
GlobalWorkbookInfoPtr global_info = record.getGlobalWorkbookInfo();
......
......@@ -54,7 +54,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeCF12;
......
......@@ -50,13 +50,6 @@ BaseObjectPtr CFEx::clone()
return BaseObjectPtr(new CFEx(*this));
}
void CFEx::writeFields(CFRecord& record)
{
}
void CFEx::readFields(CFRecord& record)
{
record >> frtRefHeaderU;
......
......@@ -50,7 +50,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeCFEx;
......
......@@ -52,12 +52,6 @@ BaseObjectPtr CRN::clone()
}
void CRN::writeFields(CFRecord& record)
{
}
void CRN::readFields(CFRecord& record)
{
record >> colLast >> colFirst >> row;
......
......@@ -49,7 +49,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeCRN;
......
......@@ -50,13 +50,6 @@ BaseObjectPtr CalcCount::clone()
return BaseObjectPtr(new CalcCount(*this));
}
void CalcCount::writeFields(CFRecord& record)
{
record << cIter;
}
void CalcCount::readFields(CFRecord& record)
{
record >> cIter;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeCalcCount;
......
......@@ -51,12 +51,6 @@ BaseObjectPtr CalcDelta::clone()
}
void CalcDelta::writeFields(CFRecord& record)
{
record << numDelta;
}
void CalcDelta::readFields(CFRecord& record)
{
record >> numDelta;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeCalcDelta;
......
......@@ -51,12 +51,6 @@ BaseObjectPtr CalcIter::clone()
}
void CalcIter::writeFields(CFRecord& record)
{
record << vfIter;
}
void CalcIter::readFields(CFRecord& record)
{
record >> vfIter;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeCalcIter;
......
......@@ -51,30 +51,6 @@ BaseObjectPtr CalcMode::clone()
return BaseObjectPtr(new CalcMode(*this));
}
void CalcMode::writeFields(CFRecord& record)
{
short fAutoRecalc_num;
if(fAutoRecalc == std::wstring (L"manual"))
{
fAutoRecalc_num = 0;
}
else if(fAutoRecalc == std::wstring (L"auto"))
{
fAutoRecalc_num = 1;
}
else if( fAutoRecalc == std::wstring (L"autoNoTable"))
{
fAutoRecalc_num = 2;
}
else
{
// EXCEPT::LE::AttributeDataWrong(L"fAutoRecalc", record.getTypeString().c_str(), fAutoRecalc);
}
record << fAutoRecalc_num;
}
void CalcMode::readFields(CFRecord& record)
{
short fAutoRecalc_num;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeCalcMode;
......
......@@ -51,12 +51,6 @@ BaseObjectPtr CalcPrecision::clone()
}
void CalcPrecision::writeFields(CFRecord& record)
{
record << fFullPrec;
}
void CalcPrecision::readFields(CFRecord& record)
{
record >> fFullPrec;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeCalcPrecision;
......
......@@ -52,24 +52,6 @@ BaseObjectPtr CalcRefMode::clone()
}
void CalcRefMode::writeFields(CFRecord& record)
{
Boolean<unsigned short> fRef;
if(fRefA1 == std::wstring (L"A1"))
{
fRef = true;
}
else if(fRefA1 == std::wstring (L"R1C1"))
{
fRef = false;
}
else
{
// EXCEPT::LE::AttributeDataWrong(L"fRefA1", record.getTypeString().c_str(), fRefA1);
}
record << fRef;
}
void CalcRefMode::readFields(CFRecord& record)
{
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeCalcRefMode;
......
......@@ -51,12 +51,6 @@ BaseObjectPtr CalcSaveRecalc::clone()
}
void CalcSaveRecalc::writeFields(CFRecord& record)
{
record << fSaveRecalc;
}
void CalcSaveRecalc::readFields(CFRecord& record)
{
record >> fSaveRecalc;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeCalcSaveRecalc;
......
......@@ -51,17 +51,6 @@ BaseObjectPtr CatLab::clone()
return BaseObjectPtr(new CatLab(*this));
}
void CatLab::writeFields(CFRecord& record)
{
FrtHeaderOld frtHeaderOld(rt_CatLab);
unsigned short flags = 0;
SETBIT(flags, 0, cAutoCatLabelReal);
record << frtHeaderOld << wOffset << at << flags;
record.reserveNunBytes(2); // reserved
}
void CatLab::readFields(CFRecord& record)
{
FrtHeaderOld frtHeaderOld;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeCatLab;
......
......@@ -50,18 +50,6 @@ BaseObjectPtr CatSerRange::clone()
return BaseObjectPtr(new CatSerRange(*this));
}
void CatSerRange::writeFields(CFRecord& record)
{
unsigned short flags = 0;
SETBIT(flags, 0, fBetween);
SETBIT(flags, 1, fMaxCross);
SETBIT(flags, 2, fReversed);
record << catCross << catLabel << catMark << flags;
}
void CatSerRange::readFields(CFRecord& record)
{
unsigned short flags;
......
......@@ -48,7 +48,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeCatSerRange;
......
......@@ -50,15 +50,6 @@ BaseObjectPtr CellWatch::clone()
return BaseObjectPtr(new CellWatch(*this));
}
void CellWatch::writeFields(CFRecord& record)
{
#pragma message("####################### CellWatch record is not implemented")
Log::error("CellWatch record is not implemented.");
//record << some_value;
}
void CellWatch::readFields(CFRecord& record)
{
record >> frtRefHeaderU;
......
......@@ -49,7 +49,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeCellWatch;
......
......@@ -51,12 +51,6 @@ BaseObjectPtr Chart::clone()
}
void Chart::writeFields(CFRecord& record)
{
record << x << y << dx << dy;
}
void Chart::readFields(CFRecord& record)
{
record >> x >> y >> dx >> dy;
......
......@@ -49,7 +49,7 @@ public:
BaseObjectPtr clone();
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
static const ElementType type = typeChart;
......
......@@ -50,13 +50,6 @@ BaseObjectPtr Chart3DBarShape::clone()
return BaseObjectPtr(new Chart3DBarShape(*this));
}
void Chart3DBarShape::writeFields(CFRecord& record)
{
record << riser << taper;
}
void Chart3DBarShape::readFields(CFRecord& record)
{
record >> riser >> taper;
......
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