⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qexport4options.pas

📁 Advanced.Export.Component.v4.01.rar,delphi 第三方控件
💻 PAS
📖 第 1 页 / 共 3 页
字号:
    FirstLinkTitle := (Source as TQExportHTMLMultiFileOptions).FirstLinkTitle;
    PriorLinkTitle := (Source as TQExportHTMLMultiFileOptions).PriorLinkTitle;
    NextLinkTitle := (Source as TQExportHTMLMultiFileOptions).NextLinkTitle;
    LastLinkTitle := (Source as TQExportHTMLMultiFileOptions).LastLinkTitle;

    Exit;
  end;
  inherited;
end;

function TQExportHTMLMultiFileOptions.IsIndexLinkTemplate: boolean;
begin
  Result := FIndexLinkTemplate <> EmptyStr;
end;

function TQExportHTMLMultiFileOptions.IsIndexLinkTitle: boolean;
begin
  Result := FIndexLinkTitle <> S_Index;
end;

function TQExportHTMLMultiFileOptions.IsFirstLinkTitle: boolean;
begin
  Result := FFirstLinkTitle <> S_First;
end;

function TQExportHTMLMultiFileOptions.IsPriorLinkTitle: boolean;
begin
  Result := FPriorLinkTitle <> S_Prior;
end;

function TQExportHTMLMultiFileOptions.IsNextLinkTitle: boolean;
begin
  Result := FNextLinkTitle <> S_Next;
end;

function TQExportHTMLMultiFileOptions.IsLastLinkTitle: boolean;
begin
  Result := FLastLinkTitle <> S_Last;
end;

{ TQExportTXTOptions }

constructor TQExportTXTOptions.Create;
begin
  inherited;
  FAutoCalcColWidth := true;
  FColSpacing := 1;
end;

procedure TQExportTXTOptions.Assign(Source: TPersistent);
begin
  if Source is TQExportTXTOptions then begin
    AutoCalcColWidth := (Source as TQExportTXTOptions).AutoCalcColWidth;
    ColSpacing := (Source as TQExportTXTOptions).ColSpacing;
    Exit;
  end;
  inherited;
end;

{ TQExportCSVOptions }

constructor TQExportCSVOptions.Create;
begin
  inherited;
  FComma := GetListSeparator;
  FQuote := '"';
  FQuoteStrings := true;
end;

procedure TQExportCSVOptions.Assign(Source: TPersistent);
begin
  if Source is TQExportCSVOptions then begin
    Comma := (Source as TQExportCSVOptions).Comma;
    Quote := (Source as TQExportCSVOptions).Quote;
    QuoteStrings := (Source as TQExportCSVOptions).QuoteStrings;
    Exit;
  end;
  inherited;
end;

{ TQExportPDFOptions }

constructor TQExportPDFOptions.Create;
begin
  inherited;
  FPageOptions := TQExportPDFPageOptions.Create;
  FHeaderFont := TPDFFont.Create;
  FHeaderFont.FontName := 'HeaderFont';
  FCaptionFont := TPDFFont.Create;
  FCaptionFont.FontName := 'CaptionFont';
  FDataFont := TPDFFont.Create;
  FDataFont.FontName := 'DataFont';
  FFooterFont := TPDFFont.Create;
  FFooterFont.FontName := 'FooterFont';

  FRowSpacing := 1;
  FColSpacing := 3;
  FGridLineWidth := 1;
end;

destructor TQExportPDFOptions.Destroy;
begin
  FPageOptions.Free;
  FHeaderFont.Free;
  FCaptionFont.Free;
  FDataFont.Free;
  FFooterFont.Free;
  inherited;
end;

procedure TQExportPDFOptions.Assign(Source: TPersistent);
begin
  if Source is TQExportPDFOptions then begin
    PageOptions := (Source as TQExportPDFOptions).PageOptions;

    HeaderFont := (Source as TQExportPDFOptions).HeaderFont;
    CaptionFont := (Source as TQExportPDFOptions).CaptionFont;
    DataFont := (Source as TQExportPDFOptions).DataFont;
    FooterFont := (Source as TQExportPDFOptions).FooterFont;

    RowSpacing := (Source as TQExportPDFOptions).RowSpacing;
    ColSpacing := (Source as TQExportPDFOptions).ColSpacing;
    GridLineWidth := (Source as TQExportPDFOptions).GridLineWidth;

    Exit;
  end;
  inherited;
