Task #688: table-vpos-01.hwpx p.5 nested 표 외부 셀 height 미반영 (외부 표 + 측정자 1×1 unwrap 동일 결함)#694
Open
planet6897 wants to merge 4 commits intoedwardkim:develfrom
Open
Task #688: table-vpos-01.hwpx p.5 nested 표 외부 셀 height 미반영 (외부 표 + 측정자 1×1 unwrap 동일 결함)#694planet6897 wants to merge 4 commits intoedwardkim:develfrom
planet6897 wants to merge 4 commits intoedwardkim:develfrom
Conversation
`layout_table()` 의 1×1 래퍼 unwrap 로직이 셀 paragraphs 전체를 flat_map 으로 훑어 첫 nested 표만 가져왔다. paragraphs 가 2개 이상이거나 nested 표 외 다른 control 이 섞인 경우 두 번째 paragraph 의 nested 표가 통째 누락되었다. 조건을 다음 4가지 모두 충족하는 경우로 좁힘: 1. 외부 표 1×1 단일 셀 2. 셀 paragraphs 정확히 1개 3. 그 paragraph 의 control 이 정확히 1개의 nested table 만 4. visible text 없음 검증: samples/table-vpos-01.hwpx p.5 nested 11×3 그리드 (4그룹+12 추진과제) 복원. SVG 크기 20KB→132KB, text 요소 55→343. 페이지 1 LAYOUT_OVERFLOW 4.1px 자연 해소.
cargo test 1192+ 테스트 전부 통과. samples/ 직속 159 샘플 (.hwp 155 + .hwpx 4)
대상 SVG byte 비교에서 diff 3건만 발생:
- table-vpos-01.{hwp,hwpx} p.5: 의도된 결함 수정
- exam_social.hwp p.1: 자연 해소 (문단 0.1 의 1×1 표 셀이 paras=3 으로
unwrap 조건 미충족 → 외부 표 정상 렌더, cell-clip 통합 + width 411.92 정상화)
회귀 0건 확정.
단계 1 에서 layout_table 의 1×1 unwrap 조건만 강화했으나, height_measurer.rs 의 measure_table_impl 에 동일 결함 코드가 남아있어 외부 표 측정 시 nested 1×1 헤더로 unwrap 되어 measured_table.row_heights = [4329HU=57.72px] 로 잡혔다. layout 단계에서 measured_table 이 있으면 resolve_row_heights 가 early return 하므로 외부 표 권위 cell.height(50720HU)가 무시되고 cell-clip 이 57.72px 로 잡혀 nested 11×3 그리드(y=295~)가 모두 클립 밖으로 가려졌다. layout_table 과 동일한 4가지 조건 (paragraphs.len()==1 + control 정확히 1개의 nested table + visible text 없음) 으로 좁혔다. 검증: SVG → PNG 변환에서 페이지 5의 4그룹 + 12 추진과제 그리드가 PDF 권위본 과 시각적으로 정합. 페이지 5 PNG 26KB → 142KB (×5.5).
단계 3 진행 중 발견된 height_measurer.rs 의 동일 결함 (Stage 3 fix, commit 7d8cca27) 으로 nested 11×3 그리드 시각 표시 회복. PDF 권위본 5쪽 4그룹 + 12 추진과제 모두 정합 (rsvg-convert 변환 PNG 26KB → 142KB). 광범위 회귀 재검증 (Stage 1 + Stage 3 fix 통합): 159 샘플 / 1502 페이지 / diff 3건 (의도 변경 2 + 자연 해소 1, Stage 2 결과와 동일) — 회귀 0건. 보조 관찰: - 페이지 2~3 hwp_used diff = -791.9 / -1658.3 px → 본 수정 무관, 별개 결함 - 단계 1 보고서의 LAYOUT_OVERFLOW 자연 해소 주장 정정 (pr-task677 환경 차이) 산출물: stage3.md / report.md / orders/20260508.md.
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.
요약
samples/table-vpos-01.hwpx5쪽 마지막 큰 표(pi=34, "정부혁신 4대 추진전략 / 12대 추진과제")의 nested 11×3 그리드(4그룹 + 12 추진과제)가 SVG 출력에서 시각적으로 누락되는 결함을 수정합니다.PDF 권위본 (
pdf/table-vpos-01-2022.pdf) 5쪽과 시각 정합 회복.결함 본질 (두 곳 동일 코드 결함)
외부 1×1 표 셀 안에 nested 표 2개 (1×1 헤더 + 11×3 그리드) 가 있는 구조 처리 시:
src/renderer/layout/table_layout.rs::layout_table()src/renderer/height_measurer.rs::measure_table_impl()두 곳 모두 1×1 래퍼 unwrap 로직이 `flat_map(...).find_map(...)` 으로 셀 paragraphs 전체를 훑어 첫 nested 표만 가져오는 패턴.
paragraphs 가 2개 이상이면 두 번째 nested 표가 통째 누락:
두 결함이 결합되어 페이지 5 의 nested 11×3 그리드가 SVG 에 그려지지 않거나 클립으로 가려졌습니다.
수정
두 곳 모두 unwrap 조건을 다음 4가지 모두 충족하는 경우로 좁힘:
검증
시각 정합 (DoD 1~4)
`rsvg-convert` 로 SVG → PNG 변환:
광범위 회귀 (DoD 5)
159 샘플 / 1502 페이지 SVG byte 비교:
단위 테스트 (DoD 6)
`cargo test` 1192+ 테스트 전부 통과 (SVG 스냅샷 6건 포함)
보조 관찰 (별개 결함, 본 PR 범위 외)
Test plan
closes #688
🤖 Generated with Claude Code