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

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

#ifndef Biff_names5HPP
#define Biff_names5HPP

#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 <BIFF_Utils5.hpp>	// Pascal unit
#include <BIFF_RecsII5.hpp>	// Pascal unit
#include <BIFF_Stream5.hpp>	// Pascal unit
#include <BIFF_EncodeFormulaII5.hpp>	// Pascal unit
#include <BIFF_DecodeFormula5.hpp>	// Pascal unit
#include <BIFF_ExcelFuncII5.hpp>	// Pascal unit
#include <Xc12Utils5.hpp>	// Pascal unit
#include <XLSUtils5.hpp>	// Pascal unit
#include <XLSFormulaTypes5.hpp>	// Pascal unit

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

namespace Biff_names5
{
//-- type declarations -------------------------------------------------------
enum DECLSPEC_DENUM TX97BuiltInName : unsigned char { xbnConsolidateArea, xbnAutoOpen, xbnAutoClose, xbnExtract, xbnDatabase, xbnCriteria, xbnPrintArea, xbnPrintTitles, xbnRecorder, xbnDataForm, xbnAutoActivate, xbnAutoDeactivate, xbnSheetTitle, xbnFilterDatabase, xbnNone };

struct TCRNValue;
typedef TCRNValue *PCRNValue;

struct DECLSPEC_DRECORD TCRNValue
{
public:
	System::Byte FirstCol;
	System::Byte LastCol;
	System::Word Row;
	System::Sysutils::TByteArray *Value;
	System::Word Size;
};


class DELPHICLASS TCRNList;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TCRNList : public System::Classes::TList
{
	typedef System::Classes::TList inherited;
	
public:
	PCRNValue operator[](int Index) { return Items[Index]; }
	
private:
	PCRNValue __fastcall GetItems(int Index);
	
public:
	__fastcall virtual ~TCRNList(void);
	HIDESBASE void __fastcall Add(Biff_recsii5::PRecCRN Value, System::Word Size);
	void __fastcall WriteRecords(Biff_stream5::TXLSStream* Stream, int Index);
	__property PCRNValue Items[int Index] = {read=GetItems/*, default*/};
public:
	/* TObject.Create */ inline __fastcall TCRNList(void) : System::Classes::TList() { }
	
};

#pragma pack(pop)

class DELPHICLASS TSupBookSheet;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TSupBookSheet : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	System::RawByteString FName;
	TCRNList* FCRN;
	bool FNegXCT;
	System::UnicodeString __fastcall GetName(void);
	void __fastcall SetName(const System::UnicodeString Value);
	
protected:
	__property System::RawByteString RawName = {read=FName};
	
public:
	__fastcall TSupBookSheet(System::Sysutils::PByteArray Name, int NameLen)/* overload */;
	__fastcall TSupBookSheet(System::UnicodeString Sheetname)/* overload */;
	__fastcall virtual ~TSupBookSheet(void);
	void __fastcall SetCRN(Biff_recsii5::PRecCRN P, System::Word Size);
	Biff_utils5::TFormulaValue __fastcall GetCachedValue(int Col, int Row);
	__property System::UnicodeString Name = {read=GetName, write=SetName};
	__property TCRNList* CRN = {read=FCRN};
	__property bool NegXCT = {read=FNegXCT, write=FNegXCT, nodefault};
};

#pragma pack(pop)

enum DECLSPEC_DENUM TExtNameType : unsigned char { entName, entDDE, entOLE };

class DELPHICLASS TExtName;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TExtName : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	System::Word FOptions;
	System::RawByteString FName;
	System::UnicodeString __fastcall GetName(void);
	
