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

// (DO NOT EDIT: machine generated header) 'QImport3ODS.pas' rev: 34.00 (Windows)

#ifndef Qimport3odsHPP
#define Qimport3odsHPP

#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>
#include <SysInit.hpp>
#include <System.Classes.hpp>
#include <System.SysUtils.hpp>
#include <Winapi.msxml.hpp>
#include <System.IniFiles.hpp>
#include <QImport3StrTypes.hpp>
#include <QImport3XMLBased.hpp>
#include <QImport3Common.hpp>
#include <QImport3.hpp>
#include <QImport3WideStrUtils.hpp>
#include <QImport3BaseDocumentFile.hpp>
#include <QImport3XMLSax.hpp>

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

namespace Qimport3ods
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TODSCell;
class DELPHICLASS TODSCellList;
class DELPHICLASS TODSSpreadSheet;
class DELPHICLASS TODSSpreadSheetList;
class DELPHICLASS TODSWorkbook;
class DELPHICLASS TODSFile;
class DELPHICLASS TQImport3ODS;
//-- type declarations -------------------------------------------------------
class PASCALIMPLEMENTATION TODSCell : public Qimport3xmlbased::TCell
{
	typedef Qimport3xmlbased::TCell inherited;
	
public:
	/* TCell.Create */ inline __fastcall virtual TODSCell(System::Classes::TCollection* Collection) : Qimport3xmlbased::TCell(Collection) { }
	/* TCell.Destroy */ inline __fastcall virtual ~TODSCell() { }
	
};


class PASCALIMPLEMENTATION TODSCellList : public Qimport3xmlbased::TODCellList
{
	typedef Qimport3xmlbased::TODCellList inherited;
	
public:
	TODSCell* operator[](int Index) { return this->Items[Index]; }
	
private:
	HIDESBASE TODSCell* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, TODSCell* const Value);
	
public:
	HIDESBASE TODSCell* __fastcall Add();
	HIDESBASE TODSCell* __fastcall GetItemByCoords(int X, int Y);
	__property TODSCell* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
public:
	/* TOwnedCollection.Create */ inline __fastcall TODSCellList(System::Classes::TPersistent* AOwner, System::Classes::TCollectionItemClass ItemClass) : Qimport3xmlbased::TODCellList(AOwner, ItemClass) { }
	
public:
	/* TCollection.Destroy */ inline __fastcall virtual ~TODSCellList() { }
	
};


class PASCALIMPLEMENTATION TODSSpreadSheet : public Qimport3xmlbased::TXYSheet
{
	typedef Qimport3xmlbased::TXYSheet inherited;
	
private:
	HIDESBASE TODSCell* __fastcall GetCell(int Col, int Row);
	TODSCellList* __fastcall GetCells();
	HIDESBASE void __fastcall SetCell(int Col, int Row, TODSCell* const Value);
	
protected:
	virtual Qimport3xmlbased::TCellList* __fastcall CreateCells();
	
public:
	__property TODSCell* Cell[int Col][int Row] = {read=GetCell, write=SetCell};
	__property TODSCellList* Cells = {read=GetCells};
public:
	/* TXYSheet.Create */ inline __fastcall virtual TODSSpreadSheet(System::Classes::TCollection* Collection) : Qimport3xmlbased::TXYSheet(Collection) { }
	
public:
	/* TXMLSheet.Destroy */ inline __fastcall virtual ~TODSSpreadSheet() { }
	
};


class PASCALIMPLEMENTATION TODSSpreadSheetList : public Qimport3xmlbased::TXMLSheetList
{
	typedef Qimport3xmlbased::TXMLSheetList inherited;
	
public:
	TODSSpreadSheet* operator[](int Index) { return this->Items[Index]; }
	
private:
	HIDESBASE TODSSpreadSheet* __fastcall GetItems(int Index);
	HIDESBASE void __fastcall SetItems(int Index, TODSSpreadSheet* Value);
	
public:
	HIDESBASE TODSSpreadSheet* __fastcall Add();
	TODSSpreadSheet* __fastcall GetSheetByName(System::WideString Name);
	__property TODSSpreadSheet* Items[int Index] = {read=GetItems, write=SetItems/*, default*/};
public:
	/* TCollection.Create */ inline __fastcall TODSSpreadSheetList(System::Classes::TCollectionItemClass ItemClass) : Qimport3xmlbased::TXMLSheetList(ItemClass) { }
	/* TCollection.Destroy */ inline __fastcall virtual ~TODSSpreadSheetList() { }
	
};


