[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - xmlsecurity/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jul 19 10:10:20 UTC 2018


 xmlsecurity/source/component/documentdigitalsignatures.cxx |    4 +---
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx     |    8 ++++++++
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit cab01329c36b6b29a25814bb28d542ff36c56848
Author:     Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Tue Jul 10 21:56:59 2018 +0200
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Thu Jul 19 12:09:59 2018 +0200

    xmlsecurity UI: restore lost AdES default for PDF signing
    
    Regression from 13596e704e4b48e8b0892867b3f3fc351a2729f9 (Don't pass ODF
    version, just retrieve it directly, 2018-05-17).
    
    Change-Id: Ia031e597c610000db2820920c3dc1b58430dcc12
    Reviewed-on: https://gerrit.libreoffice.org/57246
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    (cherry picked from commit a9c0289886ee5519d4a718d8e3145d66b187faac)
    Reviewed-on: https://gerrit.libreoffice.org/57259
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index e814d681dd91..f2d4bc6d626e 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -383,9 +383,7 @@ bool DocumentDigitalSignatures::ImplViewSignatures(
     SAL_WARN_IF( !bInit, "xmlsecurity.comp", "Error initializing security context!" );
     if ( bInit )
     {
-        if (rxStorage.is())
-            // Something ZIP based: ODF or OOXML.
-            aSignaturesDialog->SetStorage( rxStorage );
+        aSignaturesDialog->SetStorage(rxStorage);
 
         aSignaturesDialog->SetSignatureStream( xSignStream );
         if ( aSignaturesDialog->Execute() )
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 26f694623646..253c18a2748c 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -229,6 +229,14 @@ bool DigitalSignaturesDialog::Init()
 
 void DigitalSignaturesDialog::SetStorage( const css::uno::Reference < css::embed::XStorage >& rxStore )
 {
+    if (!rxStore.is())
+    {
+        // PDF supports AdES.
+        m_bAdESCompliant = true;
+        m_pAdESCompliantCB->Check(m_bAdESCompliant);
+        return;
+    }
+
     maSignatureManager.mxStore = rxStore;
     maSignatureManager.maSignatureHelper.SetStorage( maSignatureManager.mxStore, m_sODFVersion);
 


More information about the Libreoffice-commits mailing list