fpspreadsheet: Fix TsWorkbookChartLink crashing when no chart is loaded.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9115 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz 2024-01-02 12:01:49 +00:00
parent 14f307f284
commit 369c69ee8c
2 changed files with 4 additions and 1 deletions

View File

@ -8,7 +8,7 @@ uses
Classes, SysUtils,
LCLVersion, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls,
TAGraph, TASources,
fpSpreadsheet, fpsTypes, fpsOpenDocument,
fpSpreadsheet, fpsTypes, fpsOpenDocument, xlsxOOXML,
fpSpreadsheetCtrls, fpSpreadsheetGrid, fpSpreadsheetChart;
type

View File

@ -1842,6 +1842,9 @@ begin
FChart.ExpandPercentage := 0;
ch := GetWorkbookChart;
if ch = nil then
exit;
UpdateChartBackground(ch);
UpdateChartTitle(ch.Title, FChart.Title);
UpdateChartTitle(ch.Subtitle, FChart.Foot);