diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-08 00:21:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-08 09:29:31 +0100 |
commit | 5832f347114c0bebc1fec501b60ed8ba05227166 (patch) | |
tree | d9e3f77b6446fcdc5e9769ec67517196f043142a /cui | |
parent | 3a53904ae64fa87216fcc972dbc746068c640818 (diff) |
Related: fdo#40420 don't crash on missing/failing xmlsecurity lib
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optinet2.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 9e046968dffd..a8fe225571da 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -873,11 +873,17 @@ IMPL_LINK( SvxSecurityTabPage, ShowPasswordsHdl, PushButton*, EMPTYARG ) IMPL_LINK( SvxSecurityTabPage, MacroSecPBHdl, void*, EMPTYARG ) { - Reference< security::XDocumentDigitalSignatures > xD( - comphelper::getProcessServiceFactory()->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.security.DocumentDigitalSignatures" ) ) ), UNO_QUERY ); - if ( xD.is() ) - xD->manageTrustedSources(); - + try + { + Reference< security::XDocumentDigitalSignatures > xD( + comphelper::getProcessServiceFactory()->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.security.DocumentDigitalSignatures" ) ) ), UNO_QUERY ); + if ( xD.is() ) + xD->manageTrustedSources(); + } + catch (const Exception& e) + { + OSL_FAIL(rtl::OUStringToOString(e.Message, osl_getThreadTextEncoding()).getStr()); + } return 0; } |