LCL: check for Interfaces unit for clipboard. It can be missing when clipboard is used in cmd line prog and LCL dependency added manually.

git-svn-id: trunk@42446 -
This commit is contained in:
juha 2013-08-22 11:56:14 +00:00
parent ae48b1dba1
commit 1461a91522

View File

@ -47,7 +47,7 @@ uses
{$IFDEF UNIX}Unix, {$ENDIF}
{$IFDEF Darwin}MacOSAll, {$ENDIF}
Types, Math, Classes, SysUtils, LCLType, LCLProc, GraphType, InterfaceBase,
LResources, FileUtil, UTF8Process, Maps, LMessages, lazutf8sysutils;
LResources, FileUtil, UTF8Process, Maps, LMessages, lazutf8sysutils, LCLStrConsts;
{$ifdef Trace}
{$ASSERTIONS ON}
@ -59,8 +59,7 @@ uses
// All interface communication (Our additions)
{$I lclintfh.inc}
function PredefinedClipboardFormat(
AFormat: TPredefinedClipboardFormat): TClipboardFormat;
function PredefinedClipboardFormat(AFormat: TPredefinedClipboardFormat): TClipboardFormat;
function MsgKeyDataToShiftState(KeyData: PtrInt): TShiftState;
@ -178,12 +177,14 @@ end;
{$ENDIF}
function PredefinedClipboardFormat(AFormat: TPredefinedClipboardFormat
): TClipboardFormat;
function PredefinedClipboardFormat(AFormat: TPredefinedClipboardFormat): TClipboardFormat;
begin
if FPredefinedClipboardFormats[AFormat]=0 then
if FPredefinedClipboardFormats[AFormat]=0 then begin
if WidgetSet=nil then
raise Exception.Create(rsNoWidgetSet);
FPredefinedClipboardFormats[AFormat]:=
ClipboardRegisterFormat(PredefinedClipboardMimeTypes[AFormat]);
end;
Result:=FPredefinedClipboardFormats[AFormat];
end;