summaryrefslogtreecommitdiff
path: root/xmlsecurity/inc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-10-25 11:33:21 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-10-25 12:03:58 +0000
commitd34a8993e3b3200de10d20990d14dc9288d8d6c7 (patch)
tree7badd63df935d24569688d914d2af3603f5672d7 /xmlsecurity/inc
parent9b09a217c79e8a35fc4de54c89ef49fbf8f72752 (diff)
xmlsecurity PDF sign: append reference to the Page's Annots key
Previously we assumed that the Page object's dictionary has no Annots key. Now detect if that's not true, and in that case don't just copy of the whole dictionary (as part of the incremental update), instead copy it in two steps, so we can insert our reference in the middle. This is needed (but not enough alone) to be able to sign a PDF document multiple times. Change-Id: Ia5bf993320428eef80551e7e9cc7bfb2b858db7f Reviewed-on: https://gerrit.libreoffice.org/30257 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'xmlsecurity/inc')
-rw-r--r--xmlsecurity/inc/pdfio/pdfdocument.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmlsecurity/inc/pdfio/pdfdocument.hxx b/xmlsecurity/inc/pdfio/pdfdocument.hxx
index b02bf9322088..3886eab8e73a 100644
--- a/xmlsecurity/inc/pdfio/pdfdocument.hxx
+++ b/xmlsecurity/inc/pdfio/pdfdocument.hxx
@@ -37,7 +37,13 @@ public:
virtual ~PDFElement() { }
};
-/// In-memory representation of an on-disk PDF document.
+/**
+ * In-memory representation of an on-disk PDF document.
+ *
+ * The PDF element list is not meant to be saved back to disk, but some
+ * elements remember their source offset / length, and based on that it's
+ * possible to modify the input file.
+ */
class XMLSECURITY_DLLPUBLIC PDFDocument
{
/// This vector owns all elements.