end;

function TQExportPDFOptions.IsRowSpacing: boolean;
begin
  Result := FRowSpacing <> 1;
end;

function TQExportPDFOptions.IsColSpacing: boolean;
begin
  Result := FColSpacing <> 3;
end;

procedure TQExportPDFOptions.SetHeaderFont(const Value: TPDFFont);
begin
  FHeaderFont.Assign(Value);
end;

procedure TQExportPDFOptions.SetPageOptions(const Value: TQExportPDFPageOptions);
begin
  FPageOptions.Assign(Value);
end;

procedure TQExportPDFOptions.SetCaptionFont(const Value: TPDFFont);
begin
  FCaptionFont.Assign(Value);
end;

procedure TQExportPDFOptions.SetDataFont(const Value: TPDFFont);
begin
  FDataFont.Assign(Value);
end;

procedure TQExportPDFOptions.SetFooterFont(const Value: TPDFFont);
begin
  FFooterFont.Assign(Value);
end;

{ TQExportAccessOptions }

constructor TQExportAccessOptions.Create;
begin
  inherited;
  FTableName := 'EXPORT_TABLE';
  FCreateTable := true;
end;

procedure TQExportAccessOptions.Assign(Source: TPersistent);
begin
  if Source is TQExportAccessOptions then begin
    TableName := (Source as TQExportAccessOptions).TableName;
    CreateTable := (Source as TQExportAccessOptions).CreateTable;
    Exit;
  end;
  inherited;
end;

function TQExportAccessOptions.IsPassword: Boolean;
begin
  Result := FPassword <> EmptyStr;
end;

function TQExportAccessOptions.IsTableName: boolean;
begin
  Result := FTableName <> EmptyStr;
end;

{ TQExportXLSOptions }

constructor TQExportXLSOptions.Create;
begin
  inherited;
  FAutoCalcColWidth := false;
  FPageHeader := EmptyStr;
  FPageFooter := 'Page &P of &N';
  FSheetTitle := 'Sheet 1';
  FPageBackground := EmptyStr;

  FHeaderFormat := TxlsFormat.Create(nil);
  FCaptionFormat := TxlsFormat.Create(nil);
  SetDefaultXLSCaption(FCaptionFormat);
  FDataFormat := TxlsFormat.Create(nil);
  FAggregateFormat := TxlsFormat.Create(nil);
  FFooterFormat := TxlsFormat.Create(nil);
  FHyperlinkFormat := TxlsFormat.Create(nil);
  FHyperlinkFormat.Font.Color := clrBlue;
  FHyperlinkFormat.Font.Underline := fulSingle;
  FNoteFormat := TxlsNoteFormat.Create(nil);

  FFieldFormats := TxlsFieldFormats.Create(Self);
  FStripStyles := TxlsFormats.Create(Self);
  FStripType := ssNone;
  FHyperlinks := TxlsHyperlinks.Create(Self);
  FNotes := TxlsNotes.Create(Self);
  FCharts := TxlsCharts.Create(Self);
  FPictures := TxlsPictures.Create(Self);
  FImages := TxlsImages.Create(Self);
  FCells := TxlsCells.Create(Self);
  FMergedCells := TxlsMergedCellList.Create(Self);
end;

destructor TQExportXLSOptions.Destroy;
begin
  FHeaderFormat.Free;
  FCaptionFormat.Free;
  FDataFormat.Free;
  FAggregateFormat.Free;
  FFooterFormat.Free;
  FHyperlinkFormat.Free;
  FNoteFormat.Free;

  FFieldFormats.Free;
  FStripStyles.Free;
  FHyperlinks.Free;
  FNotes.Free;
  FCharts.Free;
  FPictures.Free;
  FImages.Free;
  FCells.Free;
  FMergedCells.Free;
  inherited;
end;

