Skip to content

格式 profile:importOfficial 以固定路徑讀取 styles/theme/fontTable,不依 relationship #213

Description

@kiki830621

Problem

importOfficial 讀取 styles、theme、fontTable 時,一律使用固定路徑(word/styles.xml 等),不看 word/_rels/document.xml.rels 裡的 relationship 實際指向哪個 part。

3.10.0 已經在匯入、套用、寫出三條路徑拒絕「同一 Type 出現兩筆 Target 不同的 relationship」(#196)。但如果範本只有一筆合法的 styles/theme/fontTable relationship,而它指向非預設路徑(OPC 允許),import 就會讀到過期的 part,或誤報「缺少」。

Expected

依 relationship 解析實際的 part 路徑,找不到時才報錯;或者明確拒絕非預設路徑,並在錯誤訊息裡說明。加上 Target 指向 word/customStyles.xml 之類 part 的測試。

Refs #196


Current Status

Phase: closed
Last updated: 2026-09-24 by /idd-close

Key Decisions

  • importOfficial 依 relationship 解析 styles/theme/fontTable;DocxReader 端留給 ooxml-swift#173

Scope Changes

  • (none)

Blocking

  • (none)

Commits

  • ooxml-swift 1688fa6、d0aa7b5(v3.11.0);macdoc 5a31f56;CLI 0.11.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions