Task #617: 표 셀 padding shrink 휴리스틱 다중 줄 가드 (closes #617)#621
Closed
planet6897 wants to merge 2 commits into
Closed
Task #617: 표 셀 padding shrink 휴리스틱 다중 줄 가드 (closes #617)#621planet6897 wants to merge 2 commits into
planet6897 wants to merge 2 commits into
Conversation
다중 줄 단락(line_segs.len() >= 2)이 있는 셀에서는 HWP가 이미 가용 폭에 자간 분배·줄바꿈을 확정한 상태이므로 shrink_cell_padding_for_overflow가 padding을 깎지 않도록 가드 추가. exam_kor.hwp 16/27/36번 보기/자료 박스에서 본문이 셀 테두리에 닿던 시각 오류 수정. 단일 줄 좁은 셀(table-text, form-002 등 수치 셀)은 종전 휴리스틱 유지하여 회귀 없음. 신규 회귀 테스트 issue_617_exam_kor_page5 추가.
edwardkim
added a commit
that referenced
this pull request
May 7, 2026
PR #621 의 외부 컨트리뷰터 거버넌스 산출물 영역 (수행 계획서 + 구현 계획서 + Stage 1 보고서 + 최종 보고서) 의 본 환경 명명 규약 영역 정합: - task_m07_617 → task_m100_617 일괄 정정 (m07 영역은 v0.7.x 약어 영역, 본 환경 m100 영역의 v1.0.0 마일스톤 정합 영역) - mydocs/plans/task_m100_617.md (수행 계획서) - mydocs/plans/task_m100_617_impl.md (구현 계획서) - mydocs/working/task_m100_617_stage1.md (단계별 보고서) - mydocs/report/task_m100_617_report.md (최종 보고서, PR 두 번째 commit 79ed72b 영역에서 추출) PR #629 / PR #668 의 본 환경 패턴 정합 — mydocs/ 거버넌스 산출물 영역의 외부 컨트리뷰터 영역 + 본 환경 명명 규약 영역의 정합 영역.
edwardkim
added a commit
that referenced
this pull request
May 7, 2026
PR #621 (Task #617 표 셀 padding shrink 다중 줄 가드) cherry-pick 머지 후 vite dev server 영역의 web 환경 시각 판정 영역 정합: - pkg/rhwp.js → rhwp-studio/public/rhwp.js 영역 갱신 영역 (234,340 bytes) - public/rhwp_bg.wasm 영역도 동일 영역 갱신 영역 (gitignore 영역 영역) - 본 영역의 vite dev server 영역 wasm 영역의 갱신 영역 로드 영역 작업지시자 시각 판정 ★ 통과 (한컴 2010 + 한컴 2022 편집기 권위 정답지 비교 영역): - exam_kor.hwp 페이지 6 (16번 보기) / 페이지 9 (27번 보기) / 페이지 17 (36번 자료) 의 본문 좌·우 padding 약 3mm 복원 영역 - 다른 페이지 영역의 미회귀 영역 (단일 줄 좁은 셀 영역의 종전 휴리스틱 유지 영역)
Owner
PR #621 처리 결과cherry-pick 머지 완료 ( 처리 옵션옵션 B — src + 회귀 차단 가드 (svg_snapshot + golden) 만 cherry-pick + 거버넌스 산출물 영역의 본 환경 명명 규약 정합 (task_m07_617 → task_m100_617). PR #629 / PR #668 영역 패턴 정합. 본 환경 결정적 검증 (모두 통과)
메인테이너 시각 판정 ★ 통과 (한컴 2010 + 한컴 2022 편집기 권위 정답지)권위 영역 —
회귀 영역 점검: 다른 페이지 단일 줄 좁은 셀 (form-002, table-text 영역) 미회귀 — 종전 휴리스틱 유지. 본질 정정의 가치다중 줄 가드 ( 거버넌스 산출물 영역본 환경 명명 규약 정합 영역으로 갱신:
향후 거버넌스 산출물 작성 시 본 환경 명명 규약 ( cherry-pick 결과
본 PR 의 정확한 본질 정정 + 다중 줄 구조적 가드 + 회귀 차단 가드 (svg_snapshot + golden) 영구 보존 + 메인테이너 시각 판정 ★ 통과 패턴 모두 정합. |
edwardkim
added a commit
that referenced
this pull request
May 7, 2026
PR #621 (Task #617 표 셀 padding shrink 다중 줄 가드) 처리 완료 후속 영역: - mydocs/pr/archives/pr_621_review.md (1차 검토 + 옵션 분석 + 본 환경 cherry-pick simulation) - mydocs/pr/archives/pr_621_report.md (처리 결과 + 결정적 검증 + cherry-pick 학습 영역) - mydocs/orders/20260507.md PR #621 entry 추가 처리 결과 요약: - 옵션 B: src + 회귀 차단 가드 (svg_snapshot + golden) 만 cherry-pick - 거버넌스 영역 본 환경 명명 규약 정합 (task_m07_617 → task_m100_617) - devel commits: 2f28866 (본질, author Jaeook Ryu) + ab146d6 (거버넌스, edward) + b23468c (rhwp-studio/public/rhwp.js, edward) - cargo test 1155 / svg_snapshot 7/7 (issue_617 신규) / issue_546 1/1 / issue_554 12/12 / issue_501 1/1 / clippy 0 - WASM 4,606,564 bytes (PR #609 baseline +7,672) - 메인테이너 시각 판정 ★ 통과 (한컴 2010+2022 편집기 + vite dev server web) - PR #621 close + Issue #617 수동 close + 한글 댓글 학습 영역: - 외부 PR 처리 영역에서 git cherry-pick 사용 (git checkout 회피) — base 시점 이후 변경 흡수 영역 - /tmp 임시 clone simulation 결과 ≠ 본 환경 git checkout 영역 — cherry-pick 영역만 정합 본질 정정의 가치: - 다중 줄 가드 (paragraphs.iter().any(|p| p.line_segs.len() >= 2)) 는 구조적 판단 (측정 의존 없음) - feedback_hancom_compat_specific_over_general 메모리 룰 권위 사례 강화
This was referenced May 7, 2026
edwardkim
added a commit
that referenced
this pull request
May 7, 2026
PR #622 (Task #619 다단 vpos-reset 정정) 처리 완료 후속 영역: - mydocs/pr/archives/pr_622_review.md (1차 검토 + 옵션 분석 + 본 환경 cherry-pick simulation) - mydocs/pr/archives/pr_622_report.md (처리 결과 + 결정적 검증 + 권위 영역 측정 + 시각 판정 통과) - mydocs/orders/20260507.md PR #622 entry 추가 처리 결과 요약: - 옵션 A: 3 commits 단계별 cherry-pick (Stage 1 / Stage 2/3 / Stage 4) - mydocs/orders/20260506.md add/add 충돌 → ours 영역 본 환경 보존 - devel commits: 20e660c (Stage 1, author Jaeook Ryu) + a7eb171 (Stage 2/3) + 2d20cc0 (Stage 4) - cargo test 1155 / svg_snapshot 7/7 / issue_546 1/1 / issue_554 12/12 / issue_418 1/1 (단일 단 회귀 차단) / issue_501 1/1 / clippy 0 - WASM 4,578,641 bytes (PR #621 baseline -27,923) - rhwp-studio/public/{rhwp_bg.wasm,rhwp.js} 갱신 (vite dev server web 영역) - 권위 영역 100% 일치: 페이지 8 lines=0..8 + 페이지 9 lines=8..13 + LAYOUT_OVERFLOW_DRAW 17.1px 사라짐 - 메인테이너 web editor 시각 판정 ★ 통과 - PR #622 close + Issue #619 수동 close + 한글 댓글 본질 정정의 가치: - 다단 한정 가드 (col_count > 1 + li > cursor_line + vertical_pos == 0) 는 구조적 판단 (측정 의존 없음) - feedback_hancom_compat_specific_over_general 권위 사례 강화 누적 (PR #621 다중 줄 가드 + 본 PR 다단 vpos-reset 가드) 본 사이클 (5/7) PR 처리 누적: 10건
This was referenced May 7, 2026
edwardkim
added a commit
that referenced
this pull request
May 7, 2026
PR #632 (Task #631 HWP 권위값 더블체크로 vpos-reset 인접 line 보존) 처리 완료 후속 영역: - mydocs/pr/archives/pr_632_review.md (1차 검토 + 옵션 분석 + cherry-pick simulation + 권위 영역 직접 측정) - mydocs/pr/archives/pr_632_report.md (처리 결과 + 결정적 검증 + 권위 영역 100% 일치 + Task #332 stage4b 종결) - mydocs/orders/20260507.md PR #632 entry 추가 처리 결과 요약: - 옵션 B: 5 commits cherry-pick (samples/aift.pdf 영역 제외, 본 환경 PR #670 pdf/aift-2022.pdf 영역 정합) - mydocs/orders/20260506.md add/add 충돌 → ours 영역 본 환경 보존 (PR #622/#627 패턴) - devel commits: 51c22a6 Stage 1 + 7127ded Stage 2 구현계획 + 5fdc096 Stage 2 정정 + e415f62 Stage 3 + e098562 Stage 4 (author Jaeook Ryu 보존) - cargo test --lib 1156 passed / svg_snapshot 7/7 / issue_546/554/418/501 통과 / clippy 0 - WASM 4,577,370 bytes (PR #627 baseline -1,381) - 권위 영역 100% 일치: page 18 pi=222 lines=0..2 + page 19 pi=222 lines=2..4 + [vpos-reset@line2] 마커 - 시각 판정 영역 스킵 (작업지시자 결정) — 결정적 검증 + 권위 영역 100% 일치 + 광범위 sweep 회귀 0 통과 - PR #632 close + Issue #631 수동 close + 한글 댓글 본질 정정의 가치: - HWP 권위값 더블체크 (다음 줄 vertical_pos==0 + 현재 줄 vpos+lh ≤ body_h) — 구조적 가드 영역 (측정 의존 없음) - feedback_hancom_compat_specific_over_general 권위 사례 강화 누적 (PR #621 다중 줄 가드 + PR #622 다단 vpos-reset + 본 PR vpos-reset 인접 line 보존 = 본 사이클의 vpos-reset 영역 권위 사례 누적) - Task #332 stage4b 알려진 회귀 (aift pi=222) 종결 본 사이클 (5/7) PR 처리 누적: 13건
This was referenced May 7, 2026
edwardkim
added a commit
that referenced
this pull request
May 11, 2026
- mydocs/pr/archives/pr_813_review.md (5 정책 위반 + 회귀 위험 분석) - mydocs/pr/archives/pr_813_report.md (옵션 C 처리 결과 + 분리 PR 가이드) - mydocs/orders/20260511.md PR #813 행 추가 핵심 문제점: 1. base=main 정책 위반 (devel 재제출 필수) 2. 폰트 라이선스 정책 어긋남 (Noto/Pretendard 미포함) 3. typeset.rs LINE_SEG 가드 회귀 위험 (PR #621/#622/#627/#632/#636 누적 정정 우회) 4. Issue 연결 부재 5. wasm_api.rs pub(crate) core 가시성 변경 분리 PR 3 가이드 (재제출 대기): - 분리 PR 1: pdf.rs SVG BBox (안전, PR #798 close 후속, 우선) - 분리 PR 2: 폰트 fallback (Noto/Pretendard 우선) - 분리 PR 3: typeset.rs LINE_SEG + HWPX adapter (광범위 sweep 필수)
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.
요약
<보기>·<자료>글상자에서 본문이 셀 테두리에 닿던 시각 오류 정정shrink_cell_padding_for_overflow가 양쪽 정렬 한국어 본문의 자연 폭을 과대 추정해 정상 padding(850 HU ≈ 3 mm)을 1 px 까지 깎던 회귀 차단line_segs.len() >= 2)이 있는 셀은 HWP 가 가용 폭에 자간 분배·줄바꿈을 확정한 상태이므로 padding 보존하는 가드 추가본질 결함
src/renderer/layout/table_layout.rs::shrink_cell_padding_for_overflow가estimate_text_width로 자연 폭을 측정하여 1.15× 임계 초과 시 padding 을 비례 축소함. 그러나:ratio=95% / spacing=-5%효과는 부분만 반영검증 증거: 같은 표 구조 /
pad=(850,850,992,708)/ aim=false 인데 25번 박스(text_len=639)는 정상, 27번 박스(text_len=681)는 깨짐. 텍스트 분량 차이로 임계 초과 여부만 갈리는 것이 결정적 증거.본질 정정
다중 줄 가드 추가 (단일 룰):
다중 줄 단락이 있는 셀은 HWP 가 자간 분배·줄바꿈을 마친 상태이므로 자연 폭 추정으로 다시 깎으면 오버 페인팅. 단일 줄 좁은 셀(table-text/form-002 수치 셀 등 오버플로우 가능성 있는 케이스)은 종전 휴리스틱 유지로 회귀 0.
함수 시그니처에
paragraphs: &[Paragraph]인자 추가, 호출처 4곳 (table_cell_content.rs,table_partial.rs,table_layout.rs×2) 동시 수정.시도했으나 채택하지 않은 변경
→ 다중 줄 셀에서만 shrink skip 으로 좁혀 적용.
검증
SVG snapshot 회귀 테스트
신규 추가:
tests/svg_snapshot.rs::issue_617_exam_kor_page5(페이지 6 16번 박스)tests/golden_svg/issue-617/exam-kor-page5.svg기존 골든 모두 통과 (변경 0):
시각 검증
3개 보고 박스 좌·우 padding 약 3 mm 복원:
전체 테스트
cargo test --release: 1134+ 통과cargo clippy --release --all-targets: 신규 경고 없음영향 범위
src/renderer/layout/table_layout.rssrc/renderer/layout/table_cell_content.rssrc/renderer/layout/table_partial.rstests/svg_snapshot.rstests/golden_svg/issue-617/exam-kor-page5.svgTest plan
cargo test --release(1134 통과)cargo test --release --test svg_snapshot(7/7 통과, 신규 issue_617 포함)cargo clippy --release --all-targets(신규 경고 없음)cargo build --releasecloses #617