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

// (DO NOT EDIT: machine generated header) 'SMWKS.pas' rev: 24.00 (Win32)

#ifndef SmwksHPP
#define SmwksHPP

#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 <SMCells.hpp>	// Pascal unit
#include <Vcl.Graphics.hpp>	// Pascal unit

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

namespace Smwks
{
//-- type declarations -------------------------------------------------------
enum TWKSVersion : unsigned char { wvUnknown, wvWKS1, wvWKS2, wvWR1, wv123, wvWKS3, wvWKS4 };

class DELPHICLASS TWK4Format;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TWK4Format : public System::TObject
{
	typedef System::TObject inherited;
	
public:
	int SheetIndex;
	int Row;
	System::Byte NumberFormat;
	int Style;
	System::Byte FormatType;
	System::Byte CellNumber;
public:
	/* TObject.Create */ inline __fastcall TWK4Format(void) : System::TObject() { }
	/* TObject.Destroy */ inline __fastcall virtual ~TWK4Format(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TLotus123;
class PASCALIMPLEMENTATION TLotus123 : public Smcells::TSpreadSheetFile
{
	typedef Smcells::TSpreadSheetFile inherited;
	
private:
	TWKSVersion FVersion;
	bool FIsEncrypted;
	
protected:
	void __fastcall ClearFormats(void);
	virtual void __fastcall ApplyEvents(void);
	TWK4Format* __fastcall GetWK4Format(int Index);
	bool __fastcall ValueIsDateTime(int intFormat);
	bool __fastcall ValueIsPercent(int intFormat);
	int __fastcall GetCellFormatIndex(int ASheetIndex, int ARow, int ACol);
	
public:
	System::Classes::TList* Formats;
	System::Classes::TStrings* NumericFormats;
	__fastcall virtual TLotus123(System::Classes::TComponent* AOwner);
	__fastcall virtual ~TLotus123(void);
	virtual void __fastcall LoadFromStream(System::Classes::TStream* AStream);
	virtual void __fastcall LoadFromFile(const System::WideString FileName);
	System::UnicodeString __fastcall GetFormatString(int AFormatIndex);
	void __fastcall FillFormatForCell(Smcells::TSMICell* cell, Vcl::Graphics::TFont* &fnt, System::UnicodeString &FormatMask);
	virtual bool __fastcall IsEncrypted(void);
	
__published:
	__property TWKSVersion Version = {read=FVersion, write=FVersion, nodefault};
};


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

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