Permalink
Browse files

OmniXML Encodings: Starting with Delphi 10.1 class helpers can no more

   access private members. See http://stackoverflow.com/a/9410717/976391
  • Loading branch information...
1 parent d1a5440 commit 1999bd6e827904242396fdf800aa4b5822fdfd71 @the-Arioch the-Arioch committed Oct 3, 2016
Showing with 6 additions and 2 deletions.
  1. +6 −2 OEncoding.pas
View
@@ -195,10 +195,13 @@ TEncodingHelper = class helper for TEncoding
aDefaultEncoding: TEncoding): Integer; overload;
function GetBOM: TEncodingBuffer;
end;
+ {$IF NOT DEFINED(O_DELPHI_XE2_UP)}
TMBCSEncodingHelper = class helper for TMBCSEncoding
public
function GetCodePage: Cardinal;
+ property CodePage: Cardinal read GetCodePage;
end;
+ {$IFEND}
{$IFEND}
implementation
@@ -868,7 +871,7 @@ function TEncodingHelper.GetBOM: TEncodingBuffer;
function TEncodingHelper.EncodingCodePage: Cardinal;
begin
if Self is TMBCSEncoding then
- Result := TMBCSEncoding(Self).GetCodePage
+ Result := TMBCSEncoding(Self).CodePage
else if Self is TUnicodeEncoding then
Result := CP_UNICODE
else if Self is TBigEndianUnicodeEncoding then
@@ -877,12 +880,13 @@ function TEncodingHelper.EncodingCodePage: Cardinal;
Result := 0;
end;
+{$IF NOT DEFINED(O_DELPHI_XE2_UP)}
{ TMBCSEncodingHelper }
-
function TMBCSEncodingHelper.GetCodePage: Cardinal;
begin
Result := Self.FCodePage;
end;
+ {$IFEND}
{$IFEND}
{$IFNDEF O_DELPHI_2009_UP}

0 comments on commit 1999bd6

Please sign in to comment.