public:
	__fastcall TExtName(Biff_recsii5::PRecEXTERNNAME8 &P);
	virtual void __fastcall WriteRecords(Biff_stream5::TXLSStream* Stream) = 0 ;
	virtual TExtNameType __fastcall NameType(void) = 0 ;
	__property System::UnicodeString Name = {read=GetName};
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TExtName(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TExtNameName;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TExtNameName : public TExtName
{
	typedef TExtName inherited;
	
private:
	Biff_utils5::TDynByteArray FNameDef;
	
public:
	__fastcall TExtNameName(Biff_recsii5::PRecEXTERNNAME8 P);
	__fastcall virtual ~TExtNameName(void);
	virtual void __fastcall WriteRecords(Biff_stream5::TXLSStream* Stream);
	virtual TExtNameType __fastcall NameType(void);
	__property Biff_utils5::TDynByteArray NameDef = {read=FNameDef};
};

#pragma pack(pop)

class DELPHICLASS TExtNameDDE;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TExtNameDDE : public TExtName
{
	typedef TExtName inherited;
	
private:
	System::Sysutils::TByteArray *FOPER;
	
public:
	__fastcall TExtNameDDE(Biff_recsii5::PRecEXTERNNAME8 P);
	__fastcall virtual ~TExtNameDDE(void);
	virtual void __fastcall WriteRecords(Biff_stream5::TXLSStream* Stream);
	virtual TExtNameType __fastcall NameType(void);
};

#pragma pack(pop)

class DELPHICLASS TExtNameOLE;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TExtNameOLE : public TExtName
{
	typedef TExtName inherited;
	
private:
	unsigned FOLE2Id;
	
public:
	__fastcall TExtNameOLE(Biff_recsii5::PRecEXTERNNAME8 P);
	virtual TExtNameType __fastcall NameType(void);
	virtual void __fastcall WriteRecords(Biff_stream5::TXLSStream* Stream);
	__property unsigned OLE2Id = {read=FOLE2Id, nodefault};
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TExtNameOLE(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TExtNameList;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TExtNameList : public System::Classes::TList
{
	typedef System::Classes::TList inherited;
	
public:
	TExtName* operator[](int Index) { return Items[Index]; }
	
private:
	TExtName* __fastcall GetItems(int Index);
	
public:
	__fastcall virtual ~TExtNameList(void);
	HIDESBASE void __fastcall Add(Biff_recsii5::PRecEXTERNNAME8 P);
	__property TExtName* Items[int Index] = {read=GetItems/*, default*/};
public:
	/* TObject.Create */ inline __fastcall TExtNameList(void) : System::Classes::TList() { }
	
};

#pragma pack(pop)

class DELPHICLASS TSupBook;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TSupBook : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	typedef System::DynamicArray<TSupBookSheet*> _TSupBook__1;
	
	
public:
	TSupBookSheet* operator[](int Index) { return Sheets[Index]; }
	
private:
	int FTabCount;
	System::Word FEncoded;
	System::RawByteString FFilename;
	_TSupBook__1 FSheets;
	TExtNameList* FExtNames;
	TSupBookSheet* __fastcall GetSheets(int Index);
	TExtName* __fastcall GetExtNames(int Index);
	System::UnicodeString __fastcall GetFilename(void);
	System::UnicodeString __fastcall GetCleanFilename(void);
	
public:
	__fastcall TSupBook(Biff_recsii5::PRecSUPBOOK P);
	__fastcall TSupBook(int Tabs, System::Word Code);
	__fastcall virtual ~TSupBook(void);
	void __fastcall WriteRecords(Biff_stream5::TXLSStream* Stream);
	int __fastcall Count(void);
	void __fastcall SetEXTERNNAME(Biff_recsii5::PRecEXTERNNAME8 P);
	void __fastcall AddSheet(System::UnicodeString Sheetname);
	__property System::UnicodeString Filename = {read=GetFilename};
	__property System::UnicodeString CleanFilename = {read=GetCleanFilename};
	__property TSupBookSheet* Sheets[int Index] = {read=GetSheets/*, default*/};
	__property TExtName* ExtNames[int Index] = {read=GetExtNames};
};

#pragma pack(pop)

class DELPHICLASS TSupBookList;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TSupBookList : public System::Classes::TList
{
	typedef System::Classes::TList inherited;
	
public:
	TSupBook* operator[](int Index) { return Items[Index]; }
	
private:
	TSupBook* __fastcall GetItems(int Index);
	
public:
	__fastcall virtual ~TSupBookList(void);
	virtual void __fastcall Clear(void);
	HIDESBASE void __fastcall Add(Biff_recsii5::PRecSUPBOOK P)/* overload */;
	HIDESBASE void __fastcall Add(System::UnicodeString Path, System::UnicodeString Filename, System::UnicodeString SheetName)/* overload */;
	int __fastcall AddEncodec(int Tabs, System::Word Code);
	__property TSupBook* Items[int Index] = {read=GetItems/*, default*/};
public:
	/* TObject.Create */ inline __fastcall TSupBookList(void) : System::Classes::TList() { }
	
};

#pragma pack(pop)

struct TExtSheetData;
typedef TExtSheetData *PExtSheetData;

struct DECLSPEC_DRECORD TExtSheetData
{
public:
	int SupBookIndex;
	System::Word FirstTab;
	System::Word LastTab;
};


class DELPHICLASS TExtSheetList;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TExtSheetList : public System::Classes::TList
{
	typedef System::Classes::TList inherited;
	
public:
	PExtSheetData operator[](int Index) { return Items[Index]; }
	
private:
	PExtSheetData __fastcall GetItems(int Index);
	
public:
	__fastcall virtual ~TExtSheetList(void);
	virtual void __fastcall Clear(void);
	HIDESBASE void __fastcall Add(int Index, int First, int Last);
	void __fastcall WriteRecords(Biff_stream5::TXLSStream* Stream);
	__property PExtSheetData Items[int Index] = {read=GetItems/*, default*/};
public:
	/* TObject.Create */ inline __fastcall TExtSheetList(void) : System::Classes::TList() { }
	
};

#pragma pack(pop)

class DELPHICLASS TExternalNames;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TExternalNames : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	TExtSheetList* FExtSheets;
	TSupBookList* FSupBooks;
	System::UnicodeString FFilePath;
	System::UnicodeString __fastcall GetAsString(int SheetIndex, int NameIndex);
	
public:
	__fastcall TExternalNames(void);
	__fastcall virtual ~TExternalNames(void);
	void __fastcall Clear(void);
	void __fastcall UpdateIntSupbooks(int TabCount);
	int __fastcall IsSelf(int ExtSheetIndex);
	int __fastcall AddSelf(int SheetIndex, int TabCount);
	int __fastcall FindIndex(int SheetIndex);
	bool __fastcall AddRef(System::UnicodeString Path, System::UnicodeString Filename, System::UnicodeString SheetName, int &Index, int &NameIndex);
	bool __fastcall RefIndexByName(System::UnicodeString Path, System::UnicodeString Filename, System::UnicodeString Name, int &Index, int &NameIndex);
	bool __fastcall NameIndexByName(System::UnicodeString Path, System::UnicodeString Filename, System::UnicodeString Name, int &Index, int &NameIndex);
	Biff_utils5::TFormulaValue __fastcall GetNameValue(int SheetIndex, int NameIndex);
	Biff_utils5::TFormulaValue __fastcall GetValue(int Index, int Col, int Row);
	void __fastcall DeleteSheet(int SheetIndex);
	void __fastcall InsertSheet(int SheetIndex);
	bool __fastcall Get3dSheets(const int AIndex, /* out */ int &ASheet1, /* out */ int &ASheet2);
	bool __fastcall HasSUPBOOK(void);
	bool __fastcall HasEXTERNSHEET(void);
	void __fastcall SetSUPBOOK(Biff_recsii5::PRecSUPBOOK P);
	void __fastcall SetEXTERNSHEET(System::Sysutils::PByteArray P);
	void __fastcall SetCRN(int SheetIndex, Biff_recsii5::PRecCRN P, System::Word Size);
	void __fastcall SetEXTERNNAME(Biff_recsii5::PRecEXTERNNAME8 P);
	void __fastcall WriteRecords(Biff_stream5::TXLSStream* Stream);
	__property System::UnicodeString AsString[int SheetIndex][int NameIndex] = {read=GetAsString};
	__property System::UnicodeString FilePath = {read=FFilePath, write=FFilePath};
};

#pragma pack(pop)

enum DECLSPEC_DENUM TNameOption : unsigned char { noBuiltIn, noHidden, noFunction, noVBProcedure, noMacro, noXLM, noPublishToServer, noWorkbookParameter, noComplex, noBig };

typedef System::Set<TNameOption, TNameOption::noBuiltIn, TNameOption::noBig> TNameOptions;

class DELPHICLASS TInternalName;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TInternalName : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	System::Contnrs::TObjectList* FParent;
	System::Byte FKeyShortcut;
	System::Word FUnused;
	System::Word FSheetIndex;
	System::RawByteString FName;
	Biff_utils5::TDynByteArray FNameDef;
	System::UnicodeString FNameDefStr;
	System::UnicodeString FCustomMenu;
	System::UnicodeString FDescription;
	System::UnicodeString FHelpTopic;
	System::UnicodeString FStatusBar;
	int FFormulaSize;
	bool FLoadedFormFile;
	System::UnicodeString FComment;
	TNameOptions FNameOptions;
	int FFuncGroupId;
	System::UnicodeString FShortcutKey;
	bool __fastcall GetIsVBProcedure(void);
	void __fastcall SetIsVBProcedure(const bool Value);
	void __fastcall IntSetDefinition(const System::UnicodeString Value);
	void __fastcall SetDefinition(const System::UnicodeString Value);
	System::UnicodeString __fastcall GetDefinition(void);
	System::UnicodeString __fastcall GetName(void);
	void __fastcall SetName(const System::UnicodeString Value);
	TX97BuiltInName __fastcall GetBuiltInName(void);
	void __fastcall SetBuiltInName(const TX97BuiltInName Value);
	int __fastcall GetCol1(void);
	int __fastcall GetCol2(void);
	int __fastcall GetRow1(void);
	int __fastcall GetRow2(void);
	int __fastcall GetExtSheet(void);
	void __fastcall SetRow1(const int Value);
	void __fastcall SetRow2(const int Value);
	void __fastcall SetCol1(const int Value);
	void __fastcall SetCol2(const int Value);
	
public:
	__fastcall TInternalName(System::Contnrs::TObjectList* Parent);
	__fastcall virtual ~TInternalName(void);
	void __fastcall Set_NAME(Biff_recsii5::PRecNAME P);
	void __fastcall WriteRecords(Biff_stream5::TXLSStream* Stream);
	bool __fastcall NameIsCell(void);
	bool __fastcall NameIsArea(bool ListAccepted);
	void __fastcall SetError(void);
	__property Biff_utils5::TDynByteArray NameDef = {read=FNameDef, write=FNameDef};
	__property int NameDefLen = {read=FFormulaSize, nodefault};
	__property System::Byte KeyShortcut = {read=FKeyShortcut, write=FKeyShortcut, nodefault};
	__property System::Word SheetIndex = {read=FSheetIndex, write=FSheetIndex, nodefault};
	__property System::RawByteString NameName = {read=FName, write=FName};
	__property TNameOptions NameOptions = {read=FNameOptions, write=FNameOptions, nodefault};
	__property System::UnicodeString CustomMenu = {read=FCustomMenu, write=FCustomMenu};
	__property System::UnicodeString Description = {read=FDescription, write=FDescription};
	__property System::UnicodeString HelpTopic = {read=FHelpTopic, write=FHelpTopic};
	__property System::UnicodeString StatusBar = {read=FStatusBar, write=FStatusBar};
	__property System::UnicodeString Comment = {read=FComment, write=FComment};
	__property System::UnicodeString NameDefStr = {read=FNameDefStr, write=FNameDefStr};
	__property int FuncGroupId = {read=FFuncGroupId, write=FFuncGroupId, nodefault};
	__property System::UnicodeString ShortcutKey = {read=FShortcutKey, write=FShortcutKey};
	__property System::UnicodeString Name = {read=GetName, write=SetName, stored=false};
	__property System::UnicodeString Definition = {read=GetDefinition, write=SetDefinition, stored=false};
	__property TX97BuiltInName BuiltInName = {read=GetBuiltInName, write=SetBuiltInName, stored=false, nodefault};
	__property int Col1 = {read=GetCol1, write=SetCol1, nodefault};
	__property int Col2 = {read=GetCol2, write=SetCol2, nodefault};
	__property int Row1 = {read=GetRow1, write=SetRow1, nodefault};
	__property int Row2 = {read=GetRow2, write=SetRow2, nodefault};
	__property int ExtSheet = {read=GetExtSheet, nodefault};
	__property bool IsVBProcedure = {read=GetIsVBProcedure, write=SetIsVBProcedure, nodefault};
};

