Task #1512: HWPX 누름틀(필드) 고유 ID 보존 — 동일 ID 반환 정정#1541
Merged
Conversation
여러 독립 누름틀(필드)을 API 로 스캔하면 모두 동일한 fieldId 로 반환돼 개별 식별·제어가
불가능했다. HWPX 파서가 비-Memo 필드의 field_id 를 공유 `fieldid` 속성에서 가져온 탓이다
(예: FORMULA 다수가 동일 fieldid 공유). OWPML `id` 는 필드마다 고유하다.
- parser: field_id 를 Memo/비-Memo 모두 고유 `id` 우선으로 통일(`id_attr.or(fieldid_attr)`).
근거: `<hp:fieldEnd beginIDRef>` 가 fieldBegin 의 `id` 를 참조하고, 직렬화도
`id="{field_id}"` 로 쓴다 — field_id=id 여야 begin/end 짝·roundtrip·API 가 일치.
- 회귀 가드: task1512_non_memo_field_uses_unique_id (공유 fieldid + 고유 id → 고유 구분).
부수 효과: 종전엔 roundtrip 시 고유 id 가 공유 fieldid 로 붕괴됐으나 이제 보존된다.
검증: 143E 4필드 id 고유 4/4 → 저장본 4/4 동일 보존. hwpx_roundtrip_baseline 4/4,
필드 lib 테스트 50/50, fmt/clippy 무경고.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
|
@planet6897 감사합니다. 최신 검증 결과:
merge commit: |
This was referenced Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
여러 독립 누름틀(필드)을 API(
getFieldList)로 스캔하면 모두 동일한 fieldId 로반환돼 개별 식별·제어가 불가능하던 버그를 정정한다. (closes #1512)
원인
HWPX 파서가 비-Memo 필드의
field_id를 공유fieldid속성에서 가져왔다.fieldid는 같은 종류 필드(예: FORMULA 다수)가 공유할 수 있어 모든 필드가 동일 ID 가 된다. 반면
OWPML
id는 필드마다 고유하다.정정
field_id를 Memo/비-Memo 모두 고유id우선으로 통일(id_attr.or(fieldid_attr)).<hp:fieldEnd beginIDRef>가 fieldBegin 의id를 참조하고, 직렬화도id="{field_id}"로 쓴다 —field_id=id여야 begin/end 짝·roundtrip·API 가 일치.task1512_non_memo_field_uses_unique_id.검증
hwpx_roundtrip_baseline4/4, 필드 lib 테스트 50/50, fmt/clippy 무경고.🤖 Generated with Claude Code