Skip to content

Commit

Permalink
Updated to version 11.7
Browse files Browse the repository at this point in the history
  • Loading branch information
BerndGabriel committed Sep 20, 2016
1 parent 322c8a4 commit 5691b8b
Show file tree
Hide file tree
Showing 18 changed files with 78 additions and 58 deletions.
Binary file added Demos/Compiled Framedemo/FrameBrowserDemoIcs.exe
Binary file not shown.
Binary file added Demos/Compiled Framedemo/FrameBrowserDemoId10.exe
Binary file not shown.
Binary file modified Demos/Compiled Framedemo/FrameDem.exe
Binary file not shown.
9 changes: 8 additions & 1 deletion Demos/Compiled Framedemo/whatsnew.htm
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,16 @@ <h5>Fixed</h5>
<li><a href="http://github.com/BerndGabriel/HtmlViewer/issues/129"> Github Issue #129</a>: NoTabLink is not working
<li><a href="http://github.com/BerndGabriel/HtmlViewer/issues/131"> Github Issue #131</a>: Cell borders in tables / last row wrong: ignore explicitly given cell-spacing, if border-collapse is collapse.
<li><a href="http://github.com/BerndGabriel/HtmlViewer/issues/132"> Github Issue #132</a>: Height parameter not honoured
<li><a href="http://github.com/BerndGabriel/HtmlViewer/issues/135"> Github Issue #135</a>: Paragraph alignment regression
<li><a href="http://github.com/BerndGabriel/HtmlViewer/issues/142"> Github Issue #142</a>: THtmlView on Linux overload WidgetSet.AppProcessMessages and prevent closing modal forms
<li><a href="http://github.com/BerndGabriel/HtmlViewer/issues/144"> Github Issue #144</a>: Clickable links at top of HtmlViewer after LoadFromString
<li><a href="http://github.com/BerndGabriel/HtmlViewer/issues/152"> Github Issue #152</a>: Error mapping table
<li><a href="http://github.com/BerndGabriel/HtmlViewer/issues/153"> Github Issue #153</a>: Table borders
<li><a href="http://github.com/BerndGabriel/HtmlViewer/issues/157"> Github Issue #157</a>: Error mapping table: error reading attributes with line breaks.
<li><a href="http://github.com/BerndGabriel/HtmlViewer/issues/161"> Github Issue #161</a>: XHTML file is opened without any content
<li>ThtDocument.InsertImage() now obeys attribute Transp
<li>ICO and CUR transparency without GDIPlus
<li>Transparency of animated GIFs in Lazarus (Windows).
<li>Transparency of animated GIFs in Lazarus.
<li>Floating blocks and images.
<li>Left and right aligned images both inside tables and outside tables are positioned correctly at last.
<li>Horizontal position of &lt;HR&gt;.
Expand Down
4 changes: 2 additions & 2 deletions source/BuffConv.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
HtmlViewer Version 11.6
Copyright (c) 2010-2015 by Bernd Gabriel
HtmlViewer Version 11.7
Copyright (c) 2010-2016 by Bernd Gabriel
This source module is based on code of CodeChangerDecode.pas written by SchwarzKopf-M (SchwarzKopf-M@yandex.ru)
and the source code library libiconv, which is published under the GNU Library General Public License.
Expand Down
4 changes: 2 additions & 2 deletions source/BuffConvArrays.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
HtmlViewer Version 11.5
Copyright (c) 2013-2014 by Bernd Gabriel
HtmlViewer Version 11.7
Copyright (c) 2013-2016 by Bernd Gabriel

This source module is adopted from CodeChangerDecodeMatrix.pas
written by SchwarzKopf-M (SchwarzKopf-M@yandex.ru).
Expand Down
3 changes: 2 additions & 1 deletion source/FrameViewerReg.pas
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
Version 11.5
Version 11.7
Copyright (c) 1995-2008 by L. David Baldwin
Copyright (c) 2008-2014 by HtmlViewer Team
Copyright (c) 2015-2016 by Bernd Gabriel
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion source/GDIPL2A.pas
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
Version 11.7
Copyright (c) 1995-2008 by L. David Baldwin
Copyright (c) 2008-2015 by HtmlViewer Team
Copyright (c) 2008-2016 by HtmlViewer Team
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion source/HTMLUn2.pas
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ interface
HtmlSymb;

