20250925
This commit is contained in:
parent
67a7d27363
commit
20a343f501
|
|
@ -1,6 +1,6 @@
|
|||
unit OFFICEXML;
|
||||
interface
|
||||
const Version = "3.0.0";
|
||||
const Version = "2025 09 25";
|
||||
|
||||
implementation
|
||||
end.
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ styles.xml 部分如下
|
|||
```
|
||||
|
||||
```go
|
||||
uses DocxMLAdapters;
|
||||
uses DocxMLAdapter;
|
||||
component := new DocxComponents(); // 创建对象
|
||||
component.Open("", "xxx.docx"); // 打开文件
|
||||
document := component.Document; // 获取document.xml,生成Document对象
|
||||
|
|
@ -372,7 +372,7 @@ document.Deserialize(); // 将xml对象的数据反序列化到tsl对象
|
|||
|
||||
styles := document.Styles;
|
||||
// 现在需要通过styleId获取Style对象
|
||||
styles_adapter := new DocxMLAdapters.Styles(styles); // 建议指定unit,否则容易冲突
|
||||
styles_adapter := new StylesAdapter(styles);
|
||||
// 通过StyleId获取Style对象
|
||||
style := styles_adapter.GetStyleByStyleId("a6");
|
||||
echo style.Name; // 输出的是"页脚 字符"
|
||||
|
|
|
|||
|
|
@ -12227,7 +12227,7 @@ end;
|
|||
function Bdr.ConvertToPoint();override;
|
||||
begin
|
||||
if not ifnil({self.}XmlAttrSz) then
|
||||
{self.}Sz := TSSafeUnitConverter.EighthPointToPoints({self.}XmlAttrSz.Value);
|
||||
{self.}Sz := TSSafeUnitConverter.EighthPointsToPoints({self.}XmlAttrSz.Value);
|
||||
end;
|
||||
|
||||
function Bdr.ReadXmlAttrVal();
|
||||
|
|
|
|||
4
迁移指南.md
4
迁移指南.md
|
|
@ -39,9 +39,9 @@
|
|||
// 弃用
|
||||
uses DocxMLAdapter;
|
||||
|
||||
styles_adapter := DocxMLAdapter.StylesAdapter(styles);
|
||||
styles_adapter := new DocxMLAdapter.StylesAdapter(styles);
|
||||
|
||||
// 迁移
|
||||
uses DocxMLAdapters; // 复数s
|
||||
styles_adapter := DocxMLAdapters.Styles(styles); // 移除冗余
|
||||
styles_adapter := new DocxMLAdapters.Styles(styles); // 移除冗余
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in New Issue