summaryrefslogtreecommitdiff
path: root/cui/source/options/optgenrl.cxx
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2017-11-29 23:07:47 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-12-06 12:26:40 +0100
commit1c58b047d117bb087abc571b74c06cdf7499b1a0 (patch)
treead4dba7df6260e327309621bec345183874ac3d8 /cui/source/options/optgenrl.cxx
parentdb5466887810f428f2df4bfc101afe76a928222a (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>
Diffstat (limited to 'cui/source/options/optgenrl.cxx')
-rw-r--r--cui/source/options/optgenrl.cxx22
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()