diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-06-25 10:58:25 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-06-25 14:29:54 +0200 |
commit | 022f6bb1f7ed06edb126a2b85719d8622104bb57 (patch) | |
tree | c646fd43f4d30cba1d45ea117fac4a62273110d8 /include | |
parent | 798f8c2efac28ff15a2f7aa5e39c3744756de5b2 (diff) |
sd signature line: place shape on the correct page
PDFDocument::Sign() had this hardcoded to always place the signature
widget on the first page, add a way so that xmlsecurity/ can tell the
pdf signing code to put it on an other page.
This way in case the user created the signature line shape on the Nth
page, it'll end up on the Nth page of the PDF result as well, as
expected.
Change-Id: I63decba98774151e9634ea924c2fed0f7814cb28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97045
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/filter/pdfdocument.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/vcl/filter/pdfdocument.hxx b/include/vcl/filter/pdfdocument.hxx index 70ca731d1d19..8fbd811a0429 100644 --- a/include/vcl/filter/pdfdocument.hxx +++ b/include/vcl/filter/pdfdocument.hxx @@ -353,6 +353,9 @@ class VCL_DLLPUBLIC PDFDocument : public PDFObjectContainer /// Signature line in PDF format, to be consumed by the next Sign() invocation. std::vector<sal_Int8> m_aSignatureLine; + /// 0-based page number where m_aSignatureLine should be placed. + size_t m_nSignaturePage = 0; + /// Suggest a minimal, yet free signature ID to use for the next signature. sal_uInt32 GetNextSignature(); /// Write the signature object as part of signing. @@ -409,6 +412,7 @@ public: /// Read elements from the start of the stream till its end. bool Read(SvStream& rStream); void SetSignatureLine(const std::vector<sal_Int8>& rSignatureLine); + void SetSignaturePage(size_t nPage); /// Sign the read document with xCertificate in the edit buffer. bool Sign(const css::uno::Reference<css::security::XCertificate>& xCertificate, const OUString& rDescription, bool bAdES); |