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

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

#ifndef Qimport3docxHPP
#define Qimport3docxHPP

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

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

namespace Qimport3docx
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TDocxCol;
class DELPHICLASS TDocxColList;
class DELPHICLASS TDocxSheet;
class DELPHICLASS TDocxSheetList;
class DELPHICLASS TDocxContainer;
class DELPHICLASS TDocxFile;
class DELPHICLASS TQImport3Docx;
//-- type declarations -------------------------------------------------------
#pragma pack(push,4)
class PASCALIMPLEMENTATION TDocxCol : public Qimport3xmlbased::TCell
{
	typedef Qimport3xmlbased::TCell inherited;
	
private:
	bool FDisplayAsIcon;
	
public:
	__property bool DisplayAsIcon = {read=FDisplayAsIcon, write=FDisplayAsIcon, default=0};
public:
	/* TCell.Create */ inline __fastcall virtual TDocxCol(System::Classes::TCollection* Collection) : Qimport3xmlbased::TCell(Collection) { }
	/* TCell.Destroy */ inline __fastcall virtual ~TDocxCol() { }
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TDocxColList : public Qimport3xmlbased::TCellList
{
	typedef Qimport3xmlbased::TCellList inherited;
	
public:
	TDocxCol* operator[](int Index) { return this->Items[Index]; }
	
private:
	HIDESBASE TDocxCol* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, TDocxCol* const Value);
	
public:
	HIDESBASE TDocxCol* __fastcall Add();
	__property TDocxCol* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
public:
	/* TOwnedCollection.Create */ inline __fastcall TDocxColList(System::Classes::TPersistent* AOwner, System::Classes::TCollectionItemClass ItemClass) : Qimport3xmlbased::TCellList(AOwner, ItemClass) { }
	
public:
	/* TCollection.Destroy */ inline __fastcall virtual ~TDocxColList() { }
	
};

#pragma pack(pop)

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

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TDocxSheetList : public Qimport3xmlbased::TXMLSheetList
{
	typedef Qimport3xmlbased::TXMLSheetList inherited;
	
public:
	TDocxSheet* operator[](int Index) { return this->Items[Index]; }
	
private:
	HIDESBASE TDocxSheet* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, TDocxSheet* const Value);
	
public:
	HIDESBASE TDocxSheet* __fastcall Add();
	__property TDocxSheet* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
public:
	/* TCollection.Create */ inline __fastcall TDocxSheetList(System::Classes::TCollectionItemClass ItemClass) : Qimport3xmlbased::TXMLSheetList(ItemClass) { }
	/* TCollection.Destroy */ inline __fastcall virtual ~TDocxSheetList() { }
	
};

#pragma pack(pop)

class PASCALIMPLEMENTATION TDocxContainer : public Qimport3xmlbased::TXMLDocContainer
{
	typedef Qimport3xmlbased::TXMLDocContainer inherited;
	
private:
	int FRowNum;
	int FColsRepeated;
	bool FNeedFillMerge;
	TDocxSheetList* __fastcall GetSheets();
	System::WideString __fastcall ImageToString(const System::UnicodeString FileName, /* out */ bool &AIsIcon);
	
protected:
	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 LoadSheets();
	
public:
	__property TDocxSheetList* Sheets = {read=GetSheets};
public:
	/* TXMLDocContainer.Create */ inline __fastcall virtual TDocxContainer() : Qimport3xmlbased::TXMLDocContainer() { }
	/* TXMLDocContainer.Destroy */ inline __fastcall virtual ~TDocxContainer() { }
	
};


#pragma pack(push,4)
class PASCALIMPLEMENTATION TDocxFile : public Qimport3xmlbased::TZipDocumentFile
{
	typedef Qimport3xmlbased::TZipDocumentFile inherited;
	
private:
	bool FNeedFillMerge;
	TDocxContainer* __fastcall GetContainer();
	TDocxSheetList* __fastcall GetSheets();
	void __fastcall SetNeedFillMerge(const bool Value);
	
protected:
	virtual Qimport3xmlbased::TXMLDocContainer* __fastcall CreateContainer();
	
public:
	__property bool NeedFillMerge = {read=FNeedFillMerge, write=SetNeedFillMerge, nodefault};
	__property TDocxContainer* Container = {read=GetContainer};
	__property TDocxSheetList* Sheets = {read=GetSheets};
public:
	/* TZipDocumentFile.Create */ inline __fastcall virtual TDocxFile() : Qimport3xmlbased::TZipDocumentFile() { }
	/* TZipDocumentFile.Destroy */ inline __fastcall virtual ~TDocxFile() { }
	
};

#pragma pack(pop)

class PASCALIMPLEMENTATION TQImport3Docx : public Qimport3xmlbased::TQImport3XMLBased
{
	typedef Qimport3xmlbased::TQImport3XMLBased inherited;
	
private:
	bool FNeedFillMerge;
	int FSheetNumber;
	void __fastcall SetSheetNumber(const int Value);
	void __fastcall SetNeedFillMerge(const bool Value);
	
protected:
	virtual void __fastcall FillImportRow();
	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 TQImport3Docx(System::Classes::TComponent* AOwner);
	
__published:
	__property FileName = {default=0};
	__property SkipFirstRows = {default=0};
	__property int TableNumber = {read=FSheetNumber, write=SetSheetNumber, default=0};
	__property bool NeedFillMerge = {read=FNeedFillMerge, write=SetNeedFillMerge, default=0};
public:
	/* TQImport3.Destroy */ inline __fastcall virtual ~TQImport3Docx() { }
	
};


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

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