feat(标准版本): 修复裁剪字形并完善版本兼容
build.yaml / build (push) Successful in 47s

This commit is contained in:
xiaoqidun committed 2026-10-09 23:15:06 +08:00
1 parent 444c01b976
commit e9caaa4193
31 files changed
+639 -182

No files matched your search

+6
View File
@@ -62,8 +62,10 @@ func (e *Editor) SetDocumentActions(actions []Action) error {
return err
}
patch := editorXMLPatch{root.close, root.close, encoded}
context := root
if node := root.child("Actions"); node != nil {
patch.start, patch.end = node.start, node.end
context = node
} else {
for _, child := range root.children {
if packageOFDNode(child, child.name.Local) && slices.Contains([]string{"VPreferences", "Bookmarks", "Annotations", "CustomTags", "Attachments", "Extensions"}, child.name.Local) {
@@ -72,6 +74,10 @@ func (e *Editor) SetDocumentActions(actions []Action) error {
}
}
}
patch.data, err = editorXMLGenerated(encoded, context.name.Space)
if err != nil {
return err
}
return e.commitAnnotationParts(base, map[string][]byte{name: editorPatchXML(data, []editorXMLPatch{patch})})
}