const
VersionNo = '11.7pre';
VersionNo = '11.7';
MaxHScroll = 100000; {max horizontal display in pixels}
Tokenleng = 300;
TopLim = -200; {drawing limits}
Expand Down
4 changes: 2 additions & 2 deletions source/HtmlBuffer.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
HtmlViewer Version 11.6
Copyright (c) 2010-2015 by Bernd Gabriel
HtmlViewer Version 11.7
Copyright (c) 2010-2016 by Bernd Gabriel
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
5 changes: 2 additions & 3 deletions source/HtmlFonts.pas
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
Version 11.5
Version 11.7
Copyright (c) 1995-2008 by L. David Baldwin
Copyright (c) 2008-2010 by HtmlViewer Team
Copyright (c) 2011-2014 by Bernd Gabriel
Copyright (c) 2008-2016 by HtmlViewer Team
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
4 changes: 2 additions & 2 deletions source/Htmlsbs1.pas
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
Version 11.5
Version 11.7
Copyright (c) 1995-2008 by L. David Baldwin,
Copyright (c) 2008-2014 by HtmlViewer Team
Copyright (c) 2008-2016 by HtmlViewer Team
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
4 changes: 2 additions & 2 deletions source/StyleTypes.pas
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
Version 11.6
Version 11.7
Copyright (c) 1995-2008 by L. David Baldwin
Copyright (c) 2008-2010 by HtmlViewer Team
Copyright (c) 2011-2015 by Bernd Gabriel
Copyright (c) 2011-2016 by Bernd Gabriel
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
4 changes: 2 additions & 2 deletions source/StyleUn.pas
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
Version 11.6
Version 11.7
Copyright (c) 1995-2008 by L. David Baldwin,
Copyright (c) 2008-2015 by HtmlViewer Team
Copyright (c) 2008-2016 by HtmlViewer Team
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
4 changes: 2 additions & 2 deletions source/URLSubs.pas
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
Version 11.6
Version 11.7
Copyright (c) 1995-2008 by L. David Baldwin,
Copyright (c) 2008-2015 by HtmlViewer Team
Copyright (c) 2008-2016 by HtmlViewer Team
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
76 changes: 44 additions & 32 deletions source/UrlConn.pas
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@

{ Inspired by former UrlConId10.PAS written by Yves Urbain }

{$I htmlcons.inc}

unit UrlConn;

interface

uses
//Windows,
Classes, Contnrs, SysUtils, Forms,
URLSubs, HtmlGlobals, Types;
Classes, Types, Contnrs, SysUtils, Forms,
URLSubs, HtmlGlobals;

const
ChtMaxRunningThreadCount = 20;
Expand Down Expand Up @@ -93,13 +94,20 @@ ThtConnectionManager = class(TComponent)
// A ThtConnector descendant knows how to create connections for one or more
// protocols.
//
// To implement a new protocol derive one descentant from ThtConnector and
// To implement a new protocol derive one descendant from ThtConnector and
// another from ThtConnection.
//
// The ThtConnector descendant must override the following functions:
// GetDefaultProtocols() to tell the ThtConnectionManager which protocols it supports,
// GetVersion() to tell the application the ThtConnector's implementor and version and
// CreateConnection(const Protocol: String) which actually creates the connection for the given protocol.
//
// - GetDefaultProtocols()
// to tell the ThtConnectionManager which protocols it supports,
//
// - GetVersion()
// to tell the application the ThtConnector's implementor and version and
//
// - CreateConnection(const Protocol: String)
// which actually creates the connection for the given protocol.
//
// In case the connection may need authorization publish OnGetAuthorization
// rather than implementing another login/authorization dialog.
//------------------------------------------------------------------------------
Expand Down Expand Up @@ -132,13 +140,22 @@ ThtConnector = class(TComponent)
end;

