Task #1134: fix HWPX serializer paragraph id collisions#1206
Closed
Mireutale wants to merge 6 commits into
Closed
Conversation
- parse→serialize→parse 사이클 검증 테스트 4개 추가 (fillBrush 배경색, CharShape run, 셀 내 control, controls+CharShape 동시) - split_runs_charshapes_controls(): controls가 있는 셀 문단에서도 char_offsets 갭 기반으로 CharShape 경계를 정확히 분리 - write_cell_paragraph_runs(): controls+다중CharShape+has_inner_boundary 조건 충족 시 세 번째 분기로 처리 closes edwardkim#1134
각 셀에서 enumerate() 인덱스를 재사용해 id="0", id="1" 등이 문서 전체에 중복 출력되던 문제를 수정한다. SerializeContext에 전역 para_id_counter를 추가하고, write_sub_list에서 ctx.next_para_id()를 사용해 문서 내 유일성을 보장한다.
Task edwardkim#1134: fix HWPX 셀 문단 id 전역 중복 수정
aea2eac 커밋이 셀 문단 id에 ctx.next_para_id() 를 도입했으나 section.rs 본문 문단 id 는 여전히 하드코드(0, idx as u32)를 사용, 같은 section.xml 안에서 id 충돌이 발생했다. - section.rs: 본문 첫 문단·추가 문단·각주미주 루프 3곳을 ctx.next_para_id() 로 통일, 불필요한 enumerate() 제거 - hwpx_roundtrip_integration.rs: 본문+표 포함 섹션의 <hp:p id> 유일성 검증 테스트 추가
Owner
|
@Mireutale 님, rhwp 에 첫 기여를 보내주셔서 환영하고 감사합니다. 🎉 직렬화 영역의 문제를 정확히 짚어 깔끔한 수정과 회귀 테스트까지 함께 주셨습니다. 검토 결과와 함께, 이 PR 을 닫게 된 사정을 설명드립니다. 검토 결과1. 문단 id 충돌 수정 (PR 목적) — 방향 적절 2. fillBrush 직렬화 완성 (header.rs +229) — PR 본문 미설명 + 정합 이슈
닫는 사정
제안
이번 기여로 드러난 id 충돌 문제와 fillBrush 미완성 지점은 후속 작업에 반영하겠습니다. 다시 한번 감사드리며, 분리 재제출을 기다리겠습니다. |
Owner
|
위 검토 의견대로, HWPX 쓰기 미완성 모듈 정비 방향을 메인테이너가 정리한 뒤 진행하기 위해 이 PR 을 닫습니다. 문단 id 충돌 수정만 분리한 PR 재제출을 환영합니다. |
Contributor
Author
|
확인했습니다. fillBrush 완성과 분리하여 id 수정만 담은 PR 로 재제출하도록 하겠습니다! |
edwardkim
added a commit
that referenced
this pull request
Jun 1, 2026
…CLOSE, by @Mireutale 첫 기여) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
5 tasks
edwardkim
added a commit
that referenced
this pull request
Jun 1, 2026
@Mireutale (#1206 분리 재제출) — HWPX 직렬화 시 본문 문단과 표 셀 문단의 <hp:p id> 가 같은 번호 공간을 공유하지 않아 전역 중복 가능. SerializeContext 에 전역 next_para_id() 카운터 추가, 본문·각주·셀 문단이 공유. #1206 close 사유 ②(fillBrush 혼재)·③(image_fill_mode 비대칭) 해소 — header.rs 제외, id 충돌 수정만 분리. 충돌 해소: #1213(textFlow) 테스트와 인접 충돌 → 양쪽 보존. 검증: clippy(lib) clean, cargo test --tests 1921 passed. 통합 테스트 para_ids_unique_across_body_and_table(basic-table-01 라운드트립 id 전역 유니크). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
edwardkim
added a commit
that referenced
this pull request
Jun 1, 2026
@Mireutale #1206 분리 재제출. 1921 passed, fillBrush 제외 확인. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
변경 요약
HWPX 직렬화 중 본문 문단과 표 셀 내부 문단의
hp:p id가 같은 번호 공간을 공유하지 않아 전역 중복이 발생할 수 있는 문제를 수정했습니다.관련 이슈
closes #1134
테스트
cargo fmt --all -- --check통과cargo test통과cargo clippy -- -D warnings통과스크린샷
직렬화 XML id 충돌 수정이라 스크린샷 비교는 생략했습니다.