// CodeGear C++Builder
// Copyright (c) 1995, 2014 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'BIFF_ReadII5.pas' rev: 28.00 (Windows)

#ifndef Biff_readii5HPP
#define Biff_readii5HPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.Classes.hpp>	// Pascal unit
#include <System.SysUtils.hpp>	// Pascal unit
#include <System.Math.hpp>	// Pascal unit
#include <Winapi.Windows.hpp>	// Pascal unit
#include <Vcl.Clipbrd.hpp>	// Pascal unit
#include <BIFF_Utils5.hpp>	// Pascal unit
#include <BIFF_RecsII5.hpp>	// Pascal unit
#include <BIFF_SheetData5.hpp>	// Pascal unit
#include <BIFF_Stream5.hpp>	// Pascal unit
#include <BIFF5.hpp>	// Pascal unit
#include <BIFF_DecodeFormula5.hpp>	// Pascal unit
#include <BIFF_RecordStorage5.hpp>	// Pascal unit
#include <BIFF_Escher5.hpp>	// Pascal unit
#include <BIFF_MergedCells5.hpp>	// Pascal unit
#include <BIFF_WideStrList5.hpp>	// Pascal unit
#include <Xc12Utils5.hpp>	// Pascal unit
#include <Xc12Manager5.hpp>	// Pascal unit
#include <Xc12DataWorkbook5.hpp>	// Pascal unit
#include <Xc12DataWorksheet5.hpp>	// Pascal unit
#include <Xc12DataStyleSheet5.hpp>	// Pascal unit
#include <Xc12Common5.hpp>	// Pascal unit
#include <XLSUtils5.hpp>	// Pascal unit
#include <XLSMMU5.hpp>	// Pascal unit
#include <XLSCellMMU5.hpp>	// Pascal unit
#include <XLSFormulaTypes5.hpp>	// Pascal unit
#include <XLSCellAreas5.hpp>	// Pascal unit
#include <XLSHyperlinks5.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Biff_readii5
{
//-- type declarations -------------------------------------------------------
struct DECLSPEC_DRECORD TSharedFormula
{
public:
	System::Word Row1;
	System::Word Row2;
	System::Byte Col1;
	System::Byte Col2;
	System::Word Len;
	System::Sysutils::TByteArray *Formula;
};


class DELPHICLASS TXLSReadII;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TXLSReadII : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	typedef System::DynamicArray<TSharedFormula> _TXLSReadII__1;
	
	typedef System::DynamicArray<System::UnicodeString> _TXLSReadII__2;
	
	
protected:
	Xc12manager5::TXc12Manager* FManager;
	System::Sysutils::TByteArray *PBuf;
	Biff5::TBIFF5* FXLS;
	int FCurrSheet;
	Biff_stream5::TXLSStream* FXLSStream;
	System::Classes::TStringList* FBoundsheets;
	int FBoundsheetIndex;
	Biff_recsii5::TBIFFHeader Header;
	_TXLSReadII__1 FSharedFormulas;
	unsigned FBIFFVer;
	System::Sysutils::TByteArray *FLastARRAY;
	int FLastARRAYSize;
	int FMaxFormat;
	int FFormatCnt;
	_TXLSReadII__2 FEx40NumFmts;
	bool FEx40NumFmtsSaved;
	Biff_recordstorage5::TRecordStorage* CurrRecs;
	bool InsertRecord;
	int FCnt;
	Xc12dataworksheet5::TXc12DataWorksheet* FCurrXc12Sheet;
	bool FSkipMSO;
	void __fastcall RREC_FILEPASS(void);
	void __fastcall RREC_WRITEACCESS(void);
	void __fastcall RREC_FILESHAREING(void);
	void __fastcall RREC_CODEPAGE(void);
	void __fastcall RREC_DSF(void);
	void __fastcall RREC_FNGROUPCOUNT(void);
	void __fastcall RREC_WINDOWPROTECT(void);
	void __fastcall RREC_PROTECT(void);
	void __fastcall RREC_SCENPROTECT(void);
	void __fastcall RREC_OBJPROTECT(void);
	void __fastcall RREC_PASSWORD(void);
	void __fastcall RREC_PROT4REV(void);
	void __fastcall RREC_PROT4REVPASS(void);
	void __fastcall RREC_WINDOW1(void);
	void __fastcall RREC_BACKUP(void);
	void __fastcall RREC_HIDEOBJ(void);
	void __fastcall RREC_1904(void);
	void __fastcall RREC_PRECISION(void);
	void __fastcall RREC_REFRESHALL(void);
	void __fastcall RREC_BOOKBOOL(void);
	void __fastcall RREC_PALETTE(void);
	void __fastcall RREC_FONT(void);
	void __fastcall RRec_FONT_40(void);
	void __fastcall RREC_FORMAT(void);
	void __fastcall RREC_FORMAT_40(void);
	void __fastcall RREC_XF(void);
	void __fastcall RREC_XF_40(void);
	void __fastcall RREC_STYLE(void);
	void __fastcall RREC_NAME(void);
	void __fastcall RREC_SUPBOOK(void);
	void __fastcall RREC_EXTERNNAME(void);
	void __fastcall RREC_XCT(void);
	void __fastcall RREC_EXTERNCOUNT(void);
	void __fastcall RREC_EXTERNSHEET(void);
	void __fastcall RREC_BOUNDSHEET(void);
	void __fastcall RREC_COUNTRY(void);
	void __fastcall RREC_RECALCID(void);
	void __fastcall RREC_MSODRAWINGGROUP(void);
	void __fastcall RREC_MSO_0866(void);
	void __fastcall RREC_SST(void);
	void __fastcall RREC_EXTSST(void);
	void __fastcall RREC_EOF(void);
	void __fastcall RREC_CALCMODE(void);
	void __fastcall RREC_CALCCOUNT(void);
	void __fastcall RREC_REFMODE(void);
	void __fastcall RREC_ITERATION(void);
	void __fastcall RREC_DELTA(void);
	void __fastcall RREC_SAVERECALC(void);
	void __fastcall RREC_PRINTHEADERS(void);
	void __fastcall RREC_PRINTGRIDLINES(void);
	void __fastcall RREC_GRIDSET(void);
	void __fastcall RREC_GUTS(void);
	void __fastcall RREC_DEFAULTROWHEIGHT(void);
	void __fastcall RREC_WSBOOL(void);
	void __fastcall RREC_HORIZONTALPAGEBREAKS(void);
	void __fastcall RREC_VERTICALPAGEBREAKS(void);
	void __fastcall RREC_HEADER(void);
	void __fastcall RREC_FOOTER(void);
	void __fastcall RREC_HCENTER(void);
	void __fastcall RREC_VCENTER(void);
	void __fastcall RREC_SETUP(void);
	void __fastcall RREC_LEFTMARGIN(void);
	void __fastcall RREC_RIGHTMARGIN(void);
	void __fastcall RREC_TOPMARGIN(void);
	void __fastcall RREC_BOTTOMMARGIN(void);
	void __fastcall RREC_DEFCOLWIDTH(void);
	void __fastcall RREC_FILTERMODE(void);
	void __fastcall RREC_AUTOFILTERINFO(void);
	void __fastcall RREC_COLWIDTH(void);
	void __fastcall RREC_COLINFO(void);
	void __fastcall RREC_DIMENSIONS(void);
	void __fastcall RREC_INTEGER_20(void);
	void __fastcall RREC_NUMBER_20(void);
	void __fastcall RREC_LABEL_20(void);
	void __fastcall RREC_ROW(void);
	void __fastcall RREC_BLANK(void);
	void __fastcall RREC_BOOLERR(void);
	void __fastcall RREC_FORMULA(void);
	void __fastcall RREC_NUMBER(void);
	void __fastcall RREC_RK(void);
	void __fastcall RREC_MULRK(void);
	void __fastcall RREC_MULBLANK(void);
	void __fastcall RREC_LABELSST(void);
	void __fastcall RREC_LABEL(void);
	void __fastcall RREC_LABEL_X(void);
	void __fastcall RREC_RSTRING(void);
	void __fastcall RREC_NOTE(void);
	void __fastcall READ_SHRFMLA(void);
	void __fastcall RREC_MSODRAWING(void);
	void __fastcall RREC_MSODRAWINGSELECTION(void);
	void __fastcall RREC_WINDOW2(void);
	void __fastcall RREC_SCL(void);
	void __fastcall RREC_PANE(void);
	void __fastcall RREC_SELECTION(void);
	void __fastcall RREC_SHEETEXT(void);
	void __fastcall RREC_FEATHEADR(void);
	void __fastcall RREC_DVAL(void);
	void __fastcall RREC_MERGEDCELLS(void);
	void __fastcall RREC_CONDFMT(void);
	void __fastcall RREC_HLINK(void);
	System::UnicodeString __fastcall CheckFmlaStrVal(System::UnicodeString AVal);
	void __fastcall Clear(void);
	void __fastcall ClearSharedFmla(void);
	void __fastcall ReadFormulaVal(int Col, int Row, int FormatIndex, double Value, System::Sysutils::PByteArray Formula, int Len, int DataSz);
	void __fastcall FixupSharedFormula(int LeftCol, int TopRow, int ACol, int ARow, bool FirstFormula);
	System::Word __fastcall SSTReadCONTINUE(void);
	System::Sysutils::PByteArray __fastcall SSTReadString(System::Word &RecSize);
	void __fastcall ReadSST(System::Word ARecSize);
	System::UnicodeString __fastcall GetNAMEString(System::Sysutils::PByteArray &P, int Len);
	void __fastcall ReadExcel40(void);
	void __fastcall CacheMSODrawing(void);
	void __fastcall SkipChart(void);
	void __fastcall DoDirectRead(const int ACol, const int ARow, double AValue)/* overload */;
	void __fastcall DoDirectRead(const int ACol, const int ARow, bool AValue)/* overload */;
	void __fastcall DoDirectRead(const int ACol, const int ARow, Xc12utils5::TXc12CellError AValue)/* overload */;
	void __fastcall DoDirectRead(const int ACol, const int ARow, System::UnicodeString AValue)/* overload */;
	
public:
	__fastcall TXLSReadII(Biff5::TBIFF5* AXLS);
	__fastcall virtual ~TXLSReadII(void);
	void __fastcall LoadFromStream(System::Classes::TStream* Stream);
	__property bool SkipMSO = {read=FSkipMSO, write=FSkipMSO, nodefault};
};