//----------------------------------------------------------------------------
// A ThtConnection descendant just gets a document via LoadDoc(Doc: ThtUrlDoc)
// and knows how to create an appropriate ThtUrlDoc.
// A ThtConnection gets a document via LoadDoc(Doc: ThtUrlDoc)
//
// LoadDoc():
// When called at least Doc.Url must be filled.
// On return if Doc.Status is ucsLoaded Doc.Stream is filled with the loaded document.
// On return if Doc.Status is ucsInProgress the connection is loading the document asynchronously.
//
// The ThtConnection descendant must override the following function:
//
// - Get()
// to load document Doc.Url into Doc.Stream
//
// The ThtConnection descendant may override the following function:
//
// - CreateUrlDoc()
// to create an appropriate descendant of ThtUrlDoc.
//------------------------------------------------------------------------------

//-- BG -------------------------------------------------------- 18.05.2016 --
Expand Down Expand Up @@ -204,7 +221,6 @@ ThtConnection = class
ThtUrlDoc = class(TObject)
private
FUrl: String;
// FName: String;
FNewUrl: String;
FReferer: String;
FQuery: String;
Expand All @@ -217,16 +233,12 @@ ThtUrlDoc = class(TObject)
procedure SetNewUrl(const Value: String);
procedure SetStream(const Value: TStream);
function GetStreamSize: Int64;
// procedure SetName(const Value: String);
// procedure SetUrl(const Value: String);
public
destructor Destroy; override;
procedure Clear;
procedure SaveToFile(FileName: String);

// property Name: String read FName write SetName;

property Url: String read FUrl write FUrl; //SetUrl;
property Url: String read FUrl write FUrl;

property Status: ThtUrlDocStatus read FStatus write FStatus;
property DocType: ThtDocType read FDocType write FDocType;
Expand Down Expand Up @@ -268,7 +280,7 @@ ThtFileConnection = class(ThtConnection)
private
procedure MakeDirOutput(AStream : TStream; const ADirName : String);
protected
procedure Get(Doc: ThtUrlDoc); override;
procedure Get(ADoc: ThtUrlDoc); override;
end;

//-- BG -------------------------------------------------------- 18.05.2016 --
Expand All @@ -288,7 +300,7 @@ ThtFileConnector = class(ThtConnector)
//-- BG -------------------------------------------------------- 18.05.2016 --
ThtResourceConnection = class(ThtConnection)
protected
procedure Get(Doc: ThtUrlDoc); override;
procedure Get(ADoc: ThtUrlDoc); override;
end;

//-- BG -------------------------------------------------------- 18.05.2016 --
Expand Down Expand Up @@ -360,7 +372,7 @@ ThtUrlDocLoaderThreadList = class(TComponent)
procedure Terminated(Sender: TObject);
procedure StartNext;
public
constructor Create(Owner: TComponent); override;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function RunningCount: Integer;
function WaitingCount: Integer;
Expand Down Expand Up @@ -836,12 +848,12 @@ procedure ThtFileConnection.MakeDirOutput(AStream: TStream; const ADirName: Stri
end;

//-- BG ---------------------------------------------------------- 18.05.2016 --
procedure ThtFileConnection.Get(Doc: ThtUrlDoc);
procedure ThtFileConnection.Get(ADoc: ThtUrlDoc);
var
FileName, Ext : String;
I : integer;
begin
FileName := Doc.Url;
FileName := ADoc.Url;

{remove any query string as it's not certain how to respond to a Form
submit with a file protocol. The user can add a response if desired.}
Expand All @@ -859,18 +871,18 @@ procedure ThtFileConnection.Get(Doc: ThtUrlDoc);
FileName := HTMLtoDOS(FileName);
if DirectoryExists(FileName) then
begin
MakeDirOutput(Doc.Stream, FileName);
Doc.DocType := HTMLType;
MakeDirOutput(ADoc.Stream, FileName);
ADoc.DocType := HTMLType;
end
else
begin
Doc.Stream := TFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite);
ADoc.Stream := TFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite);
Ext := Lowercase(ExtractFileExt(FileName));
if Length(Ext) > 0 then
Delete(Ext, 1, 1);
Doc.DocType := FileExt2DocType(Ext);
ADoc.DocType := FileExt2DocType(Ext);
end;
Doc.Status := ucsLoaded;
ADoc.Status := ucsLoaded;

