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

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

#ifndef XlsreadrtfHPP
#define XlsreadrtfHPP

#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.Contnrs.hpp>	// Pascal unit
#include <System.StrUtils.hpp>	// Pascal unit
#include <System.IniFiles.hpp>	// Pascal unit
#include <System.Math.hpp>	// Pascal unit
#include <XLSUtils5.hpp>	// Pascal unit
#include <XLSAXWEditor.hpp>	// Pascal unit

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

namespace Xlsreadrtf
{
//-- type declarations -------------------------------------------------------
enum DECLSPEC_DENUM TRtfJust : unsigned char { justL, justR, justC, justF };

enum DECLSPEC_DENUM TRtfSBK : unsigned char { sbkNon, sbkCol, sbkEvn, sbkOdd, sbkPg };

enum DECLSPEC_DENUM TRtfPGN : unsigned char { pgDec, pgURom, pgLRom, pgULtr, pgLLtr };

enum DECLSPEC_DENUM TRtfULType : unsigned char { rultNone, rultW, rultDB, rultTH, rultD, rultThD, rultDash, rultThDash, rultLDash, rultThLDash, rultDashD, rultThDashD, rultDashDD, rultThDashDD, rultWave, rultHWave, rultUlDbWave };

enum DECLSPEC_DENUM TRtfIPROP : unsigned char { ipropNil, ipropBold, ipropItalic, ipropUnderline, ipropUnderlineNone, ipropUnderlineColor, ipropULType, ipropFontSize, ipropChBrdr, ipropChCbPat, ipropSub, ipropSuper, ipropStrikeTrough, ipropNoSuperSub, ipropFontColor, ipropLeftInd, ipropRightInd, ipropFirstInd, ipropJust, ipropTabPos, ipropTabC, ipropTabR, ipropTabDec, ipropTabLDot, ipropTabLHyph, ipropTabLULine, ipropTabLThick, ipropListLevel, ipropBorderStyle, ipropSpaceBefore, ipropSpaceAfter, ipropLineSpacing, ipropRTL, ipropParaColor, ipropBrdrt, ipropBrdrb, ipropBrdrl, ipropBrdrr, ipropBrdrbtw, ipropBrdrbar, ipropBox, ipropBrdrs, ipropBrdrw, ipropBrdrcf, ipropBrsp, ipropBrdrnil, ipropBrdrtbl, ipropCols, ipropPgnX, ipropPgnY, ipropSbk, ipropPgnFormat, 
	ipropXaPage, ipropYaPage, ipropXaLeft, ipropXaRight, ipropYaTop, ipropYaBottom, ipropPgnStart, ipropFacingp, ipropLandscape, ipropPar, ipropPard, ipropPlain, ipropSectd, ipropIntbl, ipropITap, ipropTrowD, ipropCell, ipropNestCell, ipropRow, ipropNestRow, ipropLastRow, ipropCellX, ipropTblBorderL, ipropTblBorderT, ipropTblBorderR, ipropTblBorderB, ipropTblBorderIV, ipropTblBorderIH, ipropCellBorderL, ipropCellBorderT, ipropCellBorderR, ipropCellBorderB, ipropRowHeight, ipropCellColor, ipropCellNoShading, ipropTblCellMargL, ipropTblCellMargT, ipropTblCellMargR, ipropTblCellMargB, ipropCellVAlign, ipropRed, ipropGreen, ipropBlue, ipropUnicode, ipropUnicodeGroup, ipropTab, ipropPageBreak, ipropLineBreak, ipropPicture, ipropPictWidth, ipropPictHeigth, 
	ipropPictGoalWidth, ipropPictGoalHeight, ipropPictScaleX, ipropPictScaleY, ipropPictCropT, ipropPictCropB, ipropPictCropL, ipropPictCropR, ipropBlipTag, ipropFont, ipropCharSet, ipropBkmkColFirst, ipropBkmkColLast, ipropLS, ipropParaStyle, ipropCharRunStyle, ipropTableStyle, ipropSectStyle, ipropDataField, ipropMax };

struct DECLSPEC_DRECORD TRtfSEP
{
public:
	int cCols;
	TRtfSBK SBK;
	int xaPgn;
	int yaPgn;
	TRtfPGN pgnFormat;
};


struct DECLSPEC_DRECORD TRtfDOP
{
public:
	int xaPage;
	int yaPage;
	int xaLeft;
	int yaTop;
	int xaRight;
	int yaBottom;
	int pgnStart;
	System::Byte fFacingp;
	System::Byte fLandscape;
};


enum DECLSPEC_DENUM TRtfRDS : unsigned char { rdsNorm, rdsSkip };

enum DECLSPEC_DENUM TRtfRIS : unsigned char { risNorm, risBin, risHex };

enum DECLSPEC_DENUM TRtfIPFN : unsigned char { ipfnBin, ipfnHex, ipfnSkipDest };

enum DECLSPEC_DENUM TRtfIDEST : unsigned char { idestNil, idestSkip, idestFontTbl, idestColorTbl, idestPict, idestShpPict, idestNonShpPict, idestBlipUid, idestNestTableProps, idestNoNestTables, idestField, idestFieldInstr, idestFieldResult, idestStylesheet, idestAnnotation, idestAnnStart, idestAnnEnd, idestAnnRef, idestAnnTime, idestAnnDate, idestAnnAuthor, idestAnnInitials, idestAnnParent, idestAnnIcon, idestGenerator, idestBullet };

enum DECLSPEC_DENUM TRtfKWD : unsigned char { kwdChar, kwdDest, kwdProp, kwdSpec };

class DELPHICLASS TRtfPAP;
class DELPHICLASS TRtfDestColorTable;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfPAP : public Xlsaxweditor::TAXWPAP
{
	typedef Xlsaxweditor::TAXWPAP inherited;
	
protected:
	bool FInTable;
	int FTblNesting;
	Xlsaxweditor::TAXWDocPropBorder* FCurrBorder;
	TRtfDestColorTable* FColorTable;
	
public:
	__fastcall TRtfPAP(Xlsaxweditor::TAXWPAP* APAP, TRtfDestColorTable* AColorTable);
	virtual void __fastcall Clear(void);
	HIDESBASE void __fastcall Assign(TRtfPAP* APAP)/* overload */;
	bool __fastcall ApplyKeyword(TRtfIPROP iprop, int val);
	Xlsaxweditor::TAXWDocPropBorder* __fastcall DoBorders(TRtfIPROP ABorderDest);
	__property bool InTable = {read=FInTable, write=FInTable, nodefault};
	__property int TblNesting = {read=FTblNesting, write=FTblNesting, nodefault};
public:
	/* TList.Destroy */ inline __fastcall virtual ~TRtfPAP(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TRtfCHP;
class DELPHICLASS TRtfDestFontTable;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfCHP : public Xlsaxweditor::TAXWCHP
{
	typedef Xlsaxweditor::TAXWCHP inherited;
	
protected:
	Xlsaxweditor::TAXWDocPropBorder* FCurrBorder;
	TRtfDestColorTable* FColorTable;
	TRtfDestFontTable* FFontTable;
	
public:
	__fastcall TRtfCHP(Xlsaxweditor::TAXWCHP* ACHP, TRtfDestColorTable* AColorTable, TRtfDestFontTable* AFontTable);
	__fastcall virtual ~TRtfCHP(void);
	virtual void __fastcall Clear(void);
	HIDESBASE void __fastcall Assign(TRtfCHP* ACHP)/* overload */;
	Xlsaxweditor::TAXWDocPropBorder* __fastcall AddCurrBorder(void);
	bool __fastcall ApplyKeyword(TRtfIPROP iprop, int val);
	__property Xlsaxweditor::TAXWDocPropBorder* CurrBorder = {read=FCurrBorder};
};

#pragma pack(pop)

class DELPHICLASS TRtfDestination;
class DELPHICLASS TAXWReadRTF;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfDestination : public System::TObject
{
	typedef System::TObject inherited;
	
protected:
	TRtfIDEST FType;
	TAXWReadRTF* FReader;
	TRtfDestination* FParentDest;
	int FGroupLevel;
	System::UnicodeString FText;
	
public:
	__fastcall TRtfDestination(TAXWReadRTF* AReader, TRtfIDEST AType)/* overload */;
	__fastcall TRtfDestination(TAXWReadRTF* AReader, TRtfIDEST AType, TRtfDestination* AParentDest)/* overload */;
	__fastcall virtual ~TRtfDestination(void);
	virtual bool __fastcall Persistent(void);
	virtual bool __fastcall HasDocText(void);
	virtual void __fastcall ChangeType(TRtfIDEST ANewType);
	virtual void __fastcall BeginDest(void);
	virtual void __fastcall EndDest(void);
	virtual void __fastcall ChildEndDest(TRtfDestination* AChild);
	virtual void __fastcall ParseChar(TRtfRIS &ARIS, char AChar);
	virtual void __fastcall BeginGroup(void);
	virtual void __fastcall EndGroup(void);
	virtual void __fastcall ApplyKeyword(TRtfIPROP iprop, int val);
	virtual void __fastcall EndComposedValue(void);
	__property TRtfIDEST Type_ = {read=FType, nodefault};
};

#pragma pack(pop)

class DELPHICLASS TRtfDestStream;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfDestStream : public TRtfDestination
{
	typedef TRtfDestination inherited;
	
protected:
	System::Byte FCurrByte;
	bool FCurrByteUpper;
	System::Classes::TMemoryStream* FStream;
	
public:
	__fastcall TRtfDestStream(TAXWReadRTF* AReader, TRtfIDEST AType, TRtfDestination* AParentDest)/* overload */;
	__fastcall TRtfDestStream(TAXWReadRTF* AReader, TRtfIDEST AType)/* overload */;
	__fastcall virtual ~TRtfDestStream(void);
	virtual void __fastcall ParseChar(TRtfRIS &ARIS, char AChar);
	virtual void __fastcall EndDest(void);
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfDestColorTable : public TRtfDestination
{
	typedef TRtfDestination inherited;
	
private:
	typedef System::DynamicArray<unsigned> _TRtfDestColorTable__1;
	
	
protected:
	_TRtfDestColorTable__1 FColorTable;
	System::Byte FR;
	System::Byte FG;
	System::Byte FB;
	
public:
	virtual bool __fastcall Persistent(void);
	virtual void __fastcall ApplyKeyword(TRtfIPROP iprop, int val);
	virtual void __fastcall EndComposedValue(void);
	unsigned __fastcall Color(int AClIndex, unsigned ADefault);
public:
	/* TRtfDestination.Create */ inline __fastcall TRtfDestColorTable(TAXWReadRTF* AReader, TRtfIDEST AType)/* overload */ : TRtfDestination(AReader, AType) { }
	/* TRtfDestination.Create */ inline __fastcall TRtfDestColorTable(TAXWReadRTF* AReader, TRtfIDEST AType, TRtfDestination* AParentDest)/* overload */ : TRtfDestination(AReader, AType, AParentDest) { }
	/* TRtfDestination.Destroy */ inline __fastcall virtual ~TRtfDestColorTable(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TRtfFont;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfFont : public System::TObject
{
	typedef System::TObject inherited;
	
protected:
	System::UnicodeString FName;
	int FId;
	
public:
	__property System::UnicodeString Name = {read=FName, write=FName};
	__property int Id = {read=FId, write=FId, nodefault};
public:
	/* TObject.Create */ inline __fastcall TRtfFont(void) : System::TObject() { }
	/* TObject.Destroy */ inline __fastcall virtual ~TRtfFont(void) { }
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfDestFontTable : public TRtfDestination
{
	typedef TRtfDestination inherited;
	
public:
	TRtfFont* operator[](int AId) { return Font[AId]; }
	
private:
	TRtfFont* __fastcall GetFont(int AId);
	
protected:
	System::Inifiles::THashedStringList* FFonts;
	TRtfFont* FDefaultFont;
	TRtfFont* FCurrFont;
	
public:
	__fastcall TRtfDestFontTable(TAXWReadRTF* AReader, TRtfIDEST AType);
	__fastcall virtual ~TRtfDestFontTable(void);
	virtual bool __fastcall Persistent(void);
	virtual void __fastcall ParseChar(TRtfRIS &ARIS, char AChar);
	virtual void __fastcall ApplyKeyword(TRtfIPROP iprop, int val);
	virtual void __fastcall EndComposedValue(void);
	virtual void __fastcall EndGroup(void);
	__property TRtfFont* Font[int AId] = {read=GetFont/*, default*/};
};

#pragma pack(pop)

class DELPHICLASS TRftDestListText;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRftDestListText : public TRtfDestination
{
	typedef TRtfDestination inherited;
	
public:
	__fastcall TRftDestListText(TAXWReadRTF* AReader, TRtfIDEST AType);
	virtual void __fastcall ApplyKeyword(TRtfIPROP iprop, int val);
	virtual void __fastcall EndGroup(void);
	virtual void __fastcall ParseChar(TRtfRIS &ARIS, char AChar);
public:
	/* TRtfDestination.Destroy */ inline __fastcall virtual ~TRftDestListText(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TRtfStyle;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfStyle : public System::TObject
{
	typedef System::TObject inherited;
	
protected:
	TAXWReadRTF* FReader;
	int FId;
	void __fastcall AddStyle(Xlsaxweditor::TAXWStyle* AStyle);
	
public:
	__fastcall TRtfStyle(TAXWReadRTF* AReader, int AId);
	virtual void __fastcall ApplyKeyword(TRtfIPROP iprop, int val) = 0 ;
	virtual void __fastcall Save(System::UnicodeString AName) = 0 ;
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TRtfStyle(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TRtfCharStyle;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfCharStyle : public TRtfStyle
{
	typedef TRtfStyle inherited;
	
protected:
	TRtfCHP* FCHPX;
	
public:
	__fastcall TRtfCharStyle(TAXWReadRTF* AReader, int AId);
	__fastcall virtual ~TRtfCharStyle(void);
	virtual void __fastcall ApplyKeyword(TRtfIPROP iprop, int val);
	virtual void __fastcall Save(System::UnicodeString AName);
};

#pragma pack(pop)

class DELPHICLASS TRtfParaStyle;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfParaStyle : public TRtfStyle
{
	typedef TRtfStyle inherited;
	
protected:
	TRtfCHP* FCHPX;
	TRtfPAP* FPAPX;
	
public:
	__fastcall TRtfParaStyle(TAXWReadRTF* AReader, int AId);
	__fastcall virtual ~TRtfParaStyle(void);
	virtual void __fastcall ApplyKeyword(TRtfIPROP iprop, int val);
	virtual void __fastcall Save(System::UnicodeString AName);
};

#pragma pack(pop)

class DELPHICLASS TRtfDestStylesheet;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfDestStylesheet : public TRtfDestination
{
	typedef TRtfDestination inherited;
	
protected:
	TRtfStyle* FCurrStyle;
	
public:
	virtual void __fastcall ApplyKeyword(TRtfIPROP iprop, int val);
	virtual void __fastcall BeginGroup(void);
	virtual void __fastcall EndGroup(void);
public:
	/* TRtfDestination.Create */ inline __fastcall TRtfDestStylesheet(TAXWReadRTF* AReader, TRtfIDEST AType)/* overload */ : TRtfDestination(AReader, AType) { }
	/* TRtfDestination.Create */ inline __fastcall TRtfDestStylesheet(TAXWReadRTF* AReader, TRtfIDEST AType, TRtfDestination* AParentDest)/* overload */ : TRtfDestination(AReader, AType, AParentDest) { }
	/* TRtfDestination.Destroy */ inline __fastcall virtual ~TRtfDestStylesheet(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TRtfTableStyle;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfTableStyle : public TRtfStyle
{
	typedef TRtfStyle inherited;
	
public:
	virtual void __fastcall ApplyKeyword(TRtfIPROP iprop, int val);
	virtual void __fastcall Save(System::UnicodeString AName);
public:
	/* TRtfStyle.Create */ inline __fastcall TRtfTableStyle(TAXWReadRTF* AReader, int AId) : TRtfStyle(AReader, AId) { }
	
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TRtfTableStyle(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TRtfSectStyle;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfSectStyle : public TRtfStyle
{
	typedef TRtfStyle inherited;
	
public:
	virtual void __fastcall ApplyKeyword(TRtfIPROP iprop, int val);
	virtual void __fastcall Save(System::UnicodeString AName);
public:
	/* TRtfStyle.Create */ inline __fastcall TRtfSectStyle(TAXWReadRTF* AReader, int AId) : TRtfStyle(AReader, AId) { }
	
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TRtfSectStyle(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TRtfDestField;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfDestField : public TRtfDestination
{
	typedef TRtfDestination inherited;
	
protected:
	bool FInstrDone;
	
public:
	virtual bool __fastcall HasDocText(void);
	virtual void __fastcall ChangeType(TRtfIDEST ANewType);
	virtual void __fastcall EndDest(void);
	virtual void __fastcall ParseChar(TRtfRIS &ARIS, char AChar);
	virtual void __fastcall ApplyKeyword(TRtfIPROP iprop, int val);
public:
	/* TRtfDestination.Create */ inline __fastcall TRtfDestField(TAXWReadRTF* AReader, TRtfIDEST AType)/* overload */ : TRtfDestination(AReader, AType) { }
	/* TRtfDestination.Create */ inline __fastcall TRtfDestField(TAXWReadRTF* AReader, TRtfIDEST AType, TRtfDestination* AParentDest)/* overload */ : TRtfDestination(AReader, AType, AParentDest) { }
	/* TRtfDestination.Destroy */ inline __fastcall virtual ~TRtfDestField(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TRtfDestComment;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfDestComment : public TRtfDestination
{
	typedef TRtfDestination inherited;
	
protected:
	System::Classes::TStrings* FComments;
	System::UnicodeString FRef;
	
public:
	__fastcall TRtfDestComment(TAXWReadRTF* AReader, TRtfIDEST AType, System::Classes::TStrings* AComments);
	virtual void __fastcall ApplyKeyword(TRtfIPROP iprop, int val);
	virtual void __fastcall EndDest(void);
	virtual void __fastcall ChildEndDest(TRtfDestination* AChild);
public:
	/* TRtfDestination.Destroy */ inline __fastcall virtual ~TRtfDestComment(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TRtfDestStringParam;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfDestStringParam : public TRtfDestination
{
	typedef TRtfDestination inherited;
	
public:
	virtual void __fastcall EndDest(void);
public:
	/* TRtfDestination.Create */ inline __fastcall TRtfDestStringParam(TAXWReadRTF* AReader, TRtfIDEST AType)/* overload */ : TRtfDestination(AReader, AType) { }
	/* TRtfDestination.Create */ inline __fastcall TRtfDestStringParam(TAXWReadRTF* AReader, TRtfIDEST AType, TRtfDestination* AParentDest)/* overload */ : TRtfDestination(AReader, AType, AParentDest) { }
	/* TRtfDestination.Destroy */ inline __fastcall virtual ~TRtfDestStringParam(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TRtfDestPict;
class PASCALIMPLEMENTATION TRtfDestPict : public TRtfDestStream
{
	typedef TRtfDestStream inherited;
	
protected:
	Xlsaxweditor::TAXWPictureType FPictType;
	int FExData;
	int FWidth;
	int FHeight;
	double FGoalWidth;
	double FGoalHeight;
	double FScaleX;
	double FScaleY;
	int FCropLeft;
	int FCropTop;
	int FCropRight;
	int FCropBottom;
	int FTag;
	
public:
	__fastcall TRtfDestPict(TAXWReadRTF* AReader, TRtfIDEST AType);
	__fastcall virtual ~TRtfDestPict(void);
	virtual void __fastcall EndGroup(void);
	virtual void __fastcall ApplyKeyword(TRtfIPROP iprop, int val);
	virtual void __fastcall EndDest(void);
	void __fastcall Clear(void);
	__property Xlsaxweditor::TAXWPictureType PictType = {read=FPictType, write=FPictType, nodefault};
	__property int ExData = {read=FExData, write=FExData, nodefault};
	__property int Width = {read=FWidth, write=FWidth, nodefault};
	__property int Height = {read=FHeight, write=FHeight, nodefault};
	__property double GoalWidth = {read=FGoalWidth, write=FGoalWidth};
	__property double GoalHeight = {read=FGoalHeight, write=FGoalHeight};
	__property double ScaleX = {read=FScaleX, write=FScaleX};
	__property double ScaleY = {read=FScaleY, write=FScaleY};
	__property int CropLeft = {read=FCropLeft, write=FCropLeft, nodefault};
	__property int CropTop = {read=FCropTop, write=FCropTop, nodefault};
	__property int CropRight = {read=FCropRight, write=FCropRight, nodefault};
	__property int CropBottom = {read=FCropBottom, write=FCropBottom, nodefault};
	__property int Tag = {read=FTag, write=FTag, nodefault};
};


class DELPHICLASS TRTFStackItem;
class DELPHICLASS TRTFStack;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRTFStackItem : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	TRTFStack* FOwner;
	TRtfRDS FRDS;
	TRtfRIS FRIS;
	TRtfCHP* FCHP;
	TRtfPAP* FPAP;
	TRtfSEP FSEP;
	TRtfDOP FDOP;
	TRtfDestination* FDest;
	
public:
	__fastcall TRTFStackItem(TRTFStack* AOwner, TRtfRDS RDS, TRtfRIS RIS, TRtfCHP* CHP, TRtfPAP* PAP, const TRtfSEP &SEP, const TRtfDOP &DOP);
	__fastcall virtual ~TRTFStackItem(void);
	__property TRtfRDS RDS = {read=FRDS, write=FRDS, nodefault};
	__property TRtfRIS RIS = {read=FRIS, write=FRIS, nodefault};
	__property TRtfCHP* CHP = {read=FCHP, write=FCHP};
	__property TRtfPAP* PAP = {read=FPAP, write=FPAP};
	__property TRtfSEP SEP = {read=FSEP, write=FSEP};
	__property TRtfDOP DOP = {read=FDOP, write=FDOP};
	__property TRtfDestination* Dest = {read=FDest, write=FDest};
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TRTFStack : public System::Contnrs::TObjectList
{
	typedef System::Contnrs::TObjectList inherited;
	
public:
	TRTFStackItem* operator[](int Index) { return Items[Index]; }
	
private:
	TAXWReadRTF* FOwner;
	TRtfDestination* FCurrDest;
	TRTFStackItem* __fastcall GetItems(int Index);
	TRtfDestination* __fastcall FindDest(void);
	
public:
	__fastcall TRTFStack(TAXWReadRTF* AOwner);
	void __fastcall Push(TRtfRDS RDS, TRtfRIS RIS, TRtfCHP* CHP, TRtfPAP* PAP, const TRtfSEP &SEP, const TRtfDOP &DOP);
	void __fastcall Pop(TRtfRDS &RDS, TRtfRIS &RIS, Xlsaxweditor::TAXWCHP* CHP, TRtfPAP* PAP, TRtfSEP &SEP, TRtfDOP &DOP, TRtfDestination* &ADest);
	void __fastcall SetTOSDest(TRtfDestination* ADest);
	TRTFStackItem* __fastcall Peek(void);
	TRTFStackItem* __fastcall PeekL2(void);
	TRtfIDEST __fastcall PeekDestTypeL2(void);
	TRtfDestination* __fastcall CurrDest(void);
	__property TRTFStackItem* Items[int Index] = {read=GetItems/*, default*/};
public:
	/* TList.Destroy */ inline __fastcall virtual ~TRTFStack(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TRtfTableStackItem;
class PASCALIMPLEMENTATION TRtfTableStackItem : public System::TObject
{
	typedef System::TObject inherited;
	
protected:
	Xlsaxweditor::TAXWTableCell* FCell;
	Xlsaxweditor::TAXWIntegerList* FCellX;
	Xlsaxweditor::TAXWIntegerList* FCellColor;
	Xlsaxweditor::TAXWDocPropBordersList* FBorders;
	double FRowHeight;
	
public:
	__fastcall TRtfTableStackItem(void);
	__fastcall virtual ~TRtfTableStackItem(void);
	void __fastcall Clear(void);
	void __fastcall Assign(TRtfTableStackItem* AItem);
	__property Xlsaxweditor::TAXWTableCell* Cell = {read=FCell, write=FCell};
	__property Xlsaxweditor::TAXWIntegerList* CellX = {read=FCellX};
	__property Xlsaxweditor::TAXWDocPropBordersList* Borders = {read=FBorders};
	__property Xlsaxweditor::TAXWIntegerList* CellColor = {read=FCellColor};
	__property double RowHeight = {read=FRowHeight, write=FRowHeight};
};


class DELPHICLASS TRtfTableStack;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRtfTableStack : public System::Contnrs::TObjectStack
{
	typedef System::Contnrs::TObjectStack inherited;
	
protected:
	TRtfDestColorTable* FColorTable;
	TRtfTableStackItem* FCurrItem;
	
public:
	__fastcall TRtfTableStack(TRtfDestColorTable* AColorTable);
	__fastcall virtual ~TRtfTableStack(void);
	void __fastcall Clear(void);
	void __fastcall ClearRow(void);
	void __fastcall ApplyOnRow(Xlsaxweditor::TAXWTableRow* ARow);
	HIDESBASE void __fastcall Push(Xlsaxweditor::TAXWTableCell* ACell);
	HIDESBASE void __fastcall Pop(Xlsaxweditor::TAXWTable* &ATable, Xlsaxweditor::TAXWTableRow* &ARow, Xlsaxweditor::TAXWTableCell* &ACell);
	HIDESBASE TRtfTableStackItem* __fastcall Peek(void);
	__property TRtfTableStackItem* CurrItem = {read=FCurrItem};
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TAXWReadRTF : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	TRTFStack* FStack;
	TRtfTableStack* FTableStack;
	int cGroup;
	bool fSkipDestIfUnk;
	int cbBin;
	int lParam;
	TRtfRDS FRDS;
	TRtfRIS FRIS;
	TRtfCHP* FCHP;
	TRtfPAP* FPAP;
	TRtfSEP FSEP;
	TRtfDOP FDOP;
	System::UnicodeString FText;
	System::UnicodeString FExText;
	Xlsaxweditor::TAXWCharRunType FCharRunType;
	TRtfDestFontTable* FFontTable;
	TRtfDestColorTable* FColorTable;
	System::Inifiles::THashedStringList* FSymbols;
	Xlsaxweditor::TAXWLogDocEditor* FDoc;
	Xlsaxweditor::TAXWTabStopLeader FTabLeader;
	Xlsaxweditor::TAXWTabStopAlignment FTabAlignment;
	System::Inifiles::THashedStringList* FBookmarks;
	System::Inifiles::THashedStringList* FComments;
	System::Inifiles::THashedStringList* FStyles;
	Xlsaxweditor::TAXWLogPara* FCurrPara;
	System::Classes::TMemoryStream* FCurrStream;
	Xlsaxweditor::TAXWDocPropBorder* FCurrBorder;
	Xlsaxweditor::TAXWTableCell* FCurrCell;
	Xlsaxweditor::TAXWTableRow* FCurrRow;
	Xlsaxweditor::TAXWTable* FCurrTable;
	Xlsaxweditor::TAXWHyperlink* FCurrHyperlink;
	bool FInheritPara;
	System::WideChar FLastUnicodeChar;
	System::UnicodeString FGenerator;
	int __fastcall ecRtfParse(System::Classes::TStream* fp);
	void __fastcall ecPushRtfState(void);
	int __fastcall ecPopRtfState(void);
	int __fastcall ecParseRtfKeyword(System::Classes::TStream* fp);
	int __fastcall ecParseChar(char ch);
	int __fastcall ecTranslateKeyword(System::AnsiString szKeyword, int param, bool fParam, System::Classes::TStream* fp);
	void __fastcall ecPrintChar(System::WideChar ch);
	int __fastcall ecEndGroupAction(void);
	int __fastcall ecApplyPropChange(TRtfIPROP IPROP, int val);
	int __fastcall ecChangeDest(TRtfIDEST IDEST, int Param);
	int __fastcall ecParseSpecialKeyword(TRtfIPFN IPFN);
	Xlsaxweditor::TAXWLogPara* __fastcall GetPara(void);
	void __fastcall AddText(void);
	void __fastcall AddTable(Xlsaxweditor::TAXWLogParas* AParas);
	void __fastcall CheckCell(void);
	void __fastcall CheckTable(void);
	
public:
	__fastcall TAXWReadRTF(Xlsaxweditor::TAXWLogDocEditor* AEditor);
	__fastcall virtual ~TAXWReadRTF(void);
	void __fastcall LoadFromFile(const System::UnicodeString Filename)/* overload */;
	void __fastcall LoadFromStream(System::Classes::TStream* Stream)/* overload */;
	__property System::UnicodeString Generator = {read=FGenerator};
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
static const System::Int8 ecOK = System::Int8(0x0);
static const System::Int8 ecStackUnderflow = System::Int8(0x1);
static const System::Int8 ecStackOverflow = System::Int8(0x2);
static const System::Int8 ecUnmatchedBrace = System::Int8(0x3);
static const System::Int8 ecInvalidHex = System::Int8(0x4);
static const System::Int8 ecBadTable = System::Int8(0x5);
static const System::Int8 ecAssertion = System::Int8(0x6);
static const System::Int8 ecEndOfFile = System::Int8(0x7);
}	/* namespace Xlsreadrtf */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_XLSREADRTF)
using namespace Xlsreadrtf;
#endif
#pragma pack(pop)
#pragma option pop

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