Skip to content

Commit 41419be

Browse files
author
Joachim Marder
committed
Fixed #64: Instead of defining own TUIPropertyKey use TPropertyKey from unit "WinApi.ActiveX"
1 parent 93d951c commit 41419be

File tree

1 file changed

+2
-39
lines changed

1 file changed

+2
-39
lines changed

Lib/UIRibbonApi.pas

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,8 @@ TPropVariantEx = record
3535

3636
{$REGION 'UIRibbonKeydef.h'}
3737
type
38-
TUIPropertyKey = packed record
39-
public
40-
FmtId: TGuid;
41-
PId: DWord;
42-
public
43-
class operator Equal(const A, B: TUIPropertyKey): Boolean;
44-
class operator Equal(const A: TUIPropertyKey; const B: TPropertyKey): Boolean;
45-
class operator NotEqual(const A, B: TUIPropertyKey): Boolean;
46-
class operator NotEqual(const A: TUIPropertyKey; const B: TPropertyKey): Boolean;
47-
end;
48-
PUIPropertyKey = ^TUIPropertyKey;
38+
TUIPropertyKey = TPropertyKey;
39+
PUIPropertyKey = PPropertyKey;
4940

5041
(*#define DEFINE_UIPROPERTYKEY(name, type, index) EXTERN_C \\
5142
const PROPERTYKEY DECLSPEC_SELECTANY name = { { 0x00000000 + index, 0x7363, \\
@@ -659,32 +650,6 @@ implementation
659650
SysUtils,
660651
WinApiEx;
661652

662-
{$REGION 'UIRibbonKeydef.h'}
663-
664-
{ TUIPropertyKey }
665-
666-
class operator TUIPropertyKey.Equal(const A, B: TUIPropertyKey): Boolean;
667-
begin
668-
Result := CompareMem(@A, @B, SizeOf(TUIPropertyKey));
669-
end;
670-
671-
class operator TUIPropertyKey.Equal(const A: TUIPropertyKey;
672-
const B: TPropertyKey): Boolean;
673-
begin
674-
Result := CompareMem(@A, @B, SizeOf(TUIPropertyKey));
675-
end;
676-
677-
class operator TUIPropertyKey.NotEqual(const A, B: TUIPropertyKey): Boolean;
678-
begin
679-
Result := not CompareMem(@A, @B, SizeOf(TUIPropertyKey));
680-
end;
681-
682-
class operator TUIPropertyKey.NotEqual(const A: TUIPropertyKey;
683-
const B: TPropertyKey): Boolean;
684-
begin
685-
Result := not CompareMem(@A, @B, SizeOf(TUIPropertyKey));
686-
end;
687-
{$ENDREGION 'UIRibbonKeydef.h'}
688653

689654
{$REGION 'UIRibbon.h/idl'}
690655
function UIHsb(const Hue, Saturation, Brightness: Byte): TUIHsbColor; inline;
@@ -883,7 +848,5 @@ function UIPropertyToIUnknownArrayAlloc(const Key: TUIPropertyKey; const PropVar
883848
end;
884849
{$ENDREGION 'UIRibbonPropertyHelpers.h'}
885850

886-
initialization
887-
Assert(SizeOf(TUIPropertyKey) = SizeOf(TPropertyKey));
888851

889852
end.

0 commit comments

Comments
 (0)