procedure TQExportXLSOptions.Assign(Source: TPersistent);
begin
  if Source is TQExportXLSOptions then begin
    AutoCalcColWidth := (Source as TQExportXLSOptions).AutoCalcColWidth;
    PageHeader := (Source as TQExportXLSOptions).PageHeader;
    PageFooter := (Source as TQExportXLSOptions).PageFooter;
    SheetTitle := (Source as TQExportXLSOptions).SheetTitle;

    HeaderFormat := (Source as TQExportXLSOptions).HeaderFormat;
    CaptionFormat := (Source as TQExportXLSOptions).CaptionFormat;
    DataFormat := (Source as TQExportXLSOptions).DataFormat;
    AggregateFormat := (Source as TQExportXLSOptions).AggregateFormat;
    FooterFormat := (Source as TQExportXLSOptions).FooterFormat;
    HyperlinkFormat := (Source as TQExportXLSOptions).HyperlinkFormat;
    NoteFormat := (Source as TQExportXLSOptions).NoteFormat;

    FieldFormats := (Source as TQExportXLSOptions).FieldFormats;
    StripStyles := (Source as TQExportXLSOptions).StripStyles;
    StripType := (Source as TQExportXLSOptions).StripType;
    Hyperlinks := (Source as TQExportXLSOptions).Hyperlinks;
    Notes := (Source as TQExportXLSOptions).Notes;
    Charts := (Source as TQExportXLSOptions).Charts;
    Pictures := (Source as TQExportXLSOptions).Pictures;
    Images := (Source as TQExportXLSOptions).Images;
    Cells := (Source as TQExportXLSOptions).Cells;
    MergedCells := (Source as TQExportXLSOptions).MergedCells;

    Exit;
  end;
  inherited;
end;

function TQExportXLSOptions.IsPageHeader: Boolean;
begin
  Result := FPageHeader <> EmptyStr;
end;

function TQExportXLSOptions.IsPageFooter: Boolean;
begin
  Result := FPageFooter <> EmptyStr;
end;

procedure TQExportXLSOptions.SetSheetTitle(const Value: string);
begin
  if FSheetTitle <> Value then
    if Value <> EmptyStr
      then FSheetTitle := Value
      else FSheetTitle := 'Sheet1';
end;

procedure TQExportXLSOptions.SetHeaderFormat(const Value: TxlsFormat);
begin
  FHeaderFormat.Assign(Value);
end;

procedure TQExportXLSOptions.SetCaptionFormat(const Value: TxlsFormat);
begin
  FCaptionFormat.Assign(Value);
end;

procedure TQExportXLSOptions.SetDataFormat(const Value: TxlsFormat);
begin
  FDataFormat.Assign(Value);
end;

procedure TQExportXLSOptions.SetAggregateFormat(const Value: TxlsFormat);
begin
  FAggregateFormat.Assign(Value);
end;

procedure TQExportXLSOptions.SetFooterFormat(const Value: TxlsFormat);
begin
  FFooterFormat.Assign(Value);
end;

procedure TQExportXLSOptions.SetFieldFormats(const Value: TxlsFieldFormats);
begin
  FFieldFormats.Assign(Value);
end;

procedure TQExportXLSOptions.SetStripStyles(const Value: TxlsFormats);
begin
  FStripStyles.Assign(Value);
end;

procedure TQExportXLSOptions.SetHyperlinks(const Value: TxlsHyperlinks);
begin
  FHyperlinks.Assign(Value);
end;

procedure TQExportXLSOptions.SetNotes(const Value: TxlsNotes);
begin
  FNotes.Assign(Value);
end;

procedure TQExportXLSOptions.SetCharts(const Value: TxlsCharts);
begin
  FCharts.Assign(Value);
end;

procedure TQExportXLSOptions.SetHyperlinkFormat(const Value: TxlsFormat);
begin
  FHyperlinkFormat.Assign(Value);
end;

procedure TQExportXLSOptions.SetNoteFormat(const Value: TxlsNoteFormat);
begin
  FNoteFormat.Assign(Value);
end;

procedure TQExportXLSOptions.SetPictures(const Value: TxlsPictures);
begin
  FPictures.Assign(Value);
end;

procedure TQExportXLSOptions.SetImages(const Value: TxlsImages);
begin
  FImages.Assign(Value);
end;

procedure TQExportXLSOptions.SetCells(const Value: TxlsCells);
begin
  FCells.Assign(Value);
end;

procedure TQExportXLSOptions.SetMergedCells(const Value: TxlsMergedCellList);
begin
  FMergedCells.Assign(Value);
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -