diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-11-29 23:07:47 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-12-07 16:14:31 +0100 |
commit | c7fa2da1532d9f140cb9018b0a62c62228c67ba1 (patch) | |
tree | 9abcad0b4f3f49bcf082709c4d9d6fa743403454 /cui | |
parent | bfe2fb8ceed6643574010bf7b40f04d149f0fd6d (diff) |
Restore GPG SEInitializer service
user config now needs it to collect user's private GPG keys
Change-Id: Ia4ad4133b621160cf37281750cafa9f3c5c3c231
Reviewed-on: https://gerrit.libreoffice.org/45562
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 1c58b047d117bb087abc571b74c06cdf7499b1a0)
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optgenrl.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index a4465ad01487..8639d764c823 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -18,6 +18,13 @@ */ #include <comphelper/string.hxx> + +#include <config_gpgme.h> +#if GPGME_HAVE_GPGME +#include <com/sun/star/xml/crypto/GPGSEInitializer.hpp> +#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp> +#endif + #include <i18nlangtag/mslangid.hxx> #include <vcl/svapp.hxx> #include <vcl/msgbox.hxx> @@ -32,6 +39,8 @@ #include <svx/dlgutil.hxx> #include <svx/svxids.hrc> +using namespace css; + namespace { @@ -205,6 +214,19 @@ SvxGeneralTabPage::SvxGeneralTabPage(vcl::Window* pParent, const SfxItemSet& rCo InitControls(); SetExchangeSupport(); // this page needs ExchangeSupport SetLinks(); +#if GPGME_HAVE_GPGME + // unused yet, I just wanted to see if this delivers the desired results + uno::Reference< xml::crypto::XSEInitializer > xSEInitializer; + try + { + xSEInitializer = xml::crypto::GPGSEInitializer::create( comphelper::getProcessComponentContext() ); + uno::Reference<xml::crypto::XXMLSecurityContext> xSC = xSEInitializer->createSecurityContext( OUString() ); + // completely bogus, this is just to appease loplugins + xSEInitializer->freeSecurityContext( xSC ); + } + catch ( uno::Exception const & ) + {} +#endif } SvxGeneralTabPage::~SvxGeneralTabPage() |