diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-10-07 15:35:33 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-10-07 15:35:56 +0200 |
commit | 8fab6ab36589d0dcd75d45feab43a0b06b7f2a3e (patch) | |
tree | 6471120650079335e156d46007071ae80a1bc463 /xmlsecurity/source/component | |
parent | 96814d2469f476790999634a1b7a9cd75447bef7 (diff) |
filter: don't loose signing description during pdf export
The free-form string attached to a signature is called description
during ODF/OOXML signing. The certificate chooser dialog has an input
field to provide that. The PDF export dialog's signature tab reuses
this dialog, but also provides an an own reason input field for the same
purpose.
So in case the generic dialog's description field is filled, don't
simply throw away that string, but set the pdf export's reason field to
the same value.
XDocumentDigitalSignatures.idl is not a published interface and it is
used only internally, so the API change is only nominal.
Change-Id: I6d4cf0b3f586417a76a052dc30c960478a95c984
Diffstat (limited to 'xmlsecurity/source/component')
-rw-r--r-- | xmlsecurity/source/component/documentdigitalsignatures.cxx | 3 | ||||
-rw-r--r-- | xmlsecurity/source/component/documentdigitalsignatures.hxx | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index eb39cafa9397..cfa3d247634f 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -440,7 +440,7 @@ sal_Bool DocumentDigitalSignatures::isAuthorTrusted( return bFound; } -Reference< css::security::XCertificate > DocumentDigitalSignatures::chooseCertificate() throw (RuntimeException, std::exception) +Reference< css::security::XCertificate > DocumentDigitalSignatures::chooseCertificate(OUString& rDescription) throw (RuntimeException, std::exception) { Reference< css::xml::crypto::XSecurityEnvironment > xSecEnv; @@ -454,6 +454,7 @@ Reference< css::security::XCertificate > DocumentDigitalSignatures::chooseCertif return Reference< css::security::XCertificate >(nullptr); Reference< css::security::XCertificate > xCert = aChooser->GetSelectedCertificate(); + rDescription = aChooser->GetDescription(); if ( !xCert.is() ) return Reference< css::security::XCertificate >(nullptr); diff --git a/xmlsecurity/source/component/documentdigitalsignatures.hxx b/xmlsecurity/source/component/documentdigitalsignatures.hxx index 7ab640570e2d..bd07304ed20c 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.hxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.hxx @@ -96,7 +96,7 @@ public: void SAL_CALL addAuthorToTrustedSources( const css::uno::Reference< css::security::XCertificate >& Author ) throw (css::uno::RuntimeException, std::exception) override; void SAL_CALL addLocationToTrustedSources( const OUString& Location ) throw (css::uno::RuntimeException, std::exception) override; - css::uno::Reference< css::security::XCertificate > SAL_CALL chooseCertificate( ) throw (css::uno::RuntimeException, std::exception) override; + css::uno::Reference< css::security::XCertificate > SAL_CALL chooseCertificate(OUString& rDescription) throw (css::uno::RuntimeException, std::exception) override; }; css::uno::Reference< css::uno::XInterface > SAL_CALL DocumentDigitalSignatures_CreateInstance( |