Skip to content

HWPX 저장 시 본문 문단의 인라인 ColumnDef(cold) 드롭 → 컨트롤 인덱스 시프트 #1584

Description

@planet6897

요약

HWPX 저장 시 본문 문단의 인라인 ColumnDef(cold/<hp:colPr>)가 드롭된다. 다중 컨트롤을
가진 첫 문단(섹션 시작)에서 발생. roundtrip 후 controls 6→5, 컨트롤 인덱스가 밀려 후속
표/필드 참조가 어긋나고 char_offset/char_shape 가 연쇄 변위한다. fidelity v9(실문서 9350건)
잔여 IR_DIFF 의 최대 단일 클래스(약 49건, 체계적).

증거 (3개 파일 동일)

36382399·36383909·36385063 문단 0.0 (" ", controls=6):

[차이] cc: A=59 vs B=51                 # -8 (ColumnDef 8유닛 슬롯 소실)
[차이] char_offsets[0]: A=32 vs B=24    # -8
[차이] controls count: A=6 vs B=5       # 컨트롤 1개 드롭
[차이] ctrl[2] type: A=cold vs B=field  # ColumnDef(cold) 가 사라지고 인덱스 시프트

→ 게이트(diff_documents)는 이를 표 셀 char_shape (0,3)→(0,6) 하위 증상으로 보고(혼동 주의).

근본원인

src/serializer/hwpx/section.rs:

  • is_hwpx_inline_slot()Control::ColumnDef 를 제외 → 본문(depth 0)에서 ColumnDef 는
    인라인 슬롯이 아니다.
  • 본문 ColumnDef 는 첫 1개만 섹션 템플릿 colPr 앵커로 치환(~line 120 TEMPLATE_BODY_COL_PR).
  • subList(depth>0)에선 인라인 방출(line 434-435, 832)하나, 본문의 추가/중간 인라인 ColumnDef
    는 어느 경로로도 방출되지 않아 드롭
    된다.

수정 방향

수용 기준

근거: output/poc/fidelity9/report.md, #1388·#1407(컬럼 모델).

재확인 (devel HEAD, 36382399)

문단0 컨트롤: orig [secPr,ctrl,colPr,ctrl,colPr,ctrl,fieldBegin,tbl]
              rt   [secPr,ctrl,colPr,ctrl,           fieldBegin,tbl]
colPr 개수: orig 2 → rt 1  (2번째 인라인 ColumnDef 드롭)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions