TRVHTMLViewImporter: component for importing from HTMLViewer to TRichView.
This component can be used to load HTML files in TRichView and TRichViewEdit.
Version 1.15.2
----------------------------------------------------------------------------
For Delphi 5-10 Seattle
(supported Delphi versions depend on the THTMLViewer version)
----------------------------------------------------------------------------
TRichView web site: http://www.trichview.com/
THTMLViewer web sites:
- http://www.pbear.com/ (original version)
- http://www.songbeamer.com/delphi/ (ported to Delphi 2009)
- https://github.com/BerndGabriel/HtmlViewer (current version)
----------------------------------------------------------------------------

  Copyright (c) 2005 by Andrej Sandorf andrejsandorf@gmx.de
  Copyright (c) 2008-... by Sergey Tkachenko svt@trichview.com

----------------------------------------------------------------------------
DOWNLOADING THTMLVIEWER

1) THTMLViewer is currently developed at https://github.com/BerndGabriel/HtmlViewer
This version can be installed in Delphi up to 10 Seattle
This version is recommended.
See "BEFORE INSTALLING" below.

2) The original version of THTMLViewer is here: www.pbear.com
It can be installed in Delphi 4..2007.
To compile TrvHtmlViewImporter with this version, deactivate GOOGLECODE define
in rvHtmlViewImport.pas.
See "BEFORE INSTALLING" below.

3) THTMLViewer was ported to Delphi 2009: www.songbeamer.com/delphi/
This version can be installed in Delphi 4..XE (XE2 and newer is not tested)
To compile TrvHtmlViewImporter with this version, deactivate GOOGLECODE define
in rvHtmlViewImport.pas.
See "BEFORE INSTALLING" below.

NOTE: GOOGLECODE is defined by default, for compatibility with the recommended
version of THTMLViewer, https://github.com/BerndGabriel/HtmlViewer
It is called GOOGLECODE because originally this version was published
at https://code.google.com/p/thtmlviewer/

----------------------------------------------------------------------------
BEFORE INSTALLING

No changes are required for the recommended version of THTMLViewer
https://github.com/BerndGabriel/HtmlViewer


  -------- ONLY FOR pbear.com AND songbeamer.com VERSIONS: -----

In HTMLViewer there must be a small source change to access
variables which are declared as private.


In "Htmlsubs.pas" in class "TBlockLI"
   TBlockLI = class(TBlock)
    private
    protected // <-- insert this, so we can access ListType, etc.
      ListType: ListTypeType;
      ListNumb: integer;
    ...

In "HTMLUn2.pas" in class "TChPosObj"
  TChPosObj = class (TIDObject)
  public < -- change "private" to "public", so we can access ChPos
    ChPos: integer;
    List: TList;
   ...

----------------------------------------------------------------------------
INSTALLING
0. Make the changes described above
1. Install TRichView
2. Probably, package options for HTML Viewer Components must be modified:
 "Build  control" must be set to "Explicit rebuild" (right click the package in the Project Manager, choose "Options", page "Description")
  The simplest way to make this change: replace the packages of HTML Viewer Components
  with the packages from THML\package folder of this installation
3. (re)Install HTML Viewer Components, if you changed the option on the step 2.
4. Install the packages of TRVHTMLViewImporter
  rvHtmlViewImportD4.dpk - for Delphi 4
  rvHtmlViewImportD5.dpk - for Delphi 5
  rvHtmlViewImportD6.dpk - for Delphi 6
  rvHtmlViewImportD7.dpk - for Delphi 7
  rvHtmlViewImportD9.bdsproj - for Delphi 2005
  rvHtmlViewImport2006.bdsproj - for Delphi and C++Builder 2006
  rvHtmlViewImportD2007.dproj - for Delphi 2007
  rvHtmlViewImportD2009.dproj - for Delphi 2009
  rvHtmlViewImportD2010.dproj - for Delphi 2010
  rvHtmlViewImportDXE.dproj - for Delphi XE
  rvHtmlViewImportDXE2.dproj - for Delphi XE2
  ...
  rvHtmlViewImportDXE8.dproj - for Delphi XE8
  rvHtmlViewImportD10.dproj - for Delphi 10 Seattle