#pragma pack(pop)

class DELPHICLASS TInternalNames;
class PASCALIMPLEMENTATION TInternalNames : public System::Contnrs::TObjectList
{
	typedef System::Contnrs::TObjectList inherited;
	
public:
	TInternalName* operator[](int Index) { return Items[Index]; }
	
private:
	Biff_encodeformulaii5::TEncodeFormula* FEncoder;
	TInternalName* __fastcall GetItems(int Index);
	
protected:
	System::Classes::TPersistent* FOwner;
	Biff_decodeformula5::TGetNameEvent FGetNameMethod;
	Xlsutils5::TIntegerEvent FNameDeletedEvent;
	bool FIsUpdating;
	System::UnicodeString __fastcall FindUniqueName(void);
	void __fastcall IntDeleteBuiltIn(TX97BuiltInName BuiltInName, int SheetIndex, TInternalName* ExcludeItem);
	
public:
	__fastcall TInternalNames(System::Classes::TPersistent* AOwner, Biff_decodeformula5::TGetNameEvent GetNameMethod, Biff_encodeformulaii5::TEncodeFormula* Encoder);
	__fastcall virtual ~TInternalNames(void);
	HIDESBASE TInternalName* __fastcall Add(void)/* overload */;
	HIDESBASE TInternalName* __fastcall Add(System::UnicodeString AName, System::UnicodeString ADefinition)/* overload */;
	HIDESBASE void __fastcall Delete(int Index);
	int __fastcall FindName(System::UnicodeString AName);
	TInternalName* __fastcall FindBuiltInName(TX97BuiltInName BuiltInName, int SheetIndex);
	TInternalName* __fastcall AddBuiltInName(TX97BuiltInName ABuiltInName, bool AUnique, bool AHidden, System::UnicodeString ASheetName, int ASheetIndex, int C1, int R1, int C2, int R2);
	void __fastcall DeleteBuiltInName(TX97BuiltInName BuiltInName, int SheetIndex);
	void __fastcall SetNAME(Biff_recsii5::PRecNAME P);
	void __fastcall WriteRecords(Biff_stream5::TXLSStream* Stream);
	void __fastcall BeginUpdate(void);
	void __fastcall EndUpdate(void);
	__property TInternalName* Items[int Index] = {read=GetItems/*, default*/};
	__property Xlsutils5::TIntegerEvent OnNameDeleted = {read=FNameDeletedEvent, write=FNameDeletedEvent};
};


//-- var, const, procedure ---------------------------------------------------
static const System::Int8 CRN_NUM = System::Int8(0x1);
static const System::Int8 CRN_STR = System::Int8(0x2);
static const System::Int8 CRN_BOOL = System::Int8(0x4);
static const System::Int8 CRN_ERR = System::Int8(0x10);
}	/* namespace Biff_names5 */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_BIFF_NAMES5)
using namespace Biff_names5;
#endif
#pragma pack(pop)
#pragma option pop

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