Task #1070: HWPX TAC 표 line0 + 본문줄 post-text 표줄 제외 — 본문 하단 overflow 해소 (closes #1070)#1072
Closed
planet6897 wants to merge 1 commit into
Closed
Task #1070: HWPX TAC 표 line0 + 본문줄 post-text 표줄 제외 — 본문 하단 overflow 해소 (closes #1070)#1072planet6897 wants to merge 1 commit into
planet6897 wants to merge 1 commit into
Conversation
…verflow 해소 (closes edwardkim#1070) ## 증상 거의 한 페이지 크기 treat_as_char(TAC) 표가 첫 줄에 있고 그 뒤에 본문 줄이 있는 문단에서, 표는 거의 fit하나 후속 본문 텍스트가 표 높이만큼 추가 하강해 편집영역 하단을 348~472px 초과. 재현(공개 샘플): 2025년 기부·답례품…양식.hwpx(pi=25 472px), hwpx/hwpx-h-02.hwpx(pi=51 348px), hwpx/2025년 2분기 해외직접투자(최종).hwpx. ## 근본 원인 place_table_with_text(typeset.rs) 의 post_table_start 가 attr & 0x01(HWP5 TAC 비트)에만 의존 → HWPX TAC 표(비트0=0)는 else 로 떨어져 post_start=0 → 표줄(line0)이 post-text PartialParagraph 에 포함 → 후속 본문 줄이 표 높이만큼 하강. HWP5 TAC 는 pre_end.max(1) 로 이미 표줄 제외 → HWPX 한정 갭. ## 수정 treat_as_char && total_lines > pre_end+1 (표줄 다음에 실제 본문 줄) 일 때만 post_start = pre_end+1 로 표줄 제외(HWP5 정합). 단일줄 TAC 표는 불변 — 단순 blanket(|| treat_as_char) 은 단일줄 표 post-text 까지 제거해 mel-001 회귀. ## 검증 - 재현 3파일 본문 overflow 해소. - 전수 sweep 3057→3043 lines / 382815→376707px (회귀 0, sample16-hwp5.hwpx 35→15·aift 5→4·tac-img-02.hwpx 7→6 개선). - 회귀 가드 3 신규(tests/issue_1070, SVG text max_y ≤ 페이지 높이) 통과. - golden SVG 8/8, cargo test --release lib 1324 + 통합 0 failed, clippy/fmt clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
|
Cherry-picked into devel as 0facb1b. Maintainer validation completed: cargo fmt --check passed, cargo test --release --lib passed (1335 passed / 0 failed / 6 ignored), issue_1070_tac_table_post_text_overflow passed (3/3), WASM build passed, and visual judgment passed. Closing this PR as integrated via cherry-pick. |
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.
증상
거의 한 페이지 크기
treat_as_char(TAC) 표가 첫 줄에 있고 그 뒤에 본문 줄이 있는 문단에서, 표는 거의 fit하나 후속 본문 텍스트가 표 높이만큼 추가 하강해 편집영역 하단을 348~472px 초과 (#1070).2025년 기부·답례품…양식.hwpxhwpx/hwpx-h-02.hwpxhwpx/2025년 2분기 해외직접투자 (최종).hwpx근본 원인
place_table_with_text(typeset.rs)의post_table_start가attr & 0x01(HWP5 TAC 비트)에만 의존. HWPX TAC 표는 비트0=0 → 마지막else→post_table_start = pre_end(=0)→ 표줄(line0)이 post-textPartialParagraph(0..total_lines)에 포함 → 후속 본문 줄이 표 높이만큼 하강.HWP5 TAC(attr&0x01)는
pre_end.max(1)로 이미 표줄을 제외 → HWPX 한정 갭. (#1068의 lh over-inflation 과는 별개 원인.)수정
treat_as_char && total_lines > pre_end + 1(표줄 뒤에 실제 본문 줄) 일 때만 표줄 제외. 단일줄 TAC 표는 불변 — 단순 blanket 확장(|| treat_as_char)은 단일줄 표의 post-text 까지 제거해 mel-001 회귀(검증으로 확정), 정밀 게이트로 회피.검증
lines=0..2 → 1..2, 표줄 제외).hwp3-sample16-hwp5.hwpx35→15 ·aift.hwpx5→4 ·tac-img-02.hwpx7→6 개선).tests/issue_1070_tac_table_post_text_overflow.rs— SVG<text>max_y ≤ 페이지 높이) 통과.cargo test --releaselib 1324 passed + 통합 0 failed, clippy/fmt clean.🤖 Generated with Claude Code