Forum > LCL

[SOLVED] Removal of CDCS_*, GPS_* and SIATTRIBFLAGS_* constants from LCL

(1/1)

lagprogramming:
CDCS_*, GPS_* and SIATTRIBFLAGS_* constants are declared but never used in LCL. The same constants are declared in fpc's packages/winunits-base/src/shlobj.pp.
Third party applications should use FPC's declarations.
The following patch removes the declarations from lcl/interfaces/win32/win32extra.pas and lcl/interfaces/customdrawn/customdrawn_winextra.pas.

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---diff --git a/lcl/interfaces/customdrawn/customdrawn_winextra.pas b/lcl/interfaces/customdrawn/customdrawn_winextra.pasindex 1d7a36da24..4e2c1a7d1f 100644--- a/lcl/interfaces/customdrawn/customdrawn_winextra.pas+++ b/lcl/interfaces/customdrawn/customdrawn_winextra.pas@@ -225,31 +225,6 @@ const   CLSID_FileOpenDialog: TGUID = '{DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7}';   CLSID_FileSaveDialog: TGUID = '{C0B4E2F3-BA21-4773-8DBA-335EC946EB8B}'; -  // GETPROPERTYSTOREFLAGS enum-  GPS_DEFAULT              = 0;-  GPS_HANDLERPROPERTIESONLY = $1;-  GPS_READWRITE                    = $2;-  GPS_TEMPORARY                    = $4;-  GPS_FASTPROPERTIESONLY    = $8;-  GPS_OPENSLOWITEM         = $10;-  GPS_DELAYCREATION         = $20;-  GPS_BESTEFFORT            = $40;-  GPS_NO_OPLOCK                    = $80;-  GPS_MASK_VALID            = $ff;--  // SIATTRIBFLAGS enum-  SIATTRIBFLAGS_AND       = $1;-  SIATTRIBFLAGS_OR        = $2;-  SIATTRIBFLAGS_APPCOMPAT = $3;-  SIATTRIBFLAGS_MASK      = $3;-  SIATTRIBFLAGS_ALLITEMS  = $4000;--  // CDCONTROLSTATEF enum-  CDCS_INACTIVE       = 0;-  CDCS_ENABLED        = $1;-  CDCS_VISIBLE        = $2;-  CDCS_ENABLEDVISIBLE = $3;- type   GETPROPERTYSTOREFLAGS = DWord;   SIATTRIBFLAGS = DWord;diff --git a/lcl/interfaces/win32/win32extra.pas b/lcl/interfaces/win32/win32extra.pasindex 5997d81fe4..b7603bcf24 100644--- a/lcl/interfaces/win32/win32extra.pas+++ b/lcl/interfaces/win32/win32extra.pas@@ -210,31 +210,6 @@ const   CLSID_FileOpenDialog: TGUID = '{DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7}';   CLSID_FileSaveDialog: TGUID = '{C0B4E2F3-BA21-4773-8DBA-335EC946EB8B}'; -  // GETPROPERTYSTOREFLAGS enum-  GPS_DEFAULT              = 0;-  GPS_HANDLERPROPERTIESONLY = $1;-  GPS_READWRITE                    = $2;-  GPS_TEMPORARY                    = $4;-  GPS_FASTPROPERTIESONLY    = $8;-  GPS_OPENSLOWITEM         = $10;-  GPS_DELAYCREATION         = $20;-  GPS_BESTEFFORT            = $40;-  GPS_NO_OPLOCK                    = $80;-  GPS_MASK_VALID            = $ff;--  // SIATTRIBFLAGS enum-  SIATTRIBFLAGS_AND       = $1;-  SIATTRIBFLAGS_OR        = $2;-  SIATTRIBFLAGS_APPCOMPAT = $3;-  SIATTRIBFLAGS_MASK      = $3;-  SIATTRIBFLAGS_ALLITEMS  = $4000;--  // CDCONTROLSTATEF enum-  CDCS_INACTIVE       = 0;-  CDCS_ENABLED        = $1;-  CDCS_VISIBLE        = $2;-  CDCS_ENABLEDVISIBLE = $3;- type   GETPROPERTYSTOREFLAGS = DWord;   SIATTRIBFLAGS = DWord;

AlexTP:
Posted to https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40451

Navigation

[0] Message Index

Go to full version