|
@@ -71,6 +71,7 @@ type
|
|
|
FPackage : TPasPackage;
|
|
|
FTopics : TList;
|
|
|
FImgExt : String;
|
|
|
+ procedure ConvertURL(AContext: TPasElement; El: TDOMElement);
|
|
|
|
|
|
protected
|
|
|
procedure Warning(AContext: TPasElement; const AMsg: String);
|
|
@@ -111,6 +112,8 @@ type
|
|
|
procedure DescrWriteVarEl(const AText: DOMString); virtual; abstract;
|
|
|
procedure DescrBeginLink(const AId: DOMString); virtual; abstract;
|
|
|
procedure DescrEndLink; virtual; abstract;
|
|
|
+ procedure DescrBeginURL(const AURL: DOMString); virtual; abstract;
|
|
|
+ procedure DescrEndURL; virtual; abstract;
|
|
|
procedure DescrWriteLinebreak; virtual; abstract;
|
|
|
procedure DescrBeginParagraph; virtual; abstract;
|
|
|
procedure DescrEndParagraph; virtual; abstract;
|
|
@@ -428,6 +431,7 @@ begin
|
|
|
if Node.NodeType = ELEMENT_NODE then
|
|
|
if (Node.NodeName <> 'br') and
|
|
|
(Node.NodeName <> 'link') and
|
|
|
+ (Node.NodeName <> 'url') and
|
|
|
(Node.NodeName <> 'b') and
|
|
|
(Node.NodeName <> 'file') and
|
|
|
(Node.NodeName <> 'i') and
|
|
@@ -457,6 +461,8 @@ begin
|
|
|
begin
|
|
|
if (Node.NodeType = ELEMENT_NODE) and (Node.NodeName = 'link') then
|
|
|
ConvertLink(AContext, TDOMElement(Node))
|
|
|
+ else if (Node.NodeType = ELEMENT_NODE) and (Node.NodeName = 'url') then
|
|
|
+ ConvertURL(AContext, TDOMElement(Node))
|
|
|
else
|
|
|
if not ConvertBaseShort(AContext, Node) then
|
|
|
exit;
|
|
@@ -596,6 +602,16 @@ begin
|
|
|
DescrEndLink;
|
|
|
end;
|
|
|
|
|
|
+procedure TFPDocWriter.ConvertURL(AContext: TPasElement; El: TDOMElement);
|
|
|
+begin
|
|
|
+ DescrBeginURL(El['href']);
|
|
|
+ if not IsDescrNodeEmpty(El) then
|
|
|
+ ConvertBaseShortList(AContext, El, True)
|
|
|
+ else
|
|
|
+ DescrWriteText(El['href']);
|
|
|
+ DescrEndURL;
|
|
|
+end;
|
|
|
+
|
|
|
function TFPDocWriter.ConvertExtShort(AContext: TPasElement;
|
|
|
Node: TDOMNode): Boolean;
|
|
|
begin
|
|
@@ -605,6 +621,8 @@ begin
|
|
|
begin
|
|
|
if (Node.NodeType = ELEMENT_NODE) and (Node.NodeName = 'link') then
|
|
|
ConvertLink(AContext, TDOMElement(Node))
|
|
|
+ else if (Node.NodeType = ELEMENT_NODE) and (Node.NodeName = 'url') then
|
|
|
+ ConvertURL(AContext, TDOMElement(Node))
|
|
|
else if (Node.NodeType = ELEMENT_NODE) and (Node.NodeName = 'br') then
|
|
|
DescrWriteLinebreak
|
|
|
else
|