From 13ac26a52befea5ab4bf6dba299548964ea8c3cc Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Wed, 1 Nov 2023 22:00:11 +0000 Subject: [PATCH] fpspreadsheet: Fix incorrect handling of
tag in html cell text. Cells with line-breaks are now automatically word-wrapped. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9005 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../fpspreadsheet/source/common/fpshtmlutils.pas | 10 ++++++++-- .../fpspreadsheet/source/common/fpspreadsheet.pas | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/components/fpspreadsheet/source/common/fpshtmlutils.pas b/components/fpspreadsheet/source/common/fpshtmlutils.pas index 6a82757ac..3d79d2d5f 100644 --- a/components/fpspreadsheet/source/common/fpshtmlutils.pas +++ b/components/fpspreadsheet/source/common/fpshtmlutils.pas @@ -842,9 +842,15 @@ begin AddRichTextParam(FCurrFont); end; '
', - '
': FPlainText := FPlainText + FPS_LINE_ENDING; - else if (pos('
': begin FPlainText := FPlainText + FPS_LINE_ENDING; + FHandled := True; + end; + else if (pos('
0 then for i:=0 to High(ARichTextParams) do ACell^.RichTextParams[i] := ARichTextParams[i]; + if pos(FPS_LINE_ENDING, AText) > 0 then + WriteWordWrap(ACell, true); end; ChangedCell(ACell^.Row, ACell^.Col);