class PASCALIMPLEMENTATION TODSWorkbook : public Qimport3xmlbased::TODContainer
{
	typedef Qimport3xmlbased::TODContainer inherited;
	
private:
	System::WideString FSpaceStr;
	bool FIsNotExpanding;
	void __fastcall ExpandRowsNCols(TODSSpreadSheet* ASheet, System::WideString ExpandValue, int NumbOfRepRows, int NumbOfRepColumns, bool IsSpanning);
	void __fastcall CompressCells();
	TODSSpreadSheetList* __fastcall GetSheets();
	
protected:
	virtual void __fastcall DoLoad();
	virtual System::WideString __fastcall GetErrorMsg();
	virtual Qimport3xmlbased::TXMLSheetList* __fastcall CreateSheets();
	virtual void __fastcall OnGetCellText(Qimport3xmlsax::TQIXMLStreamProcessor* Sender, const System::WideString aText, Qimport3xmlsax::TQIXMLTextType TextType);
	virtual void __fastcall OnLoadSheet(Qimport3xmlsax::TQIXMLStreamProcessor* Sender, const System::WideString AName, Qimport3xmlsax::TQIXMLNodeAction Action);
	virtual void __fastcall ParseSheet(Qimport3xmlsax::TQISAXParser* Sender, const System::WideString AName);
	
public:
	__fastcall virtual TODSWorkbook();
	__property bool IsNotExpanding = {read=FIsNotExpanding, write=FIsNotExpanding, nodefault};
	__property TODSSpreadSheetList* Sheets = {read=GetSheets};
public:
	/* TXMLDocContainer.Destroy */ inline __fastcall virtual ~TODSWorkbook() { }
	
};


class PASCALIMPLEMENTATION TODSFile : public Qimport3xmlbased::TZipDocumentFile
{
	typedef Qimport3xmlbased::TZipDocumentFile inherited;
	
private:
	TODSWorkbook* __fastcall GetWorkbook();
	
protected:
	virtual Qimport3xmlbased::TXMLDocContainer* __fastcall CreateContainer();
	
public:
	__property TODSWorkbook* Workbook = {read=GetWorkbook};
public:
	/* TZipDocumentFile.Create */ inline __fastcall virtual TODSFile() : Qimport3xmlbased::TZipDocumentFile() { }
	/* TZipDocumentFile.Destroy */ inline __fastcall virtual ~TODSFile() { }
	
};


class PASCALIMPLEMENTATION TQImport3ODS : public Qimport3xmlbased::TQImport3WorkbookBased
{
	typedef Qimport3xmlbased::TQImport3WorkbookBased inherited;
	
private:
	System::WideString FSheetName;
	bool FNotExpandMergedValue;
	HIDESBASE void __fastcall SetSheetName(const System::WideString Value);
	void __fastcall SetExpandFlag(const bool Value);
	
protected:
	virtual void __fastcall FillImportRow();
	virtual Qimport3::TQImportResult __fastcall ImportData();
	virtual void __fastcall DoLoadConfiguration(System::Inifiles::TIniFile* IniFile);
	virtual void __fastcall DoSaveConfiguration(System::Inifiles::TIniFile* IniFile);
	virtual Qimport3basedocumentfile::TBaseDocumentFile* __fastcall CreateDocFile();
	virtual void __fastcall LoadDocFile();
	
public:
	__fastcall virtual TQImport3ODS(System::Classes::TComponent* AOwner);
	
__published:
	__property FileName = {default=0};
	__property SkipFirstRows = {default=0};
	__property System::WideString SheetName = {read=FSheetName, write=SetSheetName};
	__property bool NotExpandMergedValue = {read=FNotExpandMergedValue, write=SetExpandFlag, default=1};
public:
	/* TQImport3.Destroy */ inline __fastcall virtual ~TQImport3ODS() { }
	
};


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

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