#pragma pack(pop)

struct TRecCellXF;
typedef TRecCellXF *PRecCellXF;

#pragma pack(push,1)
struct DECLSPEC_DRECORD TRecCellXF
{
public:
	System::Word Row;
	System::Word Col;
	System::Word FormatIndex;
};
#pragma pack(pop)


struct DECLSPEC_DRECORD TXFData
{
public:
	int XF;
	int Font;
	int NumFmt;
};


struct TDataRSTRING;
typedef TDataRSTRING *PDataRSTRING;

#pragma pack(push,1)
struct DECLSPEC_DRECORD TDataRSTRING
{
private:
	struct DECLSPEC_DRECORD _TDataRSTRING__1
	{
	};
	
	
	
public:
	System::Word Row;
	System::Word Col;
	System::Word FormatIndex;
	System::Word Len;
	System::Byte Options;
	_TDataRSTRING__1 Data;
};
#pragma pack(pop)


class DELPHICLASS TXLSReadClipboard;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TXLSReadClipboard : public TXLSReadII
{
	typedef TXLSReadII inherited;
	
private:
	typedef System::DynamicArray<int> _TXLSReadClipboard__1;
	
	typedef System::DynamicArray<TXFData> _TXLSReadClipboard__2;
	
	
private:
	void __fastcall IncXF(int Index);
	void __fastcall DoRSTRING(void);
	void __fastcall SaveRSTRING(void);
	void __fastcall AdjustCell(void);
	
protected:
	Xc12utils5::TExcelVersion FVersion;
	_TXLSReadClipboard__1 FFONTUsage;
	_TXLSReadClipboard__1 FFORMATUsage;
	_TXLSReadClipboard__2 FXFUsage;
	int FXFCount;
	int FFONTCount;
	int FFORMATMax;
	Biff_recsii5::TRecCellAreaI FSrcArea;
	int FDestSheet;
	int FDestCol;
	int FDestRow;
	bool __fastcall ReadPass1(void);
	bool __fastcall ReadPass2(void);
	
public:
	bool __fastcall Read(System::Classes::TStream* AStream, const int ADestSheet, const int ADestCol, const int ADestRow);
public:
	/* TXLSReadII.Create */ inline __fastcall TXLSReadClipboard(Biff5::TBIFF5* AXLS) : TXLSReadII(AXLS) { }
	/* TXLSReadII.Destroy */ inline __fastcall virtual ~TXLSReadClipboard(void) { }
	
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
}	/* namespace Biff_readii5 */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_BIFF_READII5)
using namespace Biff_readii5;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Biff_readii5HPP
