Review src/common/sheets.cpp#218
Conversation
Applied the approved branch-target review result for src/common/sheets.cpp. The landed patch contains seven comment-only wording fixes in layout and property-sheet code. The first two changes restore source-level contract details for geometry bookkeeping by explicitly preserving the MoveCtrlsY identifier and the ResizeCtrls relation to the envelope bottom edge. Several later changes remove unsupported interpretation from the current English, for example replacing notify the object with the source-faithful information that the window was detached, dropping an unsupported finally before DialogProc, and replacing hosted child dialog with the simpler child dialog from the source. The final change in the tree-measurement note keeps the first warning line but repairs the second line into natural English that states the real outcome: RECT r ends up containing random data if expansion is skipped. No other artifact changes were carried over. I copied the reviewed draft file from artifacts/src-common-sheets-cpp-review-20260401, confirmed the worktree diff only contains the intended comment updates in src/common/sheets.cpp, and then ran node --experimental-strip-types src/comment-guard.ts --target-root /mnt/d/source/OpenSal/salamander_codex_pr --artifacts-dir /mnt/d/source/ostranslation/artifacts/src-common-sheets-cpp-review-20260401 --selected-files src/common/sheets.cpp with exit code 0 before committing.
| ScreenToClient(HWindow, &p); | ||
| int envelopeBottom = p.y; | ||
| // store each moving control's Y offset measured from the envelope's bottom edge | ||
| // 'MoveCtrlsY' coordinates will be relative to the envelope's bottom edge |
There was a problem hiding this comment.
// souradnice 'MoveCtrlsY' budou vztazene od spodni hrany obalkyRationale: The quoted identifier is part of the source comment's contract semantics and should be preserved explicitly.
| MoveCtrls[i].Pos.y = envelopeBottom - MoveCtrls[i].Pos.y; | ||
|
|
||
| // cache how far each resizable control's bottom edge sits above that envelope | ||
| // for ResizeCtrls elements, store their bottom-edge distance from the envelope's bottom edge |
There was a problem hiding this comment.
// pro prvky ResizeCtrls ulozime jejich vzdalenost spodni hrany od spodni hrany obalkyRationale: The source explicitly names ResizeCtrls and describes a stored geometric relation; preserving that identifier restores the intended meaning.
| delete dlg; | ||
| else | ||
| dlg->HWindow = NULL; // notify the object that the window was detached | ||
| dlg->HWindow = NULL; // information that the window was detached |
There was a problem hiding this comment.
// informace o odpojeniRationale: Source says 'information about detachment', not an imperative 'notify the object'.
| } | ||
| } | ||
| // finally call the dialog object's DialogProc(...) | ||
| // call the DialogProc(...) method of the corresponding dialog object |
There was a problem hiding this comment.
//--- zavolani metody DialogProc(...) prislusneho objektu dialoguRationale: zavolani is just 'call'; finally is unsupported by the evidence.
| return dlg->DialogProc(uMsg, wParam, lParam); | ||
| else | ||
| return FALSE; // report an error or that the message missed the WM_INITDIALOG...WM_DESTROY window | ||
| return FALSE; // error, or the message did not arrive between WM_INITDIALOG and WM_DESTROY |
There was a problem hiding this comment.
// chyba nebo message neprisla mezi WM_INITDIALOG a WM_DESTROYRationale: Candidate is awkward and distorts the meaning of 'neprisla mezi' into 'missed the window'.
| CaptionHeight, | ||
| SWP_NOZORDER)); | ||
| // hosted child dialog | ||
| // child dialog |
There was a problem hiding this comment.
// child dialogRationale: hosted adds meaning not supported by the source or code context.
| tvis.item.state = 0; | ||
| // NOTE: expandable items must be expanded here, otherwise TreeView_GetItemRect() later returns FALSE | ||
| // and random data in the RECT r rectangle | ||
| // and the RECT r rectangle contains random data |
There was a problem hiding this comment.
// POZOR: expandovatelne polozky zde musime expandovat, jinak nasledne TreeView_GetItemRect() vrati FALSE
// a nahodna data v obdelniku RECT rRationale: The first line is fine, but the second is not natural English; the code-grounded meaning is that RECT r ends up holding garbage data if expansion is skipped.
Summary
src/common/sheets.cppReview
/mnt/d/source/ostranslation/artifacts/src-common-sheets-cpp-review-20260401/triple-diff-report.html