Browse Source

* Fix bug #33241, patch from Stephano to add missing link export in HTML

git-svn-id: trunk@38359 -
michael 7 years ago
parent
commit
7b7f164c28
1 changed files with 14 additions and 3 deletions
  1. 14 3
      packages/fcl-report/src/fpreporthtmlexport.pp

+ 14 - 3
packages/fcl-report/src/fpreporthtmlexport.pp

@@ -1069,6 +1069,7 @@ var
   BS,S,aFamily,aStyle,aWeight : String;
   bDiv,span : THTMLElement;
   FixedPos : Boolean;
+  L : THTMLLinkElement;
 
 begin
   lMemo := TFPReportMemo(AMemo);
@@ -1143,9 +1144,19 @@ begin
         S:=S+Format(' font-family: "%s";',[txtblk.FontName]);
       S:=S+ColorToStyle('color',TxtBlk.FGColor);
       ApplyStyle(bDiv,S);
-      span:=FDoc.CreateSpanElement;
-      span.appendChild(FDoc.CreateTextNode(txtBlk.Text));
-      bDiv.AppendChild(span);
+      if txtBlk is TFPHTTPTextBlock then
+        begin
+        L:=FDoc.CreateLinkElement;
+        L.HRef:=TFPHTTPTextBlock(txtBlk).URL;
+        L.AppendChild(FDoc.CreateTextNode(txtBlk.Text));
+        bDiv.AppendChild(L);
+        end
+      else
+        begin
+        span:=FDoc.CreateSpanElement;
+        span.appendChild(FDoc.CreateTextNode(txtBlk.Text));
+        bDiv.AppendChild(span);
+        end;
       end;
     end;
 end;