Repository navigation
fix(layout): read an object offset written with a minus sign as 0, as Hancom does - #459
Merged
Merged
Conversation
… Hancom does Hancom keeps an offset up or left as an unsigned 32-bit number. One written with a minus sign instead (vertOffset="-1500") it reads as 0: it draws the object at its paragraph's (or the paper's) place and saves 0. The page estimate read such a value as that far up, so the lines after the object went elsewhere than Hancom put them. It now reads every vertOffset and horzOffset through one helper that does as Hancom does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
리뷰 결과: 막을 것은 없습니다. CI가 통과하면 병합합니다.
|
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.
무엇
한/글은 위·왼쪽으로 올린 개체 오프셋을 부호 없는 32비트로 저장한다(-1500 →
4294965796). 빼기 부호로 쓴 값(vertOffset="-1500")은 0으로 읽는다. 개체를 문단(또는 종이) 기준 자리에 그대로 그리고, 저장할 때 0으로 고쳐 쓴다.쪽 수 추정은 그런 값을 그만큼 위(왼쪽)로 읽어서, 개체 뒤 줄 자리가 한/글과 달랐다. 이제
vertOffset·horzOffset을 읽는 19곳이 모두_pos_offset()하나를 거친다. 빼기 부호로 쓴 값은 0으로, 나머지는 전처럼 부호 없는 수로 읽는다.확인
pages_para_shape_signed_offset은 한/글이 0으로 고쳐 쓴 판이다. 거기에-1500을 다시 써 넣고 추정한 줄 자리가, 줄 배치 정보가 있을 때와 지웠을 때 모두 한/글과 같은지 보는 새 시험을 더했다. 고치기 전 코드에서는 실패한다(13번째 문단 23500, 한/글은 25000).pages_paper_shape_signed_offsets)은 전에도 맞았고 지금도 맞다.참고
이 컴퓨터의 하드웨어 점검 때문에 이 PC에서 전체 시험과 넓은 문서 대조는 돌리지 않았다. 전체 시험은 GitHub CI가 돌린다. 넓은 대조는 점검 뒤에 하고, 결과를 여기에 남긴다.
🤖 Generated with Claude Code