From 1d1d0bd4d941c58306f3086cf3103b40ad0978ba Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sun, 17 Oct 2021 11:59:18 +0200 Subject: Simplify Sequences in xmlsecurity Change-Id: I749e19f786ad006dffcd65dd1ee60e57c428f57b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123717 Tested-by: Jenkins Reviewed-by: Julien Nabet --- xmlsecurity/source/component/documentdigitalsignatures.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'xmlsecurity/source/component') diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index 686c49d91b63..50cbdf7184a0 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -689,13 +689,10 @@ DocumentDigitalSignatures::chooseCertificatesImpl(std::map& CertificateChooser aChooser(Application::GetFrameWeld(mxParentWindow), std::move(xSecContexts), eAction); - uno::Sequence< Reference< css::security::XCertificate > > xCerts(1); - xCerts[0] = Reference< css::security::XCertificate >(nullptr); - if (aChooser.run() != RET_OK) - return xCerts; + return { Reference< css::security::XCertificate >(nullptr) }; - xCerts = aChooser.GetSelectedCertificates(); + uno::Sequence< Reference< css::security::XCertificate > > xCerts = aChooser.GetSelectedCertificates(); rProperties["Description"] = aChooser.GetDescription(); rProperties["Usage"] = aChooser.GetUsageText(); -- cgit