v1.2.9
This commit is contained in:
parent
e39cd05b1f
commit
df79a459dd
|
|
@ -1,4 +1,4 @@
|
||||||
// Version 1.2.8
|
// Version 1.2.9
|
||||||
|
|
||||||
Function TOfficeObj(n);
|
Function TOfficeObj(n);
|
||||||
Begin
|
Begin
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Version 1.2.8
|
// Version 1.2.9
|
||||||
|
|
||||||
Type TSDocxFile = Class
|
Type TSDocxFile = Class
|
||||||
///Version: V1.0 2022-09-20
|
///Version: V1.0 2022-09-20
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Version 1.2.8
|
// Version 1.2.9
|
||||||
|
|
||||||
Type TSExcelFile = Class
|
Type TSExcelFile = Class
|
||||||
///Version: V1.0 2022-08-08
|
///Version: V1.0 2022-08-08
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,9 @@ Type xlsxHyperLink = Class
|
||||||
return new xlsxHyperLink(sheetname, file, xmlFile);
|
return new xlsxHyperLink(sheetname, file, xmlFile);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function SetCellHyperLink(axis, hyperlink);
|
Function SetCellHyperLink(axis, link);
|
||||||
Begin
|
Begin
|
||||||
|
hyperlink := link;
|
||||||
work_node := xmlFile_.FirstChildElement('worksheet');
|
work_node := xmlFile_.FirstChildElement('worksheet');
|
||||||
hyperlinks := work_node.FirstChildElement('hyperlinks');
|
hyperlinks := work_node.FirstChildElement('hyperlinks');
|
||||||
if not ifObj(hyperlinks) then begin
|
if not ifObj(hyperlinks) then begin
|
||||||
|
|
@ -32,22 +33,23 @@ Type xlsxHyperLink = Class
|
||||||
hyperlink.Axis := axis;
|
hyperlink.Axis := axis;
|
||||||
if hyperlink.LinkType = "location" then
|
if hyperlink.LinkType = "location" then
|
||||||
begin
|
begin
|
||||||
hyperlink.LinkType := nil;
|
|
||||||
hyperlink.Location := hyperlink.LinkUrl;
|
hyperlink.Location := hyperlink.LinkUrl;
|
||||||
hyperlink.LinkUrl := nil;
|
|
||||||
end
|
end
|
||||||
else if hyperlink.LinkType = 'external' then
|
else if hyperlink.LinkType = 'external' then
|
||||||
begin
|
begin
|
||||||
[rid, commentFileName, sheetFileName, relsfile] := file_.WorkBook().GetRelationshipRid(sheetName_, hyperlink.LinkUrl);
|
relsfile := file_.WorkBook().GetSheetRelsFile(sheetName_);
|
||||||
if commentFileName = "" then
|
[id, target, rid] := class(TSXml).FindRelationshipRid(relsfile, hyperlink.LinkUrl);
|
||||||
|
if target = "" then
|
||||||
Begin
|
Begin
|
||||||
rid++;
|
id++;
|
||||||
ridstr := 'rId' + inttostr(rid);
|
ridstr := 'rId' + inttostr(id);
|
||||||
xmlfile := file_.WorkBook().GetXmlFileObj(relsfile);
|
class(TSXml).AddRelationshipRid(relsfile, hyperlink.LinkUrl, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", ridstr, "External");
|
||||||
class(TSXml).AddRelationshipRid(xmlfile, hyperlink.LinkUrl, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", ridstr, "External");
|
hyperlink.Rid := ridstr;
|
||||||
End
|
End
|
||||||
hyperlink.RId := 'rId' + inttostr(rid);
|
else hyperlink.Rid := 'rId' + inttostr(rid);
|
||||||
end
|
end
|
||||||
|
hyperlink.LinkType := nil;
|
||||||
|
hyperlink.LinkUrl := nil;
|
||||||
if not ifObj(hyperlink_node) then
|
if not ifObj(hyperlink_node) then
|
||||||
begin
|
begin
|
||||||
hyperlinks.InsertEndChild(hyperlink.marshal());
|
hyperlinks.InsertEndChild(hyperlink.marshal());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue