|
@@ -33,13 +33,13 @@ Type
|
|
|
Class Property Instance : TFresnelClipBoard Read GetInstance;
|
|
|
Public
|
|
|
Function GetContentTypes : TStringDynArray;
|
|
|
- // aMimetype is "text/text" or "text", in which case it is assumed to be the first part.
|
|
|
+ // aMimetype is "text/plain" or "text", in which case it is assumed to be the first part.
|
|
|
Function HasType(const aMimeType : string) : boolean;
|
|
|
// Get clipboard data. aMimetype has the same form as HasType. Returns the exact type.
|
|
|
// For example Get
|
|
|
function GetAsType(const aMimeType : string; out aContents : TBytes) : string;
|
|
|
procedure SetAsType(const aMimeType : string; aContents : TBytes);
|
|
|
- function HasText(strict : boolean) : Boolean;
|
|
|
+ function HasText(strict : boolean = True) : Boolean;
|
|
|
Property AsText : String Read GetAsText Write SetAsText;
|
|
|
end;
|
|
|
TFLClipBoard = TFresnelClipBoard;
|
|
@@ -64,7 +64,7 @@ var
|
|
|
lContent : TBytes;
|
|
|
|
|
|
begin
|
|
|
- if DoGetClipboardAsType('text',lContent)<>'' then
|
|
|
+ if DoGetClipboardAsType('text/plain',lContent)<>'' then
|
|
|
Result:=TEncoding.UTF8.GetAnsiString(lContent)
|
|
|
else
|
|
|
Result:='';
|
|
@@ -91,13 +91,13 @@ var
|
|
|
lContent : TBytes;
|
|
|
begin
|
|
|
lContent:=TEncoding.UTF8.GetAnsiBytes(aValue);
|
|
|
- DoSetClipboardAsType('text/text',lContent);
|
|
|
+ DoSetClipboardAsType('text/plain',lContent);
|
|
|
end;
|
|
|
|
|
|
function TFresnelClipBoard.GetContentTypes: TStringDynArray;
|
|
|
begin
|
|
|
Result:=[];
|
|
|
- DoGetContentTypes;
|
|
|
+ Result:=DoGetContentTypes;
|
|
|
end;
|
|
|
|
|
|
function TFresnelClipBoard.HasType(const aMimeType: string): boolean;
|
|
@@ -115,10 +115,10 @@ begin
|
|
|
DoSetClipboardAsType(aMimeType,aContents);
|
|
|
end;
|
|
|
|
|
|
-function TFresnelClipBoard.HasText(strict: boolean): Boolean;
|
|
|
+function TFresnelClipBoard.HasText(strict: boolean = True): Boolean;
|
|
|
begin
|
|
|
if Strict then
|
|
|
- Result:=DoHasClipboardType('text/text')
|
|
|
+ Result:=DoHasClipboardType('text/plain')
|
|
|
else
|
|
|
Result:=DoHasClipboardType('text')
|
|
|
end;
|