Skip to content

fix(html): 인접 셀 border line_type=0일 때 반대쪽 셀 border fallback 적용#129

Merged
ohah merged 10 commits intomainfrom
fix/table-border-linetype0-fallback
Mar 14, 2026
Merged

fix(html): 인접 셀 border line_type=0일 때 반대쪽 셀 border fallback 적용#129
ohah merged 10 commits intomainfrom
fix/table-border-linetype0-fallback

Conversation

@ohah
Copy link
Copy Markdown
Owner

@ohah ohah commented Mar 14, 2026

Summary

  • 셀 경계에서 primary border가 line_type=0(선 없음)일 때 secondary border(반대쪽 셀)를 시도하도록 수정
  • horizontal_segment_borderlinevertical_segment_borderline 양쪽에 동일 로직 적용
  • table-bug.hwp page 10의 마이스터부 상단 가로선(y=195.91, M109.09,195.91 L165.34,195.91) 렌더링 복원

Test plan

  • cargo clippy 통과
  • cargo test --package hwp-core 전체 통과
  • table-bug.hwp page 10 스냅샷에서 마이스터부 상단 border 확인
  • 다른 페이지 스냅샷 변경 없음 확인

🤖 Generated with Claude Code

ohah and others added 10 commits March 14, 2026 16:41
셀 경계에서 primary border(상단 셀 bottom / 왼쪽 셀 right)가
line_type=0(선 없음)이면 secondary border(하단 셀 top / 오른쪽 셀 left)를
확인하지 않고 None을 반환하는 버그 수정.

table-bug.hwp page 10의 마이스터부 상단 가로선(y=195.91)이
렌더링되지 않던 문제 해결.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
셀의 line_type·color가 table default와 동일하면 table default(프레임)를
사용하고, 셀이 다른 스타일/색을 명시적으로 설정했으면 셀 border를 사용.

table-bug.hwp의 왼쪽/오른쪽 외곽선이 cell border 두께(0.4-0.5mm)로
렌더링되던 문제를 table default(0.12mm)로 수정.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
interior horizontal border에서 upper cell의 Bottom 대신
lower cell의 Top을 우선 사용하도록 변경.

활동시간 셀(bf49/50)의 두꺼운 Bottom(1mm)이 row 경계에
적용되던 문제를 하단 셀의 Top(0.4mm)으로 수정.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
한컴 원본 HTML(table-bug.HTML)을 분석하여 border 선택 로직을 수정:
- 인접 셀 border 중 더 두꺼운 것을 선택 (pick_thicker_border)
- 외곽 border: max(cell, table_default) 방식 복원
- 활동시간 셀(bf49/50) 1mm 두꺼운 border가 올바르게 렌더링

per-page fixture가 아닌 한컴 원본 HTML을 기준으로 일치 확인.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
HWP 스펙(표 68) 기준: 캡션은 개체 공통 속성에 캡션 리스트(표 71)가
존재할 때만 렌더링해야 함. caption_info가 None인 경우 CtrlHeader
paragraphs를 CaptionData로 생성하지 않도록 수정.

table-bug.hwp page 11에서 "성범죄 경력 조회 및 아동학대 관련
범죄전력조회 동의서" 제목이 하단에 중복 표시되던 문제 해결.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fill 렌더링에서 calculate_cell_top/get_cell_height 대신
row_positions를 사용하여 border와 동일한 정확한 셀 위치/높이 계산.

유의사항 셀에서 회색 배경(fill)이 셀 높이보다 짧아
하단에 흰색 빈틈이 보이던 문제 해결 (5.52mm → 6.64mm).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohah ohah merged commit 9cae702 into main Mar 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant