Extend PDFGraphicAnnotation with the raw PDF fields — /IRT, /RT,
/State, /StateModel, and /F plus each annotation's pdfium index —
that are needed to reconstruct a thread on the sd side.
The sd PDF filter uses them to:
- mark every imported PDF annotation as threaded (any PDF comment
can be replied to / resolved);
- link replies to their parent via /IRT (page-scoped per spec);
- collapse Acrobat-style state-change annotations into the target's
IsResolved flag — /IRT + /State + /StateModel, with /F carrying
the Hidden | NoZoom | NoRotate bits.
Only /StateModel = "Review" with /State = "Completed" maps to
resolved; other state models are discarded. /RT = "Group" is honoured
as a grouping relationship, not a reply. Acrobat's per-user state
model (each reviewer maintains their own state-change pointing at the
same target) is collapsed to a single boolean per comment — resolved
if any reviewer's latest state is Completed. The mapping is lossy;
the in-code comment on StateChange documents the trade-off.
Also make newly added comments threaded (allowing to resolve), when
the document is PDF.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I88e2bbe1202ada7b2e21a3ed90f2eb28760dcd6f
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1455
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 72a729882982ebf29cbbc5bdf5000621b53b2d8a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207212
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Files with the string 'CVE' in their name are encrypted to avoid problems with virus checkers on source code download.; use: mdecrypt --bare -a arcfour -o hex -k 435645 -s 3 foo.doc # to unencrypt mcrypt --bare -a arcfour -o hex -k 435645 -s 3 foo.doc # to create new tests to get access to the plain files for manual testing.