mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-10 07:30:16 +01:00
fixes for debugging
git-svn-id: trunk@3166 -
This commit is contained in:
parent
f0590fba4f
commit
ae12a98a40
@ -1257,7 +1257,7 @@ begin
|
|||||||
// insert all nodes of specific type
|
// insert all nodes of specific type
|
||||||
while ANodeExt<>nil do begin
|
while ANodeExt<>nil do begin
|
||||||
IsVariable:=NodeExtIsVariable(ANodeExt);
|
IsVariable:=NodeExtIsVariable(ANodeExt);
|
||||||
if (ord(PartType)=ANodeExt.Flags) then begin
|
if (cardinal(ord(PartType))=ANodeExt.Flags) then begin
|
||||||
// search a destination section
|
// search a destination section
|
||||||
if NodeExtIsPrivate(ANodeExt) then begin
|
if NodeExtIsPrivate(ANodeExt) then begin
|
||||||
// search a privat section in front of the node
|
// search a privat section in front of the node
|
||||||
|
|||||||
@ -1092,7 +1092,7 @@ end;
|
|||||||
|
|
||||||
function TDOMCharacterData.SubstringData(offset, count: LongWord): DOMString;
|
function TDOMCharacterData.SubstringData(offset, count: LongWord): DOMString;
|
||||||
begin
|
begin
|
||||||
if (offset < 0) or (offset > Length) or (count < 0) then
|
if (offset < 0) or (longint(offset) > Length) or (count < 0) then
|
||||||
raise EDOMIndexSize.Create('CharacterData.SubstringData');
|
raise EDOMIndexSize.Create('CharacterData.SubstringData');
|
||||||
Result := Copy(FNodeValue, offset + 1, count);
|
Result := Copy(FNodeValue, offset + 1, count);
|
||||||
end;
|
end;
|
||||||
@ -1104,7 +1104,7 @@ end;
|
|||||||
|
|
||||||
procedure TDOMCharacterData.InsertData(offset: LongWord; const arg: DOMString);
|
procedure TDOMCharacterData.InsertData(offset: LongWord; const arg: DOMString);
|
||||||
begin
|
begin
|
||||||
if (offset < 0) or (offset > Length) then
|
if (offset < 0) or (longint(offset) > Length) then
|
||||||
raise EDOMIndexSize.Create('CharacterData.InsertData');
|
raise EDOMIndexSize.Create('CharacterData.InsertData');
|
||||||
|
|
||||||
FNodeValue := Copy(FNodeValue, 1, offset) + arg +
|
FNodeValue := Copy(FNodeValue, 1, offset) + arg +
|
||||||
@ -1113,7 +1113,7 @@ end;
|
|||||||
|
|
||||||
procedure TDOMCharacterData.DeleteData(offset, count: LongWord);
|
procedure TDOMCharacterData.DeleteData(offset, count: LongWord);
|
||||||
begin
|
begin
|
||||||
if (offset < 0) or (offset > Length) or (count < 0) then
|
if (offset < 0) or (longint(offset) > Length) or (count < 0) then
|
||||||
raise EDOMIndexSize.Create('CharacterData.DeleteData');
|
raise EDOMIndexSize.Create('CharacterData.DeleteData');
|
||||||
|
|
||||||
FNodeValue := Copy(FNodeValue, 1, offset) +
|
FNodeValue := Copy(FNodeValue, 1, offset) +
|
||||||
@ -1511,7 +1511,7 @@ end;
|
|||||||
|
|
||||||
function TDOMText.SplitText(offset: LongWord): TDOMText;
|
function TDOMText.SplitText(offset: LongWord): TDOMText;
|
||||||
begin
|
begin
|
||||||
if offset > Length then
|
if longint(offset) > Length then
|
||||||
raise EDOMIndexSize.Create('Text.SplitText');
|
raise EDOMIndexSize.Create('Text.SplitText');
|
||||||
|
|
||||||
Result := TDOMText.Create(FOwnerDocument);
|
Result := TDOMText.Create(FOwnerDocument);
|
||||||
@ -1633,6 +1633,9 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.6 2002/08/18 16:50:09 mattias
|
||||||
|
fixes for debugging
|
||||||
|
|
||||||
Revision 1.5 2002/12/18 17:52:18 mattias
|
Revision 1.5 2002/12/18 17:52:18 mattias
|
||||||
fixed lazarus xml files for fpc 1.1
|
fixed lazarus xml files for fpc 1.1
|
||||||
|
|
||||||
|
|||||||
@ -1946,7 +1946,7 @@ function TRegExpr.CompileRegExpr (exp : PRegExprChar) : boolean;
|
|||||||
// of the structure of the compiled regexp.
|
// of the structure of the compiled regexp.
|
||||||
var
|
var
|
||||||
scan, longest : PRegExprChar;
|
scan, longest : PRegExprChar;
|
||||||
len : cardinal;
|
len : integer;
|
||||||
flags : integer;
|
flags : integer;
|
||||||
begin
|
begin
|
||||||
Result := false; // life too dark
|
Result := false; // life too dark
|
||||||
|
|||||||
@ -90,7 +90,7 @@ type
|
|||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure BeginUpdate;
|
procedure BeginUpdate;
|
||||||
procedure EndUpdate;
|
procedure EndUpdate;
|
||||||
procedure Update;
|
procedure UpdateDlg;
|
||||||
function FilenameIsValidForFileIndex(Filename: string;
|
function FilenameIsValidForFileIndex(Filename: string;
|
||||||
Index: integer): boolean;
|
Index: integer): boolean;
|
||||||
public
|
public
|
||||||
@ -231,26 +231,26 @@ procedure TInputFileDialog.SetFileDescriptions(Index: integer;
|
|||||||
const AValue: string);
|
const AValue: string);
|
||||||
begin
|
begin
|
||||||
FFileDescs[Index]:=AValue;
|
FFileDescs[Index]:=AValue;
|
||||||
Update;
|
UpdateDlg;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TInputFileDialog.SetFileTitles(Index: integer; const AValue: string);
|
procedure TInputFileDialog.SetFileTitles(Index: integer; const AValue: string);
|
||||||
begin
|
begin
|
||||||
FFileTitles[Index]:=AValue;
|
FFileTitles[Index]:=AValue;
|
||||||
Update;
|
UpdateDlg;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TInputFileDialog.SetFileFlags(Index: integer;
|
procedure TInputFileDialog.SetFileFlags(Index: integer;
|
||||||
const AValue: TInputFileFlags);
|
const AValue: TInputFileFlags);
|
||||||
begin
|
begin
|
||||||
FFileFlags[Index]:=AValue;
|
FFileFlags[Index]:=AValue;
|
||||||
Update;
|
UpdateDlg;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TInputFileDialog.SetFilenames(Index: integer; const AValue: string);
|
procedure TInputFileDialog.SetFilenames(Index: integer; const AValue: string);
|
||||||
begin
|
begin
|
||||||
FFileNames[Index]:=AValue;
|
FFileNames[Index]:=AValue;
|
||||||
Update;
|
UpdateDlg;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TInputFileDialog.SetTransferMacros(const AValue: TTransferMacroList);
|
procedure TInputFileDialog.SetTransferMacros(const AValue: TTransferMacroList);
|
||||||
@ -258,7 +258,7 @@ begin
|
|||||||
FTransferMacros:=AValue;
|
FTransferMacros:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TInputFileDialog.Update;
|
procedure TInputFileDialog.UpdateDlg;
|
||||||
begin
|
begin
|
||||||
if (FUpdateCount<>0) or (not UpdateNeeded) then exit;
|
if (FUpdateCount<>0) or (not UpdateNeeded) then exit;
|
||||||
CreateInputComponents;
|
CreateInputComponents;
|
||||||
@ -617,7 +617,7 @@ begin
|
|||||||
if FUpdateCount<=0 then exit;
|
if FUpdateCount<=0 then exit;
|
||||||
dec(FUpdateCount);
|
dec(FUpdateCount);
|
||||||
if FUpdateCount=0 then
|
if FUpdateCount=0 then
|
||||||
Update;
|
UpdateDlg;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -161,13 +161,13 @@ end;
|
|||||||
|
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TCanvas.CreateFont;
|
procedure TCanvas.CreateFont;
|
||||||
var OldHandle: HPEN;
|
var OldHandle: HFONT;
|
||||||
begin
|
begin
|
||||||
OldHandle:=SelectObject(FHandle, Font.Handle);
|
OldHandle:=SelectObject(FHandle, Font.Handle);
|
||||||
if (OldHandle<>Font.Handle) and (FSavedFontHandle=0) then
|
if (OldHandle<>Font.Handle) and (FSavedFontHandle=0) then
|
||||||
FSavedFontHandle:=OldHandle;
|
FSavedFontHandle:=OldHandle;
|
||||||
Include(FState, csFontValid);
|
Include(FState, csFontValid);
|
||||||
SetTextColor(FHandle, Font.Color);
|
SetTextColor(FHandle, TColorRef(Font.Color));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -1066,15 +1066,16 @@ procedure TCanvas.RequiredState(ReqState: TCanvasState);
|
|||||||
var
|
var
|
||||||
Needed: TCanvasState;
|
Needed: TCanvasState;
|
||||||
begin
|
begin
|
||||||
//writeln('[TCanvas.RequiredState] ',csHandleValid in ReqState,' ',csHandleValid in FState);
|
|
||||||
Needed := ReqState - FState;
|
Needed := ReqState - FState;
|
||||||
|
//writeln('[TCanvas.RequiredState] ',ClassName,' ',csHandleValid in ReqState,' ',csHandleValid in FState,' Needed=',Needed<>[]);
|
||||||
if Needed <> [] then
|
if Needed <> [] then
|
||||||
begin
|
begin
|
||||||
|
//writeln('[TCanvas.RequiredState] B ',ClassName,' ',csHandleValid in Needed,',',csFontValid in Needed,',',csPenValid in Needed,',',csBrushValid in Needed);
|
||||||
if csHandleValid in Needed then
|
if csHandleValid in Needed then
|
||||||
begin
|
begin
|
||||||
CreateHandle;
|
CreateHandle;
|
||||||
if FHandle = 0
|
if FHandle = 0 then
|
||||||
then raise EInvalidOperation.Create(rsCanvasDoesNotAllowDrawing);
|
raise EInvalidOperation.Create(rsCanvasDoesNotAllowDrawing);
|
||||||
Include(FState, csHandleValid);
|
Include(FState, csHandleValid);
|
||||||
end;
|
end;
|
||||||
if csFontValid in Needed then CreateFont;
|
if csFontValid in Needed then CreateFont;
|
||||||
@ -1096,20 +1097,12 @@ end;
|
|||||||
Gets the width and height of a text
|
Gets the width and height of a text
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TCanvas.TextExtent(const Text: string): TSize;
|
function TCanvas.TextExtent(const Text: string): TSize;
|
||||||
var
|
|
||||||
pStr: PChar;
|
|
||||||
begin
|
begin
|
||||||
Result.cX := 0;
|
Result.cX := 0;
|
||||||
Result.cY := 0;
|
Result.cY := 0;
|
||||||
|
if Text='' then exit;
|
||||||
RequiredState([csHandleValid, csFontValid]);
|
RequiredState([csHandleValid, csFontValid]);
|
||||||
|
GetTextExtentPoint(FHandle, PChar(Text), Length(Text), Result);
|
||||||
pStr := StrAlloc(Length(Text)+1);
|
|
||||||
try
|
|
||||||
StrPCopy(pStr, Text);
|
|
||||||
GetTextExtentPoint(FHandle, pStr, Length(Text), Result);
|
|
||||||
finally
|
|
||||||
StrDispose(PStr);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -1169,6 +1162,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.47 2002/08/18 16:50:09 mattias
|
||||||
|
fixes for debugging
|
||||||
|
|
||||||
Revision 1.46 2002/08/18 04:57:01 mattias
|
Revision 1.46 2002/08/18 04:57:01 mattias
|
||||||
fixed csDashDot
|
fixed csDashDot
|
||||||
|
|
||||||
|
|||||||
@ -1354,7 +1354,7 @@ begin
|
|||||||
while (n > 0) do begin
|
while (n > 0) do begin
|
||||||
dec (n);
|
dec (n);
|
||||||
TimerInfo := PGtkITimerinfo(FTimerData.Items[n]);
|
TimerInfo := PGtkITimerinfo(FTimerData.Items[n]);
|
||||||
if (TimerInfo^.TimerHandle=TimerHandle) then
|
if (TimerInfo^.TimerHandle=guint(TimerHandle)) then
|
||||||
begin
|
begin
|
||||||
{$IFDEF VerboseTimer}
|
{$IFDEF VerboseTimer}
|
||||||
writeln('TGTKObject.KillTimer TimerInfo=',HexStr(Cardinal(TimerInfo),8),' TimerHandle=',TimerHandle,' CurTimerCount=',FTimerData.Count,' OldTimerCount=',FOldTimerData.Count);
|
writeln('TGTKObject.KillTimer TimerInfo=',HexStr(Cardinal(TimerInfo),8),' TimerHandle=',TimerHandle,' CurTimerCount=',FTimerData.Count,' OldTimerCount=',FOldTimerData.Count);
|
||||||
@ -7420,6 +7420,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.380 2002/08/18 16:50:09 mattias
|
||||||
|
fixes for debugging
|
||||||
|
|
||||||
Revision 1.379 2002/08/18 04:57:01 mattias
|
Revision 1.379 2002/08/18 04:57:01 mattias
|
||||||
fixed csDashDot
|
fixed csDashDot
|
||||||
|
|
||||||
|
|||||||
@ -571,7 +571,7 @@ begin
|
|||||||
clWindow,
|
clWindow,
|
||||||
clWindowText,
|
clWindowText,
|
||||||
clMenuText,
|
clMenuText,
|
||||||
clGrayText ://should never have a BK Pixmap
|
clGrayText://should never have a BK Pixmap
|
||||||
EnsureAsGCValues;
|
EnsureAsGCValues;
|
||||||
else
|
else
|
||||||
EnsureAsColor;
|
EnsureAsColor;
|
||||||
@ -4259,6 +4259,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.186 2002/08/18 16:50:09 mattias
|
||||||
|
fixes for debugging
|
||||||
|
|
||||||
Revision 1.185 2002/08/17 23:41:35 mattias
|
Revision 1.185 2002/08/17 23:41:35 mattias
|
||||||
many clipping fixes
|
many clipping fixes
|
||||||
|
|
||||||
|
|||||||
@ -587,7 +587,7 @@ function TgtkObject.ClipboardGetOwnerShip(ClipboardType: TClipboardType;
|
|||||||
Formats: PClipboardFormat): boolean;
|
Formats: PClipboardFormat): boolean;
|
||||||
var TargetEntries: PGtkTargetEntry;
|
var TargetEntries: PGtkTargetEntry;
|
||||||
|
|
||||||
function IsFormatSupported(FormatID: integer): boolean;
|
function IsFormatSupported(FormatID: cardinal): boolean;
|
||||||
var i: integer;
|
var i: integer;
|
||||||
begin
|
begin
|
||||||
if FormatID=0 then begin
|
if FormatID=0 then begin
|
||||||
@ -1199,8 +1199,9 @@ begin
|
|||||||
' Bits=',HexStr(Cardinal(Bits),8),' MemSize(Bits)=',MemSize(Bits),
|
' Bits=',HexStr(Cardinal(Bits),8),' MemSize(Bits)=',MemSize(Bits),
|
||||||
' biBitCount=',biBitCount);}
|
' biBitCount=',biBitCount);}
|
||||||
If BitSize <= 0 then
|
If BitSize <= 0 then
|
||||||
BitSize := SizeOf(Byte)*(Longint(biSizeImage) div biHeight)
|
BitSize := longint(SizeOf(Byte))
|
||||||
*(NumScans + StartScan);
|
*(longint(biSizeImage) div biHeight)
|
||||||
|
*longint(NumScans + StartScan);
|
||||||
If MemSize(Bits) < BitSize then begin
|
If MemSize(Bits) < BitSize then begin
|
||||||
writeln('WARNING: [TgtkObject.InternalGetDIBits] not enough memory allocated for Bits!');
|
writeln('WARNING: [TgtkObject.InternalGetDIBits] not enough memory allocated for Bits!');
|
||||||
exit;
|
exit;
|
||||||
@ -1246,7 +1247,7 @@ begin
|
|||||||
if Y<=0 then break;
|
if Y<=0 then break;
|
||||||
end else begin
|
end else begin
|
||||||
inc(y);
|
inc(y);
|
||||||
if Y>=NumScans - 1 then break;
|
if Y>=longint(NumScans) - 1 then break;
|
||||||
end;
|
end;
|
||||||
until false;
|
until false;
|
||||||
end
|
end
|
||||||
@ -1979,17 +1980,17 @@ function TgtkObject.ComboBoxDropDown(Handle: HWND; DropDown: boolean): boolean;
|
|||||||
list_requisition^.height := list_requisition^.height + EMPTY_LIST_HEIGHT;
|
list_requisition^.height := list_requisition^.height + EMPTY_LIST_HEIGHT;
|
||||||
|
|
||||||
alloc_width := (widget^.allocation.width -
|
alloc_width := (widget^.allocation.width -
|
||||||
2 * PGtkStyle(popwin^.child^.thestyle)^.klass^.xthickness -
|
2 * cardinal(PGtkStyle(popwin^.child^.thestyle)^.klass^.xthickness) -
|
||||||
2 * border_width(GTK_CONTAINER (popwin^.child)^) -
|
2 * border_width(GTK_CONTAINER (popwin^.child)^) -
|
||||||
2 * border_width(GTK_CONTAINER (combo^.popup)^) -
|
2 * border_width(GTK_CONTAINER (combo^.popup)^) -
|
||||||
2 * border_width(GTK_CONTAINER (GTK_BIN (popup)^.child)^) -
|
2 * border_width(GTK_CONTAINER (GTK_BIN (popup)^.child)^) -
|
||||||
2 * PGtkStyle(GTK_BIN (popup)^.child^.thestyle)^.klass^.xthickness);
|
2 * cardinal(PGtkStyle(GTK_BIN(popup)^.child^.thestyle)^.klass^.xthickness));
|
||||||
|
|
||||||
work_height := (2 * (PGtkStyle(popwin^.child^.thestyle)^.klass^.ythickness) +
|
work_height := (2 * cardinal(PGtkStyle(popwin^.child^.thestyle)^.klass^.ythickness) +
|
||||||
2 * border_width(GTK_CONTAINER (popwin^.child)^) +
|
2 * border_width(GTK_CONTAINER (popwin^.child)^) +
|
||||||
2 * border_width(GTK_CONTAINER (combo^.popup)^) +
|
2 * border_width(GTK_CONTAINER (combo^.popup)^) +
|
||||||
2 * border_width(GTK_CONTAINER (GTK_BIN (popup)^.child)^) +
|
2 * border_width(GTK_CONTAINER (GTK_BIN (popup)^.child)^) +
|
||||||
2 * PGtkStyle(GTK_BIN (popup)^.child^.thestyle)^.klass^.xthickness);
|
2 * cardinal(PGtkStyle(GTK_BIN (popup)^.child^.thestyle)^.klass^.xthickness));
|
||||||
|
|
||||||
repeat
|
repeat
|
||||||
okay_to_exit := True;
|
okay_to_exit := True;
|
||||||
@ -4809,7 +4810,6 @@ var
|
|||||||
UseFont : PGDKFont;
|
UseFont : PGDKFont;
|
||||||
UnRef : Boolean;
|
UnRef : Boolean;
|
||||||
begin
|
begin
|
||||||
Assert(False, 'trace:> [TgtkObject.GetTextExtentPoint]');
|
|
||||||
Result := IsValidDC(DC);
|
Result := IsValidDC(DC);
|
||||||
if Result
|
if Result
|
||||||
then with TDeviceContext(DC) do
|
then with TDeviceContext(DC) do
|
||||||
@ -8436,6 +8436,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.249 2002/08/18 16:50:09 mattias
|
||||||
|
fixes for debugging
|
||||||
|
|
||||||
Revision 1.248 2002/08/18 04:57:01 mattias
|
Revision 1.248 2002/08/18 04:57:01 mattias
|
||||||
fixed csDashDot
|
fixed csDashDot
|
||||||
|
|
||||||
|
|||||||
@ -270,10 +270,10 @@ begin
|
|||||||
case fCaseSensitive of
|
case fCaseSensitive of
|
||||||
True:
|
True:
|
||||||
for I:= Len -1 downto 0 do
|
for I:= Len -1 downto 0 do
|
||||||
inc(Result, Ord(P[I]) shl I);
|
inc(Result, cardinal(ord(P[I])) shl I);
|
||||||
False:
|
False:
|
||||||
for I:= Len -1 downto 0 do
|
for I:= Len -1 downto 0 do
|
||||||
inc(Result, ord(UpperCaseChars[P[I]]) shl I);
|
inc(Result, cardinal(ord(UpperCaseChars[P[I]])) shl I);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user