end;

Expand All @@ -897,14 +909,14 @@ class function ThtFileConnector.GetVersion: string;
{ ThtResourceConnection }

//-- BG ---------------------------------------------------------- 18.05.2016 --
procedure ThtResourceConnection.Get(Doc: ThtUrlDoc);
procedure ThtResourceConnection.Get(ADoc: ThtUrlDoc);
var
FileName, S, Ext: String;
HResInfo: HRSRC;
GoodType: PChar;
I: Integer;
begin
FileName := Doc.Url;
FileName := ADoc.Url;

{remove any query string as it's not certain how to respond to a Form
submit with a file protocol. The user can add a response if desired.}
Expand All @@ -919,8 +931,8 @@ procedure ThtResourceConnection.Get(Doc: ThtUrlDoc);
end;

Ext := LowerCase(GetURLExtension(FileName));
Doc.DocType := FileExt2DocType(Ext);
case Doc.DocType of
ADoc.DocType := FileExt2DocType(Ext);
case ADoc.DocType of
XHTMLType,
HTMLType: GoodType := 'HTML';
ImgType: GoodType := PChar(UpperCase(Ext));
Expand All @@ -942,10 +954,10 @@ procedure ThtResourceConnection.Get(Doc: ThtUrlDoc);
end;
end;
if HResInfo = 0 then
// avoid Exception. Doc.Stream = nil is okay. Next access to it will create an empty TMemoryStream.
// avoid Exception. ADoc.Stream = nil is okay. Next access to it will create an empty TMemoryStream.
// raise EResNotFound.Create('Can''t find resource: '+FileName);
else
Doc.Stream := TResourceStream.Create(HInstance, FileName, GoodType);
ADoc.Stream := TResourceStream.Create(HInstance, FileName, GoodType);
end;

{ ThtResourceConnector }
Expand Down Expand Up @@ -1018,7 +1030,7 @@ procedure ThtUrlDocLoaderThread.Loaded;
{ ThtUrlDocLoaderThreadList }

//-- BG ---------------------------------------------------------- 19.05.2016 --
constructor ThtUrlDocLoaderThreadList.Create(Owner: TComponent);
constructor ThtUrlDocLoaderThreadList.Create(AOwner: TComponent);
begin
inherited;
FWaiting := TList.Create;
Expand Down
7 changes: 4 additions & 3 deletions source/msimg32.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
Version 11.3
Copyright 2012 by J. Peter Mugaas
Version 11.7
Copyright 2012-2014 by J. Peter Mugaas
Copyright 2015-2016 by HtmlViewer Team
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down Expand Up @@ -34,7 +35,7 @@ interface
This is not done like a typical header for several reasons.
1) We don't want to conflict with Embarcadero's Windows.pas header.
2) We do not want to load a .DLL durring drawing code and that would happen if
2) We do not want to load a .DLL during drawing code and that would happen if
you loaded the .DLL when calling a function for the first time.
3) Some Embarcadero's VCL versions will load the msimg32.dll so we do not want to
reload it in those cases.
Expand Down
4 changes: 2 additions & 2 deletions source/vwPrint.pas
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
Version 11.5
Version 11.7
Copyright (c) 1995-2008 by L. David Baldwin
Copyright (c) 2008-2010 by HtmlViewer Team
Copyright (c) 2011-2014 by Bernd Gabriel
Copyright (c) 2011-2016 by Bernd Gabriel
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down

0 comments on commit 5691b8b

Please sign in to comment.