|
@@ -166,8 +166,8 @@ uses Views,WConsts,WUtils,WViews,WHTMLScn;
|
|
|
|
|
|
procedure THTMLAnsiConsole.GotoXY(X,Y : integer);
|
|
procedure THTMLAnsiConsole.GotoXY(X,Y : integer);
|
|
begin
|
|
begin
|
|
- if X>MaxX then MaxX:=X;
|
|
|
|
- if Y>MaxY then MaxY:=Y;
|
|
|
|
|
|
+ if X>MaxX then MaxX:=X-1;
|
|
|
|
+ if Y>MaxY then MaxY:=Y-1;
|
|
inherited GotoXY(X,Y);
|
|
inherited GotoXY(X,Y);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -196,6 +196,7 @@ end;
|
|
procedure THTMLAnsiView.CopyToHTML;
|
|
procedure THTMLAnsiView.CopyToHTML;
|
|
var
|
|
var
|
|
Attr,NewAttr : byte;
|
|
Attr,NewAttr : byte;
|
|
|
|
+ c : char;
|
|
X,Y,Pos : longint;
|
|
X,Y,Pos : longint;
|
|
begin
|
|
begin
|
|
Attr:=(Buffer^[1] shr 8);
|
|
Attr:=(Buffer^[1] shr 8);
|
|
@@ -203,7 +204,7 @@ begin
|
|
HTMLOwner^.AddText(hscTextAttr+chr(Attr));
|
|
HTMLOwner^.AddText(hscTextAttr+chr(Attr));
|
|
for Y:=0 to HTMLConsole^.MaxY-1 do
|
|
for Y:=0 to HTMLConsole^.MaxY-1 do
|
|
begin
|
|
begin
|
|
- for X:=1 to HTMLConsole^.MaxX-1 do
|
|
|
|
|
|
+ for X:=0 to HTMLConsole^.MaxX-1 do
|
|
begin
|
|
begin
|
|
Pos:=(Delta.Y*MaxViewWidth)+X+Y*MaxViewWidth;
|
|
Pos:=(Delta.Y*MaxViewWidth)+X+Y*MaxViewWidth;
|
|
NewAttr:=(Buffer^[Pos] shr 8);
|
|
NewAttr:=(Buffer^[Pos] shr 8);
|
|
@@ -212,8 +213,16 @@ begin
|
|
Attr:=NewAttr;
|
|
Attr:=NewAttr;
|
|
HTMLOwner^.AddText(hscTextAttr+chr(Attr));
|
|
HTMLOwner^.AddText(hscTextAttr+chr(Attr));
|
|
end;
|
|
end;
|
|
- HTMLOwner^.AddChar(chr(Buffer^[Pos] and $ff));
|
|
|
|
|
|
+ c:= chr(Buffer^[Pos] and $ff);
|
|
|
|
+ if ord(c)>16 then
|
|
|
|
+ HTMLOwner^.AddChar(c)
|
|
|
|
+ else
|
|
|
|
+ HTMLOwner^.AddChar('*');
|
|
end;
|
|
end;
|
|
|
|
+ { Write start of next line in normal color, for correct alignment }
|
|
|
|
+ HTMLOwner^.AddChar(hscNormText);
|
|
|
|
+ { Force to set attr again at start of next line }
|
|
|
|
+ Attr:=0;
|
|
HTMLOwner^.AddChar(hscLineBreak);
|
|
HTMLOwner^.AddChar(hscLineBreak);
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
@@ -910,7 +919,10 @@ end;
|
|
END.
|
|
END.
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.2 2001-09-18 11:33:53 pierre
|
|
|
|
|
|
+ Revision 1.3 2002-03-20 17:16:11 pierre
|
|
|
|
+ * correct some ansii file conversion problems
|
|
|
|
+
|
|
|
|
+ Revision 1.2 2001/09/18 11:33:53 pierre
|
|
* fix Previous Help Topic
|
|
* fix Previous Help Topic
|
|
|
|
|
|
Revision 1.1 2001/08/04 11:30:25 peter
|
|
Revision 1.1 2001/08/04 11:30:25 peter
|