mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 09:49:22 +02:00
LazReport, added some tolerance on object aligment when exporting to csv
git-svn-id: trunk@22754 -
This commit is contained in:
parent
563838d75d
commit
7160777502
@ -44,6 +44,9 @@ implementation
|
|||||||
|
|
||||||
uses LR_Const;
|
uses LR_Const;
|
||||||
|
|
||||||
|
const
|
||||||
|
FIELD_GRAIN = 32; // granularity of fields when converting pixel positions
|
||||||
|
|
||||||
constructor TfrCSVExportFilter.Create(AStream: TStream);
|
constructor TfrCSVExportFilter.Create(AStream: TStream);
|
||||||
begin
|
begin
|
||||||
inherited Create(AStream);
|
inherited Create(AStream);
|
||||||
@ -97,7 +100,7 @@ begin
|
|||||||
for j := 0 to FIntervals.Count-1 do
|
for j := 0 to FIntervals.Count-1 do
|
||||||
begin
|
begin
|
||||||
|
|
||||||
if (P <> nil) and (P^.X = PtrInt(FIntervals[j])) then
|
if (P <> nil) and ((P^.X div FIELD_GRAIN) = PtrInt(FIntervals[j])) then
|
||||||
begin
|
begin
|
||||||
Str := p^.Text;
|
Str := p^.Text;
|
||||||
p := p^.Next;
|
p := p^.Next;
|
||||||
@ -120,6 +123,7 @@ procedure TfrCSVExportFilter.OnText(X, Y: Integer; const Text: String;
|
|||||||
View: TfrView);
|
View: TfrView);
|
||||||
begin
|
begin
|
||||||
inherited OnText(X, Y, Text, View);
|
inherited OnText(X, Y, Text, View);
|
||||||
|
x := x div FIELD_GRAIN;
|
||||||
if FIntervals.IndexOf(pointer(ptrint(x)))<0 then
|
if FIntervals.IndexOf(pointer(ptrint(x)))<0 then
|
||||||
FIntervals.Add(pointer(ptrint(x)));
|
FIntervals.Add(pointer(ptrint(x)));
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user