fpspreadsheet: Fix compilation after odPainted (lcltype.TOwnerDrawStateType) has been renamed in lcl to odBackgroundPainted (laz r55303)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5929 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz 2017-06-11 21:51:10 +00:00
parent 52dcfe90b1
commit 9be1008351

View File

@ -28,7 +28,7 @@ interface
uses
Classes, Graphics, SysUtils, Controls, StdCtrls, ComCtrls, ValEdit, ActnList,
LResources,
LResources, LCLVersion,
fpstypes, fpspreadsheet; //, {%H-}fpsAllFormats;
type
@ -425,7 +425,7 @@ type
property Worksheet: TsWorksheet read GetWorksheet;
published
{@@ Identifies the cell format property to be used in the combobox }
property CellFormatItem: TsCellFormatItem read FFormatItem write SetFormatItem;
property CellFormatItem: TsCellFormatItem read FFormatItem write SetFormatItem default cfiFontName;
{@@ Margin around the color box }
property ColorRectOffset: Integer read FColorRectOffset write SetColorRectOffset default 2;
{@@ Width of the color box shown for the color-related format items }
@ -2525,7 +2525,16 @@ begin
r.Right := ARect.Right - FColorRectOffset
else
r.Right := r.Left + FColorRectWidth;
Exclude(AState, odPainted);
// Note: odPainted was renamed in LCL (v1.9) to odBackgroundPainted
{$IF lcl_fullversion = 01090000}
Exclude(AState, TOwnerDrawStateType(13));
// ord(odPainted) = ord(odBackgroundPainted) = 13
{$ELSEIF lcl_fullversion < 01090000}
Exclude(AState, odPainted);
{$ELSE}
Exclude(AState, odBackgroundPainted);
{$ENDIF}
noFill := false;