This commit is contained in:
csh 2025-09-25 17:57:23 +08:00
parent 67a7d27363
commit 20a343f501
4 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
unit OFFICEXML; unit OFFICEXML;
interface interface
const Version = "3.0.0"; const Version = "2025 09 25";
implementation implementation
end. end.

View File

@ -364,7 +364,7 @@ styles.xml 部分如下
``` ```
```go ```go
uses DocxMLAdapters; uses DocxMLAdapter;
component := new DocxComponents(); // 创建对象 component := new DocxComponents(); // 创建对象
component.Open("", "xxx.docx"); // 打开文件 component.Open("", "xxx.docx"); // 打开文件
document := component.Document; // 获取document.xml生成Document对象 document := component.Document; // 获取document.xml生成Document对象
@ -372,7 +372,7 @@ document.Deserialize(); // 将xml对象的数据反序列化到tsl对象
styles := document.Styles; styles := document.Styles;
// 现在需要通过styleId获取Style对象 // 现在需要通过styleId获取Style对象
styles_adapter := new DocxMLAdapters.Styles(styles); // 建议指定unit否则容易冲突 styles_adapter := new StylesAdapter(styles);
// 通过StyleId获取Style对象 // 通过StyleId获取Style对象
style := styles_adapter.GetStyleByStyleId("a6"); style := styles_adapter.GetStyleByStyleId("a6");
echo style.Name; // 输出的是"页脚 字符" echo style.Name; // 输出的是"页脚 字符"

View File

@ -12227,7 +12227,7 @@ end;
function Bdr.ConvertToPoint();override; function Bdr.ConvertToPoint();override;
begin begin
if not ifnil({self.}XmlAttrSz) then if not ifnil({self.}XmlAttrSz) then
{self.}Sz := TSSafeUnitConverter.EighthPointToPoints({self.}XmlAttrSz.Value); {self.}Sz := TSSafeUnitConverter.EighthPointsToPoints({self.}XmlAttrSz.Value);
end; end;
function Bdr.ReadXmlAttrVal(); function Bdr.ReadXmlAttrVal();

View File

@ -39,9 +39,9 @@
// 弃用 // 弃用
uses DocxMLAdapter; uses DocxMLAdapter;
styles_adapter := DocxMLAdapter.StylesAdapter(styles); styles_adapter := new DocxMLAdapter.StylesAdapter(styles);
// 迁移 // 迁移
uses DocxMLAdapters; // 复数s uses DocxMLAdapters; // 复数s
styles_adapter := DocxMLAdapters.Styles(styles); // 移除冗余 styles_adapter := new DocxMLAdapters.Styles(styles); // 移除冗余
``` ```