LCL: carbon: less hints, patch #27433

git-svn-id: trunk@47684 -
This commit is contained in:
mattias 2015-02-10 16:23:50 +00:00
parent c2545d0502
commit 6f0e7b8208
4 changed files with 8 additions and 8 deletions

View File

@ -401,7 +401,7 @@ var
implementation
uses
CarbonInt, CarbonProc, CarbonCanvas, CarbonDbgConsts;
LazUTF8, CarbonInt, CarbonProc, CarbonCanvas, CarbonDbgConsts;
const
BITMAPINFOMAP: array[TCarbonBitmapType] of CGBitmapInfo = (
@ -1067,7 +1067,7 @@ var
PValue: ATSUAttributeValuePtr;
begin
// keep copy of text
FTextBuffer := UTF8ToUTF16(Text);
FTextBuffer := LazUTF8.UTF8ToUTF16(Text);
if FTextBuffer='' then
FTextBuffer:=#0#0;
TextStyle := Font.Style;

View File

@ -330,7 +330,7 @@ const
implementation
uses InterfaceBase, CarbonInt, CarbonProc, CarbonDbgConsts, CarbonUtils, CarbonCanvas, CarbonCaret;
uses LazUTF8, InterfaceBase, CarbonInt, CarbonProc, CarbonDbgConsts, CarbonUtils, CarbonCanvas, CarbonCaret;
var
// recursive number of draw events called by OSX

View File

@ -557,7 +557,7 @@ const
if TextLen>0 then begin
u:=UTF16CharacterToUnicode(@WideBuf[1],CharLen);
if CharLen>0 then begin
UTF8VKCharacter:=UnicodeToUTF8(u);
UTF8VKCharacter:=LazUTF8.UnicodeToUTF8(u);
if (UTF8VKCharacter<>'') and (ord(Utf8VKCharacter[1])<=127) then //It's (true) ascii.
VKKeyChar:=Utf8VKCharacter[1]
else //not ascii, get the Mac character.
@ -612,7 +612,7 @@ const
u:=UTF16CharacterToUnicode(@WideBuf[1],CharLen);
if CharLen=0 then exit;
UTF8Character:=UnicodeToUTF8(u);
UTF8Character:=LazUTF8.UnicodeToUTF8(u);
if (UTF8Character<>'') and (ord(Utf8Character[1])<=127) then //It's (true) ascii.
KeyChar:=Utf8Character[1]
@ -705,7 +705,7 @@ const
begin
if AUTF8Char='' then Exit;
// only one character should be used
WideBuf:={%H-}UTF8Encode(UTF8Copy(AUTF8Char, 1,1));
WideBuf:={%H-}UTF8Encode(LazUTF8.UTF8Copy(AUTF8Char, 1,1));
Result:=(length(WideBuf)>0) and
(not OSError(SetEventParameter(AEvent, kEventParamKeyUnicodes, typeUnicodeText,
length(WideBuf)*2, @WideBuf[1]), SName, ASetEvent, 'kEventParamKeyUnicodes'));

View File

@ -2410,8 +2410,8 @@ function TCarbonWidgetSet.GradientFill(DC: HDC; Vertices: PTriVertex;
with Mesh do
begin
Result :=
(UpperLeft < Cardinal(NumVertices)) and (UpperLeft >= 0) and
(LowerRight < Cardinal(NumVertices)) and (LowerRight >= 0);
(UpperLeft < Cardinal(NumVertices)) {and (UpperLeft >= 0)} and
(LowerRight < Cardinal(NumVertices)) {and (LowerRight >= 0)};
if (LowerRight = UpperLeft) or not Result then
Exit;