mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-10 13:01:29 +00:00
M5: set_locked keeps its own doc comment; set_popup's starts its own (#2137)
set_popup had been added between set_locked's doc comment and the function, so rustdoc gave set_popup the lock text and set_locked none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC
This commit is contained in:
1 parent
ce18aeaf46
commit
4e6a3db72e
1 file changed
+2
-2
@@ -1844,8 +1844,6 @@ fn unlocked(doc: &Document, r: ObjRef) -> Result<(), AnnotError> {
|
||||
if flags(doc, r) & FLAG_LOCKED != 0 { Err(AnnotError::Invalid("the comment is locked".into())) } else { Ok(()) }
|
||||
}
|
||||
|
||||
/// Lock or unlock a comment (the Locked flag). A locked comment can't be moved, resized,
|
||||
/// restyled or deleted; its text and replies stay editable, as in Acrobat.
|
||||
/// Open, close or move a comment's pop-up window (Acrobat: double-click a comment to open it,
|
||||
/// drag its title bar to move it). `rect` is the pop-up's new `/Rect` in user space; `open` its
|
||||
/// `/Open`. A comment without a `/Popup` gets one, placed to the right of the comment as new
|
||||
@@ -1917,6 +1915,8 @@ pub fn set_popup(doc: &mut Document, page: usize, index: usize, rect: Option<[f6
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Lock or unlock a comment (the Locked flag). A locked comment can't be moved, resized,
|
||||
/// restyled or deleted; its text and replies stay editable, as in Acrobat.
|
||||
pub fn set_locked(doc: &mut Document, page: usize, index: usize, locked: bool) -> Result<(), AnnotError> {
|
||||
let (_, r) = annot_ref(doc, page, index)?;
|
||||
let f = if locked { flags(doc, r) | FLAG_LOCKED } else { flags(doc, r) & !FLAG_LOCKED };
|
||||
|
||||
Reference in new issue
Block a user