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

// (DO NOT EDIT: machine generated header) 'FMX.UXlsRangeRecords.pas' rev: 26.00 (Windows)

#ifndef Fmx_UxlsrangerecordsHPP
#define Fmx_UxlsrangerecordsHPP

#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 <FMX.UXlsBaseRecords.hpp>	// Pascal unit
#include <FMX.UXlsBaseRecordLists.hpp>	// Pascal unit
#include <FMX.UXlsOtherRecords.hpp>	// Pascal unit
#include <FMX.XlsMessages.hpp>	// Pascal unit
#include <System.Classes.hpp>	// Pascal unit
#include <System.SysUtils.hpp>	// Pascal unit
#include <FMX.UFlxMessages.hpp>	// Pascal unit
#include <System.Math.hpp>	// Pascal unit
#include <FMX.UOle2Impl.hpp>	// Pascal unit

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

namespace Fmx
{
namespace Uxlsrangerecords
{
//-- type declarations -------------------------------------------------------
#pragma pack(push,1)
struct DECLSPEC_DRECORD TExcelRange
{
public:
	System::Word R1;
	System::Word R2;
	System::Word C1;
	System::Word C2;
};
#pragma pack(pop)


typedef TExcelRange *PExcelRange;

class DELPHICLASS TRangeValuesList;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRangeValuesList : public System::Classes::TList
{
	typedef System::Classes::TList inherited;
	
private:
	System::Word FOtherDataLen;
	int MaxRangesPerRecord;
	void __fastcall CopyIntersectRange(const PExcelRange R, const PExcelRange Rx, const int NewFirstRow, const int NewLastRow, const int DestRow, const int aCount, System::Word &MinR1, System::Word &MaxR2);
	int __fastcall NextInRange(const Fmx::Uflxmessages::TXlsCellRange &Range, const int k);
	
protected:
	virtual void __fastcall Notify(void * Ptr, System::Classes::TListNotification Action);
	
public:
	__fastcall TRangeValuesList(const int aMaxRangesPerRecord, const System::Word aOtherDataLen);
	void __fastcall Load(Fmx::Uxlsbaserecords::TBaseRecord* const aRecord, const int aPos);
	void __fastcall SaveToStreamR(Fmx::Uole2impl::TOle2File* const DataStream, const int Line);
	void __fastcall SaveRangeToStreamR(Fmx::Uole2impl::TOle2File* const DataStream, const int Line, const int aCount, const Fmx::Uflxmessages::TXlsCellRange &Range);
	__int64 __fastcall TotalSizeR(const int aCount);
	int __fastcall RepeatCountR(const int aCount);
	int __fastcall RecordSizeR(const int Line, const int aCount);
	int __fastcall CountRangeRecords(const Fmx::Uflxmessages::TXlsCellRange &Range);
	void __fastcall CopyFrom(TRangeValuesList* const RVL);
	void __fastcall ArrangeInsertRowsAndCols(const int aRowPos, const int aRowCount, const int aColPos, const int aColCount);
	void __fastcall CopyRowsInclusive(const int FirstRow, const int LastRow, const int DestRow, const int aCount, System::Word &MinR1, System::Word &MaxR2, const bool UseCols);
	void __fastcall CopyRowsExclusive(const int FirstRow, const int LastRow, const int DestRow, const int aCount, const bool UseCols);
	void __fastcall DeleteRows(const int aRow, const int aCount, const bool Allow1Cell, const bool UseCols);
	void __fastcall PreAddNewRange(int &R1, int &C1, int &R2, int &C2);
	void __fastcall AddNewRange(const int FirstRow, const int FirstCol, const int LastRow, const int LastCol);
public:
	/* TList.Destroy */ inline __fastcall virtual ~TRangeValuesList(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TRangeEntry;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRangeEntry : public System::TObject
{
	typedef System::TObject inherited;
	
protected:
	TRangeValuesList* RangeValuesList;
	virtual TRangeEntry* __fastcall DoCopyTo(void);
	
public:
	__fastcall virtual TRangeEntry(void);
	__fastcall virtual ~TRangeEntry(void);
	TRangeEntry* __fastcall CopyTo(void);
	virtual void __fastcall LoadFromStream(Fmx::Uole2impl::TOle2File* const DataStream, Fmx::Xlsmessages::TRecordHeader &RecordHeader, Fmx::Uxlsotherrecords::TRangeRecord* const First) = 0 ;
	virtual void __fastcall SaveToStream(Fmx::Uole2impl::TOle2File* const DataStream) = 0 ;
	virtual void __fastcall SaveRangeToStream(Fmx::Uole2impl::TOle2File* const DataStream, const Fmx::Uflxmessages::TXlsCellRange &CellRange) = 0 ;
	virtual __int64 __fastcall TotalSize(void) = 0 ;
	virtual __int64 __fastcall TotalRangeSize(const Fmx::Uflxmessages::TXlsCellRange &CellRange) = 0 ;
	virtual void __fastcall ArrangeInsertRowsAndCols(const int aRowPos, const int aRowCount, const int aColPos, const int aColCount, const Fmx::Xlsmessages::TSheetInfo &SheetInfo);
	virtual void __fastcall InsertAndCopyRowsOrCols(const int FirstRow, const int LastRow, const int DestRow, const int aCount, const Fmx::Xlsmessages::TSheetInfo &SheetInfo, const bool UseCols);
	virtual void __fastcall DeleteRowsOrCols(const System::Word aRow, const System::Word aCount, const Fmx::Xlsmessages::TSheetInfo &SheetInfo, const bool UseCols);
};

#pragma pack(pop)

class DELPHICLASS TMergedCells;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TMergedCells : public TRangeEntry
{
	typedef TRangeEntry inherited;
	
public:
	__fastcall virtual TMergedCells(void);
	void __fastcall Clear(void);
	virtual void __fastcall LoadFromStream(Fmx::Uole2impl::TOle2File* const DataStream, Fmx::Xlsmessages::TRecordHeader &RecordHeader, Fmx::Uxlsotherrecords::TRangeRecord* const First);
	virtual void __fastcall SaveToStream(Fmx::Uole2impl::TOle2File* const DataStream);
	virtual void __fastcall SaveRangeToStream(Fmx::Uole2impl::TOle2File* const DataStream, const Fmx::Uflxmessages::TXlsCellRange &CellRange);
	virtual __int64 __fastcall TotalSize(void);
	virtual __int64 __fastcall TotalRangeSize(const Fmx::Uflxmessages::TXlsCellRange &CellRange);
	virtual void __fastcall InsertAndCopyRowsOrCols(const int FirstRow, const int LastRow, const int DestRow, const int aCount, const Fmx::Xlsmessages::TSheetInfo &SheetInfo, const bool UseCols);
	virtual void __fastcall DeleteRowsOrCols(const System::Word aRow, const System::Word aCount, const Fmx::Xlsmessages::TSheetInfo &SheetInfo, const bool UseCols);
	bool __fastcall CheckCell(const int aRow, const int aCol, Fmx::Uflxmessages::TXlsCellRange &CellBounds);
	int __fastcall MergedCount(void);
	Fmx::Uflxmessages::TXlsCellRange __fastcall MergedCell(const int i);
	void __fastcall PreMerge(int &R1, int &C1, int &R2, int &C2);
	void __fastcall MergeCells(const int FirstRow, const int FirstCol, const int LastRow, const int LastCol);
	void __fastcall UnMergeCells(const int FirstRow, const int FirstCol, const int LastRow, const int LastCol);
public:
	/* TRangeEntry.Destroy */ inline __fastcall virtual ~TMergedCells(void) { }
	
};

#pragma pack(pop)

typedef System::TMetaClass* ClassOfTRangeEntry;

//-- var, const, procedure ---------------------------------------------------
}	/* namespace Uxlsrangerecords */
}	/* namespace Fmx */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMX_UXLSRANGERECORDS)
using namespace Fmx::Uxlsrangerecords;
#endif
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMX)
using namespace Fmx;
#endif
#pragma pack(pop)
#pragma option pop

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