Task #824: HWP3 임베디드 그림 external_path 오표시 정정 (closes #824)#827
Closed
jangster77 wants to merge 5 commits into
Closed
Task #824: HWP3 임베디드 그림 external_path 오표시 정정 (closes #824)#827jangster77 wants to merge 5 commits into
jangster77 wants to merge 5 commits into
Conversation
본질: HWP3 임베디드 그림(pic_type=2)에 external_path 가 잘못 설정되는 결함을 객관 테스트로 입증. 한컴오피스 2022 는 "문서에 포함" 으로 표시하나 rhwp-studio 그림 속성 dialog 는 "E$$00000.jpg" 를 외부 파일로 표시. 산출물: - tests/issue_824.rs — 2개 테스트 - issue_824_embedded_picture_no_external_path → FAIL (RED) - issue_824_external_picture_keeps_external_path → PASS (회귀 가드) - fixture: hwp3-sample11.hwp + 변환본 + 한컴 2022 PDF - mydocs/plans/task_m100_824.md (수행계획서) - mydocs/plans/task_m100_824_impl.md (구현계획서) - mydocs/working/task_m100_824_stage1.md (본 단계 보고서) 다음 단계: Stage 2 (GREEN) — pic_type 분기 수정.
본질: HWP3 그림 종류 (offset 74) 분기 누락 정정. pic_type == 0 (외부 파일) 만 external_path 설정, pic_type == 1 (OLE) / 2 (Embedded) 는 pic_name 이 내부 참조명이므로 미설정 (한컴오피스 2022 정합). 수정: src/parser/hwp3/mod.rs +1줄 if (bin_data_id 매핑은 type 무관 유지). 검증: cargo test --test issue_824 → 2 PASS - issue_824_embedded_picture_no_external_path → ok (Stage 1 RED → GREEN) - issue_824_external_picture_keeps_external_path → ok (회귀 가드 유지) 다음 단계: Stage 3 (회귀) — 전체 cargo test + HWP3 sample 5개 SVG 회귀.
…e 1031 page bit-identical 본질: pic_type 분기 수정의 회귀 영향 검증. 검증 결과: - cargo test --release: 1353 passed, 0 failed - cargo test --test issue_824: 2 PASS (embedded + external 가드) - cargo clippy --release -- -D warnings: clean - SVG 회귀: 5 sample (sample/sample4/sample5/sample10/sample11) × 1031 page baseline vs patched bit-identical (diff 0) 해석: external_path 는 SVG 출력 layout/렌더링에 영향 없음 (placeholder 분기는 web_canvas.rs 만 존재, native SVG 경로에 placeholder 코드 없음). 의도 효과 (Canvas placeholder + 그림 속성 dialog) 는 Stage 4 시각 검증으로 확인. 다음 단계: Stage 4 (시각 검증) — WASM 재빌드 + rhwp-studio 작업지시자 시각 판정.
본질: 작업지시자 시각 판정 통과 — sample11 임베디드 그림 그림 속성 dialog "파일 이름 빈 값 + 문서에 포함 체크" 한컴오피스 2022 정합 + sample10 외부 file path 그림 회귀 부재. 산출물: - mydocs/report/task_m100_824_report.md (최종 보고서) - mydocs/orders/20260511.md (Task edwardkim#824 entry 추가) 추가 발견 결함 (별도 이슈 분리 예정): 머리말 영역 그림 우클릭 → "개체 속성" dialog 미표시. rhwp-studio context-menu / picture-props-dialog UI 결함으로 Task edwardkim#824 (HWP3 parser) 본질과 다름. closes edwardkim#824
Collaborator
Author
|
본 PR 의 commit 들 (Task #824 Stage 1~4) 은 후속 작업 브랜치 Task #824 + #825 + #826 통합 PR 을 곧 별도 생성 예정이며, 해당 PR 에서 감사합니다. |
5 tasks
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.
Summary
HWP3 그림 파서에서
external_path셋팅 시 그림 종류 (offset 74) 분기 누락으로, 임베디드 그림 (pic_type == 2) 이 외부 파일로 잘못 표시되던 결함을 정정.결함 본질
src/parser/hwp3/mod.rs:935-952(Task #741 / PR #753 도입) 가pic_type 0/1/2를 동일 처리하여 임베디드 그림에도external_path = Some("E$$00000.jpg")설정 → rhwp-studio 그림 속성 dialog 가 외부 파일로 오표시.E$$00000.jpg정정
pic_type == 0(외부 파일) 만external_path설정. 1줄 if 가드 추가:bin_data_id매핑은 type 무관 유지 (HashMap 기반).검증
cargo test --release: 1353 passed, 0 failedcargo test --test issue_824: 2 PASS (embedded + external 가드)cargo clippy --release -- -D warnings: cleansamples/hwp3-sample11.hwp임베디드 그림 → "파일 이름 빈 값 + 문서에 포함 체크" 한컴 정합samples/hwp3-sample10.hwp외부 file path 그림 → 회귀 부재단계 진행
64af532fc3aa5fpic_type == 0만 external_path 설정dbba1b79ae9232Fixture 추가
samples/hwp3-sample11.hwp(391 KB) — 본 결함 재현samples/hwp3-sample11-hwp5.hwp+-hwpx.hwpx— 한컴 변환본pdf/hwp3-sample11-hwpx-2022.pdf(27 MB, LFS 임계 50 MB 미만)산출 문서
mydocs/plans/task_m100_824.md(수행계획서)mydocs/plans/task_m100_824_impl.md(구현계획서)mydocs/working/task_m100_824_stage{1,2,3}.md(단계 보고서)mydocs/report/task_m100_824_report.md(최종 보고서)후속 (별도 이슈)
본 PR 시각 검증 중 추가 발견된 결함 2건은 별도 이슈로 분리:
closes #824
Test plan
🤖 Generated with Claude Code