fpspreadsheet: Fix TsWorksheetGrid hanging in case of zero-width or zero-height cells

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4611 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-04-08 19:27:59 +00:00
parent 34025326da
commit 72d1f2798e

View File

@ -248,6 +248,9 @@ procedure DrawRichText(ACanvas: TCanvas; AWorkbook: TsWorkbook; const ARect: TRe
var var
painter: TsTextPainter; painter: TsTextPainter;
begin begin
if (ARect.Left = ARect.Right) or (ARect.Top = ARect.Bottom) then
exit;
painter := TsTextPainter.Create(ACanvas, AWorkbook, ARect, AText, ARichTextParams, painter := TsTextPainter.Create(ACanvas, AWorkbook, ARect, AText, ARichTextParams,
AFontIndex, ARotation, AHorAlignment, AVertAlignment, AWordWrap, ARightToLeft); AFontIndex, ARotation, AHorAlignment, AVertAlignment, AWordWrap, ARightToLeft);
try try