[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sfx2/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Nov 5 11:56:57 UTC 2018
sfx2/source/dialog/dinfdlg.cxx | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
New commits:
commit 7a91f377a0183efc61e69a32931c031718a5a3eb
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Nov 2 23:06:26 2018 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 5 12:56:16 2018 +0100
Handle the case if no digital signature code is implemented (iOS, currently)
Change-Id: I1cf37fccdd3a58d50a015b3fc32c32fba89f2f09
Reviewed-on: https://gerrit.libreoffice.org/62866
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 6255a76e6c43..ceb6d87af82d 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -883,13 +883,20 @@ void SfxDocumentPage::ImplUpdateSignatures()
SfxMedium* pMedium = pDoc->GetMedium();
if ( pMedium && !pMedium->GetName().isEmpty() && pMedium->GetStorage().is() )
{
- Reference< security::XDocumentDigitalSignatures > xD(
- security::DocumentDigitalSignatures::createDefault(comphelper::getProcessComponentContext()) );
-
+ Reference< security::XDocumentDigitalSignatures > xD;
+ try
+ {
+ xD = security::DocumentDigitalSignatures::createDefault(comphelper::getProcessComponentContext());
+ }
+ catch ( const css::uno::DeploymentException& )
+ {
+ }
OUString s;
Sequence< security::DocumentSignatureInformation > aInfos;
- aInfos = xD->verifyDocumentContentSignatures( pMedium->GetZipStorageToSign_Impl(),
- uno::Reference< io::XInputStream >() );
+
+ if ( xD.is() )
+ aInfos = xD->verifyDocumentContentSignatures( pMedium->GetZipStorageToSign_Impl(),
+ uno::Reference< io::XInputStream >() );
if ( aInfos.getLength() > 1 )
s = m_aMultiSignedStr;
else if ( aInfos.getLength() == 1 )
More information about the Libreoffice-commits
mailing list