fpspreadsheet: Fix ignored-formula feature.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7997 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-04-15 13:40:42 +00:00
parent d4a2ee4773
commit 00c3bdb639
2 changed files with 8 additions and 6 deletions

View File

@ -6,7 +6,7 @@
confirmation must be given to save the file because it has been changed
by LOCalc.
This method does not work with Excel because it writes an additonal
This method does not work with Excel because it writes an additional
folder and xml files for external links. }
program demo_ignore_formula;

View File

@ -4783,12 +4783,14 @@ begin
exit;
end;
if not (boIgnoreFormulas in Workbook.Options) then
begin
// Remove '='; is not stored internally
if (AFormula[1] = '=') then
AFormula := Copy(AFormula, 2, Length(AFormula));
// Remove '='; is not stored internally
if (AFormula[1] = '=') then
Delete(AFormula, 1, 1);
if (boIgnoreFormulas in Workbook.Options) then
formula := FFormulas.AddFormula(ACell^.Row, ACell^.Col, AFormula)
else
begin
parser := TsSpreadsheetParser.Create(self);
try
if ALocalized then