📄 qexport4options.pas
字号:
procedure SetAggregateFormat(const Value: TxlsFormat);
procedure SetFooterFormat(const Value: TxlsFormat);
procedure SetFieldFormats(const Value: TxlsFieldFormats);
procedure SetStripStyles(const Value: TxlsFormats);
procedure SetHyperlinks(const Value: TxlsHyperlinks);
procedure SetNotes(const Value: TxlsNotes);
procedure SetCharts(const Value: TxlsCharts);
procedure SetHyperlinkFormat(const Value: TxlsFormat);
procedure SetNoteFormat(const Value: TxlsNoteFormat);
procedure SetPictures(const Value: TxlsPictures);
procedure SetImages(const Value: TxlsImages);
procedure SetCells(const Value: TxlsCells);
procedure SetMergedCells(const Value: TxlsMergedCellList);
public
constructor Create(Holder: TPersistent);
destructor Destroy; override;
procedure Assign(Source: TPersistent); override;
published
property AutoCalcColWidth: boolean read FAutoCalcColWidth
write FAutoCalcColWidth default false;
property PageHeader: string read FPageHeader write FPageHeader
stored IsPageHeader;
property PageFooter: string read FPageFooter write FPageFooter
stored IsPageFooter;
property SheetTitle: string read FSheetTitle write SetSheetTitle;
property PageBackground: string read FPageBackground
write FPageBackground;
property HeaderFormat: TxlsFormat read FHeaderFormat
write SetHeaderFormat;
property CaptionFormat: TxlsFormat read FCaptionFormat
write SetCaptionFormat;
property DataFormat: TxlsFormat read FDataFormat
write SetDataFormat;
property AggregateFormat: TxlsFormat read FAggregateFormat
write SetAggregateFormat;
property FooterFormat: TxlsFormat read FFooterFormat
write SetFooterFormat;
property HyperlinkFormat: TxlsFormat read FHyperlinkFormat
write SetHyperlinkFormat;
property NoteFormat: TxlsNoteFormat read FNoteFormat
write SetNoteFormat;
property FieldFormats: TxlsFieldFormats read FFieldFormats
write SetFieldFormats;
property StripStyles: TxlsFormats read FStripStyles
write SetStripStyles;
property StripType: TxlsStripType read FStripType
write FStripType default ssNone;
property Hyperlinks: TxlsHyperlinks read FHyperlinks
write SetHyperlinks;
property Notes: TxlsNotes read FNotes write SetNotes;
property Charts: TxlsCharts read FCharts write SetCharts;
property Pictures: TxlsPictures read FPictures write SetPictures;
property Images: TxlsImages read FImages write SetImages;
property Cells: TxlsCells read FCells write SetCells;
property MergedCells: TxlsMergedCellList read FMergedCells
write SetMergedCells;
end;
implementation
uses SysUtils, QExport4Common;
{ TQExportOptions }
constructor TQExportOptions.Create(Holder: TPersistent);
begin
inherited Create;
FHolder := Holder;
end;
function TQExportOptions.GetOwner: TPersistent;
begin
Result := FHolder;
end;
{ TQExportSQLOptions }
constructor TQExportSQLOptions.Create;
begin
inherited;
FTableName := EmptyStr;
FCreateTable := false;
FCommitRecCount := 0;
FCommitAfterScript := false;
FCommitStatement := S_Commit;
FStatementTerm := ';';
end;
procedure TQExportSQLOptions.Assign(Source: TPersistent);
begin
if Source is TQExportSQLOptions then begin
TableName := (Source as TQExportSQLOptions).TableName;
CreateTable := (Source as TQExportSQLOptions).CreateTable;
CommitRecCount := (Source as TQExportSQLOptions).CommitRecCount;
CommitAfterScript := (Source as TQExportSQLOptions).CommitAfterScript;
CommitStatement := (Source as TQExportSQLOptions).CommitStatement;
StatementTerm := (Source as TQExportSQLOptions).StatementTerm;
Exit;
end;
inherited;
end;
function TQExportSQLOptions.IsTableName: boolean;
begin
Result := FTableName <> EmptyStr;
end;
function TQExportSQLOptions.IsCommitStatement: boolean;
begin
Result := FCommitStatement <> S_Commit;
end;
{ TQExportRTFOptions }
constructor TQExportRTFOptions.Create;
begin
inherited;
FCaptionAligns := TStringList.Create;
FCaptionStyle := TrtfStyle.Create(nil);
SetDefaultRTFCaption(FCaptionStyle);
FDataStyle := TrtfStyle.Create(nil);
// FDefaultCaptionAlign := ecaCenter;
FFooterStyle := TrtfStyle.Create(nil);
FHeaderStyle := TrtfStyle.Create(nil);
FPageOrientation := poPortrait;
FStripStyles := TrtfStyles.Create(Self);
FStripType := stNone;
end;
destructor TQExportRTFOptions.Destroy;
begin
FCaptionAligns.Free;
FCaptionStyle.Free;
FDataStyle.Free;
FFooterStyle.Free;
FHeaderStyle.Free;
FStripStyles.Free;
inherited;
end;
procedure TQExportRTFOptions.Assign(Source: TPersistent);
begin
if Source is TQExportRTFOptions then begin
CaptionAligns := (Source as TQExportRTFOptions).CaptionAligns;
CaptionStyle := (Source as TQExportRTFOptions).CaptionStyle;
DataStyle := (Source as TQExportRTFOptions).DataStyle;
// DefaultCaptionAlign := (Source as TQExportRTFOptions).DefaultCaptionAlign;
FooterStyle := (Source as TQExportRTFOptions).FooterStyle;
HeaderStyle := (Source as TQExportRTFOptions).HeaderStyle;
PageOrientation := (Source as TQExportRTFOptions).PageOrientation;
StripStyles := (Source as TQExportRTFOptions).StripStyles;
StripType := (Source as TQExportRTFOptions).StripType;
Exit;
end;
inherited;
end;
procedure TQExportRTFOptions.SetCaptionAligns(const Value: TStrings);
begin
FCaptionAligns.Assign(Value);
end;
procedure TQExportRTFOptions.SetCaptionStyle(const Value: TrtfStyle);
begin
FCaptionStyle.Assign(Value);
end;
procedure TQExportRTFOptions.SetDataStyle(const Value: TrtfStyle);
begin
FDataStyle.Assign(Value);
end;
procedure TQExportRTFOptions.SetFooterStyle(const Value: TrtfStyle);
begin
FFooterStyle.Assign(Value);
end;
procedure TQExportRTFOptions.SetHeaderStyle(const Value: TrtfStyle);
begin
FHeaderStyle.Assign(Value);
end;
procedure TQExportRTFOptions.SetStripStyles(const Value: TrtfStyles);
begin
FStripStyles.Assign(Value)
end;
{ TQExportXMLOptions }
constructor TQExportXMLOptions.Create;
begin
FStandalone := true;
FEncoding := EmptyStr;
end;
procedure TQExportXMLOptions.Assign(Source: TPersistent);
begin
if Source is TQExportXMLOptions then begin
Standalone := (Source as TQExportXMLOptions).Standalone;
Encoding := (Source as TQExportXMLOptions).Encoding;
Exit;
end;
inherited;
end;
function TQExportXMLOptions.IsEncoding: boolean;
begin
Result := FEncoding <> EmptyStr;
end;
{ TQExportHTMLTableOptions }
constructor TQExportHTMLTableOptions.Create;
begin
inherited;
FBorderWidth := 1;
FCellPadding := 4;
FCellSpacing := 1;
FAdvancedAttributes := TStringList.Create;
FHeadersRowBgColor := $000000FF;
FHeadersRowFontColor := $00FFFFFF;
FTableBgColor := $00EC7A00;
FTableFontColor := $00FFFFFF;
FOddRowBgColor := $00CE6B00;
FBorderColor := clWhite;
FBackgroundFileName := EmptyStr;
end;
destructor TQExportHTMLTableOptions.Destroy;
begin
FAdvancedAttributes.Free;
inherited;
end;
procedure TQExportHTMLTableOptions.Assign(Source: TPersistent);
begin
if Source is TQExportHTMLTableOptions then begin
BorderWidth := (Source as TQExportHTMLTableOptions).BorderWidth;
CellPadding := (Source as TQExportHTMLTableOptions).CellPadding;
CellSpacing := (Source as TQExportHTMLTableOptions).CellSpacing;
AdvancedAttributes := (Source as TQExportHTMLTableOptions).AdvancedAttributes;
HeadersRowBgColor := (Source as TQExportHTMLTableOptions).HeadersRowBgColor;
HeadersRowFontColor := (Source as TQExportHTMLTableOptions).HeadersRowFontColor;
TableBgColor := (Source as TQExportHTMLTableOptions).TableBgColor;
TableFontColor := (Source as TQExportHTMLTableOptions).TableFontColor;
OddRowBgColor := (Source as TQExportHTMLTableOptions).OddRowBgColor;
BorderColor := (Source as TQExportHTMLTableOptions).BorderColor;
BackgroundFileName := (Source as TQExportHTMLTableOptions).BackgroundFileName;
Exit;
end;
inherited;
end;
procedure TQExportHTMLTableOptions.SetAdvancedAttributes(const Value: TStrings);
begin
FAdvancedAttributes.Assign(Value);
end;
function TQExportHTMLTableOptions.IsBackgroundFileName: boolean;
begin
Result := FBackgroundFileName <> EmptyStr;
end;
{ TQExportHTMLPageOptions }
constructor TQExportHTMLPageOptions.Create;
begin
inherited;
FTitle := EmptyStr;
FBackgroundColor := $00993333;
FTextFont := TFont.Create;
FTextFont.Name := 'Arial';
FTextFont.Color := $00FFFFFF;
FDefaultOptions := [doFontSIze];
FLinkColor := $007DEF69;
FVLinkColor := $00FF00FF;
FALinkColor := $0000FF00;
FBackgroundFileName := EmptyStr;
FAdvancedAttributes := TStringList.Create;
FUsingCSS := usInternal;
FCSSFileName := EmptyStr;
FOverwriteCSSFile := true;
FBoolAsCheckBox := false;
end;
destructor TQExportHTMLPageOptions.Destroy;
begin
FTextFont.Free;
FAdvancedAttributes.Free;
inherited;
end;
procedure TQExportHTMLPageOptions.Assign(Source: TPersistent);
begin
if Source is TQExportHTMLPageOptions then begin
Title := (Source as TQExportHTMLPageOptions).Title;
BackgroundColor := (Source as TQExportHTMLPageOptions).BackgroundColor;
TextFont := (Source as TQExportHTMLPageOptions).TextFont;
DefaultOptions := (Source as TQExportHTMLPageOptions).DefaultOptions;
LinkColor := (Source as TQExportHTMLPageOptions).LinkColor;
VLinkColor := (Source as TQExportHTMLPageOptions).VLinkColor;
ALinkColor := (Source as TQExportHTMLPageOptions).ALinkColor;
BackgroundFileName := (Source as TQExportHTMLPageOptions).BackgroundFileName;
AdvancedAttributes := (Source as TQExportHTMLPageOptions).AdvancedAttributes;
UsingCSS := (Source as TQExportHTMLPageOptions).UsingCSS;
CSSFileName := (Source as TQExportHTMLPageOptions).CSSFileName;
OverwriteCSSFile := (Source as TQExportHTMLPageOptions).OverwriteCSSFile;
BoolAsCheckBox := (Source as TQExportHTMLPageOptions).BoolAsCheckBox;
Exit;
end;
inherited;
end;
function TQExportHTMLPageOptions.IsTitle: boolean;
begin
Result := FTitle <> EmptyStr;
end;
procedure TQExportHTMLPageOptions.SetTextFont(const Value: TFont);
begin
FTextFont.Assign(Value);
end;
function TQExportHTMLPageOptions.IsBackgroundFilename: boolean;
begin
Result := FBackgroundFileName <> EmptyStr;
end;
procedure TQExportHTMLPageOptions.SetAdvancedAttributes(const Value: TStrings);
begin
FAdvancedAttributes.Assign(Value);
end;
function TQExportHTMLPageOptions.IsCSSFileName: boolean;
begin
Result := FCSSFileName <> EmptyStr;
end;
{ TQExportHTMLMultiFileOptions }
constructor TQExportHTMLMultiFileOptions.Create;
begin
inherited;
FFileRecCount := 0;
FGenerateIndex := false;
FIndexLinkTemplate := EmptyStr;
FNavigationOnTop := true;
FNavigationOnBottom := true;
FIndexLinkTitle := S_Index;
FFirstLinkTitle := S_First;
FPriorLinkTitle := S_Prior;;
FNextLinkTitle := S_Next;
FLastLinkTitle := S_Last;
end;
procedure TQExportHTMLMultiFileOptions.Assign(Source: TPersistent);
begin
if Source is TQExportHTMLMultiFileOptions then begin
FileRecCount := (Source as TQExportHTMLMultiFileOptions).FileRecCount;
GenerateIndex := (Source as TQExportHTMLMultiFileOptions).GenerateIndex;
IndexLinkTemplate := (Source as TQExportHTMLMultiFileOptions).IndexLinkTemplate;
NavigationOnTop := (Source as TQExportHTMLMultiFileOptions).NavigationOnTop;
NavigationOnBottom := (Source as TQExportHTMLMultiFileOptions).NavigationOnBottom;
IndexLinkTitle := (Source as TQExportHTMLMultiFileOptions).IndexLinkTitle;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -