LCL Win32: take care of more clipboard formats. Issue #20089, patch from Flávio Etrusco

git-svn-id: trunk@32726 -
This commit is contained in:
juha 2011-10-07 07:23:49 +00:00
parent 1acfc93cd4
commit ae0edb7828

View File

@ -328,11 +328,15 @@ begin
Result := 'audio/riff';
CF_SYLK:
Result := 'application/x-ms-shortcut';
CF_LOCALE:
Result := 'application/x-ms-locale';
CF_OEMTEXT:
Result := 'application/x-ms-oemtext';
else
SetLength(Result,1000);
FormatLength:= Windows.GetClipboardFormatName(FormatID, PChar(Result), 1000);
if FormatLength = 0 then
raise Exception.Create('Unknown clipboard format');
raise Exception.CreateFmt('Unknown clipboard format: %d', [FormatID]);
SetLength(Result,FormatLength);
{$IFDEF VerboseWin32Clipbrd}
debugln('TWin32WidgetSet.ClipboardFormatToMimeType FormatID=',dbgs(FormatID),' ',Result);