----------------------------------------------------------------------------
How to use:

  if OpenDialog1.Execute then begin
    HTMLViewer1.LoadFromFile(OpenDialog1.FileName);
    RVHTMLViewImporter1.ImportHtmlViewer(HTMLViewer1, RichViewEdit1, ExtractFilePath(OpenDialog1.FileName));
    NormalizeRichView(RichViewEdit1.RVData); // from RVNormalize.pas, from RichViewActions
    RichViewEdit1.Format;
  end;

Alternatively, you can assign HTMLViewer property and call:

  if OpenDialog1.Execute then begin
    HTMLViewer1.LoadFromFile(OpenDialog1.FileName);
    RVHTMLViewImporter1.ImportHtmlViewer(RichViewEdit1, ExtractFilePath(OpenDialog1.FileName));
    NormalizeRichView(RichViewEdit1.RVData); // from RVNormalize.pas, from RichViewActions
    RichViewEdit1.Format;
  end;

HTML can be loaded from the Clipboard as well, using the method LoadFromClipboard.
----------------------------------------------------------------------------
Properties: see the comments in rvHtmlViewImport.pas
----------------------------------------------------------------------------
History:
 - version 1.15.2 (2016-Feb-02) - loading outer spacing for images, loading middle image alignment as rvvaAbsMiddle
 - version 1.15.1 (2016-Jan-26) - impr in loading subscripts/superscripts
 - version 1.15 (2015-Dec-18) - compatibility with THTMLViewer 11.7; fix: BasePath was ignored when loading a document background
 - version 1.14 (2015-Mar-16) - support for "file://" in <img src>
 - version 1.13.1 (2014-Oct-15) - fix in CompleteLists; packages for XE7
   new CompleteLists property (builds imported lists up to 9 levels)
 - version 1.13 (2014-Sep-18) - import of nested <ul> and <ol> as multilevel lists
   new CompleteLists property (builds imported lists up to 9 levels)
 - version 1.12.2 (2014-Sep-12)
 - version 1.12.1 (2014-Aug-07)
 - version 1.12 (2014-Jul-15) - compatibility the GC's THTMLViewer revision 475 (2014-Jul-15)
 - version 1.11 (2014-Jan-25) - compatibility with TRichView 14.13, reading left- and right-aligned images
 - version 1.10 (2013-Aug-27) - BasePath parameter
 - version 1.9.6 (2013-Jun-19) - packages for XE4
 - version 1.9.5 (2013-Apr-21) - fix
 - version 1.9.4 (2013-Apr-18) - compatibility with TRichView 14.4
 - version 1.9.3 (2013-Feb-26) - compatibility with TRichView 14.1
 - version 1.9.2+ (2012-Oct-24) - packages for XE3
 - version 1.9.2 (2012-Aug-11) - using 'Hyperlink' style-template  (tested with THTMLViewer revision 316)
 - version 1.9.1 (2012-Feb-2) - updated for GC's THTMLViewer revision 240
 - version 1.9 (2011-Sep-14) - compatibility with TRichView 13.3; tested with GC's THTMLViewer revision 176
 - version 1.8.2 (2011-Mar-31)
 - version 1.8.1 (2011-Mar-18) - compatibility with the GC's THTMLViewer 11 revision 168
 - version 1.8 (2011-Mar-8) - compatibility with TRichView 13; compatibility with 
   the Google Code version of THTMLViewer
 - version 1.7.2 (2010-Aug-3) - fixes in HTML pasting and others
 - version 1.7.1 (2010-May-8) - fix in image size
 - version 1.7 (2009-Nov-12) - headings, left and right image alignment
 - version 1.6 (2009-Sep-17)
 - version 1.5.3 (2009-Apr-26)
 - version 1.5.2 (2008-Nov-25)
 - version 1.5.1 (2008-Nov-19)
 - version 1.5 (2008-Nov-14)
 - version 1.4 (2008-Nov-13)
 - version 1.3.1 (2008-Sep-27)
 - version 1.3 (2008-Sep-20)
 - version 1.2 (2008-Sep-06)
 - version 1.1 (2008-Jun-24)
 - version 1.0 (2008-Jun-16)