[Libreoffice-commits] core.git: solenv/clang-format xmlsecurity/source xmlsecurity/util

Miklos Vajna vmiklos at collabora.co.uk
Sun Feb 4 19:01:52 UTC 2018


 solenv/clang-format/blacklist                              |   22 --
 xmlsecurity/source/component/documentdigitalsignatures.cxx |  130 ++++++++++---
 xmlsecurity/source/component/documentdigitalsignatures.hxx |  119 -----------
 xmlsecurity/source/component/registerservices.cxx          |   11 -
 xmlsecurity/util/xmlsecurity.component                     |    3 
 5 files changed, 111 insertions(+), 174 deletions(-)

New commits:
commit 39ba9a307d8485bffad9c218e24bc67634a7c387
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sun Feb 4 10:00:46 2018 +0100

    xmlsecurity: create DocumentDigitalSignatures instances with a constructor
    
    Change-Id: I9780438c3b7f8206fad3bfe29e93d1fcf535b811
    Reviewed-on: https://gerrit.libreoffice.org/49199
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index ff023e82d10f..b34a286c896b 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -163,7 +163,6 @@ avmedia/source/avmediadummy.cxx
 avmedia/source/framework/MediaControlBase.cxx
 avmedia/source/framework/mediacontrol.cxx
 avmedia/source/framework/mediaitem.cxx
-avmedia/source/framework/mediamisc.cxx
 avmedia/source/framework/mediaplayer.cxx
 avmedia/source/framework/mediatoolbox.cxx
 avmedia/source/framework/soundhandler.cxx
@@ -1235,7 +1234,6 @@ chart2/source/inc/RegressionCurveHelper.hxx
 chart2/source/inc/RelativePositionHelper.hxx
 chart2/source/inc/RelativeSizeHelper.hxx
 chart2/source/inc/ResId.hxx
-chart2/source/inc/ResourceManager.hxx
 chart2/source/inc/Scaling.hxx
 chart2/source/inc/SceneProperties.hxx
 chart2/source/inc/StackMode.hxx
@@ -1413,7 +1411,6 @@ chart2/source/tools/RegressionEquation.hxx
 chart2/source/tools/RelativePositionHelper.cxx
 chart2/source/tools/RelativeSizeHelper.cxx
 chart2/source/tools/ResId.cxx
-chart2/source/tools/ResourceManager.cxx
 chart2/source/tools/Scaling.cxx
 chart2/source/tools/SceneProperties.cxx
 chart2/source/tools/StatisticsHelper.cxx
@@ -1723,7 +1720,6 @@ compilerplugins/clang/compat.hxx
 compilerplugins/clang/constantparam.cxx
 compilerplugins/clang/constparams.cxx
 compilerplugins/clang/conststringvar.cxx
-compilerplugins/clang/convertuintptr.cxx
 compilerplugins/clang/countusersofdefaultparams.cxx
 compilerplugins/clang/cppunitassertequals.cxx
 compilerplugins/clang/cstylecast.cxx
@@ -1731,7 +1727,6 @@ compilerplugins/clang/datamembershadow.cxx
 compilerplugins/clang/derefnullptr.cxx
 compilerplugins/clang/dllprivate.cxx
 compilerplugins/clang/dodgyswitch.cxx
-compilerplugins/clang/droplong.cxx
 compilerplugins/clang/dyncastvisibility.cxx
 compilerplugins/clang/dynexcspec.cxx
 compilerplugins/clang/expandablemethods.cxx
@@ -2322,8 +2317,6 @@ connectivity/source/drivers/mork/MorkParser.cxx
 connectivity/source/drivers/mork/MorkParser.hxx
 connectivity/source/drivers/mork/dllapi.h
 connectivity/source/drivers/mork/mork_helper.cxx
-connectivity/source/drivers/mork/post_include_windows.h
-connectivity/source/drivers/mork/pre_include_windows.h
 connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
 connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.hxx
 connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
@@ -2476,8 +2469,6 @@ connectivity/source/inc/ado/WrapIndex.hxx
 connectivity/source/inc/ado/WrapKey.hxx
 connectivity/source/inc/ado/WrapTable.hxx
 connectivity/source/inc/ado/WrapTypeDefs.hxx
-connectivity/source/inc/ado/ado_post_sys_include.h
-connectivity/source/inc/ado/ado_pre_sys_include.h
 connectivity/source/inc/ado/adoimp.hxx
 connectivity/source/inc/calc/CCatalog.hxx
 connectivity/source/inc/calc/CConnection.hxx
@@ -6411,7 +6402,6 @@ include/editeng/memberids.h
 include/editeng/misspellrange.hxx
 include/editeng/mutxhelp.hxx
 include/editeng/nhypitem.hxx
-include/editeng/nlbkitem.hxx
 include/editeng/numdef.hxx
 include/editeng/numitem.hxx
 include/editeng/opaqitem.hxx
@@ -6429,7 +6419,6 @@ include/editeng/pmdlitem.hxx
 include/editeng/postitem.hxx
 include/editeng/prntitem.hxx
 include/editeng/protitem.hxx
-include/editeng/prszitem.hxx
 include/editeng/rsiditem.hxx
 include/editeng/scriptspaceitem.hxx
 include/editeng/scripttypeitem.hxx
@@ -7728,7 +7717,6 @@ include/test/util/xreplaceable.hxx
 include/test/util/xsearchable.hxx
 include/test/xmldiff.hxx
 include/test/xmltesttools.hxx
-include/test/xmlwriter.hxx
 include/toolkit/awt/animatedimagespeer.hxx
 include/toolkit/awt/scrollabledialog.hxx
 include/toolkit/awt/vclxaccessiblecomponent.hxx
@@ -8289,7 +8277,6 @@ io/test/stm/testfactreg.cxx
 io/test/stm/testfactreg.hxx
 io/test/testcomponent.cxx
 io/test/testconnection.cxx
-ios/LibreOfficeLight/LibreOfficeLight/dummyLOkit.c
 ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h
 ios/source/LibreOfficeKit.c
 ios/source/LibreOfficeKit.h
@@ -10017,7 +10004,6 @@ sc/inc/chartuno.hxx
 sc/inc/chgtrack.hxx
 sc/inc/chgviset.hxx
 sc/inc/clipcontext.hxx
-sc/inc/clipdata.hxx
 sc/inc/clipoptions.hxx
 sc/inc/clipparam.hxx
 sc/inc/colcontainer.hxx
@@ -12867,7 +12853,6 @@ setup_native/source/win32/customactions/tools/seterror.hxx
 sfx2/inc/arrdecl.hxx
 sfx2/inc/bitset.hxx
 sfx2/inc/bluthsndapi.hxx
-sfx2/inc/configmgr.hxx
 sfx2/inc/fwkhelper.hxx
 sfx2/inc/guisaveas.hxx
 sfx2/inc/inettbc.hxx
@@ -15761,7 +15746,6 @@ sw/source/core/text/txtfrm.cxx
 sw/source/core/text/txtftn.cxx
 sw/source/core/text/txthyph.cxx
 sw/source/core/text/txtinit.cxx
-sw/source/core/text/txtio.cxx
 sw/source/core/text/txtpaint.cxx
 sw/source/core/text/txtpaint.hxx
 sw/source/core/text/txttab.cxx
@@ -16789,7 +16773,6 @@ test/source/util/xreplaceable.cxx
 test/source/util/xsearchable.cxx
 test/source/vclbootstrapprotector.cxx
 test/source/xmltesttools.cxx
-test/source/xmlwriter.cxx
 testtools/source/bridgetest/bridgetest.cxx
 testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx
 testtools/source/bridgetest/constructors.cxx
@@ -18078,7 +18061,6 @@ vcl/quartz/salgdicommon.cxx
 vcl/quartz/salgdiutils.cxx
 vcl/quartz/salvd.cxx
 vcl/quartz/utils.cxx
-vcl/source/app/IDialogRenderable.cxx
 vcl/source/app/ITiledRenderable.cxx
 vcl/source/app/IconThemeInfo.cxx
 vcl/source/app/IconThemeScanner.cxx
@@ -18913,7 +18895,6 @@ writerperfect/source/calc/StarOfficeCalcImportFilter.hxx
 writerperfect/source/common/DirectoryStream.cxx
 writerperfect/source/common/DocumentHandler.cxx
 writerperfect/source/common/WPFTEncodingDialog.cxx
-writerperfect/source/common/WPFTResMgr.cxx
 writerperfect/source/common/WPXSvInputStream.cxx
 writerperfect/source/draw/CDRImportFilter.cxx
 writerperfect/source/draw/CDRImportFilter.hxx
@@ -19747,7 +19728,6 @@ xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx
 xmlsecurity/source/component/certificatecontainer.cxx
 xmlsecurity/source/component/certificatecontainer.hxx
 xmlsecurity/source/component/documentdigitalsignatures.cxx
-xmlsecurity/source/component/documentdigitalsignatures.hxx
 xmlsecurity/source/component/registerservices.cxx
 xmlsecurity/source/dialogs/certificatechooser.cxx
 xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -19839,8 +19819,6 @@ xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
 xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.hxx
 xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
 xmlsecurity/source/xmlsec/saxhelper.cxx
-xmlsecurity/source/xmlsec/serialnumberadapter.cxx
-xmlsecurity/source/xmlsec/serialnumberadapter.hxx
 xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
 xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
 xmlsecurity/source/xmlsec/xmlsec_init.cxx
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index dd7de2c3bafe..af32a2433760 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "documentdigitalsignatures.hxx"
 #include <resourcemanager.hxx>
 
 #include <digitalsignaturesdialog.hxx>
@@ -47,10 +46,110 @@
 #include <comphelper/sequence.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/security/XDocumentDigitalSignatures.hpp>
 
 using namespace css;
 using namespace css::uno;
 
+class DocumentDigitalSignatures
+    : public cppu::WeakImplHelper<css::security::XDocumentDigitalSignatures,
+                                  css::lang::XInitialization, css::lang::XServiceInfo>
+{
+private:
+    css::uno::Reference<css::uno::XComponentContext> mxCtx;
+    /// will be set by XInitialization. If not we assume true. false means an earlier version (whatever that means,
+    /// this is a string, not a boolean).
+    /// Note that the code talks about "ODF version" even if this class is also used to sign OOXML.
+    OUString m_sODFVersion;
+    /// The number of arguments which were passed in XInitialization::initialize
+    int m_nArgumentsCount;
+    /// Indicates if the document already contains a document signature
+    bool m_bHasDocumentSignature;
+
+    /// @throws css::uno::RuntimeException
+    bool ImplViewSignatures(const css::uno::Reference<css::embed::XStorage>& rxStorage,
+                            const css::uno::Reference<css::io::XStream>& xSignStream,
+                            DocumentSignatureMode eMode, bool bReadOnly);
+    /// @throws css::uno::RuntimeException
+    void ImplViewSignatures(const css::uno::Reference<css::embed::XStorage>& rxStorage,
+                            const css::uno::Reference<css::io::XInputStream>& xSignStream,
+                            DocumentSignatureMode eMode, bool bReadOnly);
+    /// @throws css::uno::RuntimeException
+    css::uno::Sequence<css::security::DocumentSignatureInformation>
+    ImplVerifySignatures(const css::uno::Reference<css::embed::XStorage>& rxStorage,
+                         const ::com::sun::star::uno::Reference<css::io::XInputStream>& xSignStream,
+                         DocumentSignatureMode eMode);
+
+    css::uno::Sequence<css::uno::Reference<css::security::XCertificate>>
+    chooseCertificatesImpl(std::map<OUString, OUString>& rProperties, const UserAction eAction);
+
+public:
+    explicit DocumentDigitalSignatures(
+        const css::uno::Reference<css::uno::XComponentContext>& rxCtx);
+
+    //XInitialization
+    void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& aArguments) override;
+
+    OUString SAL_CALL getImplementationName() override;
+
+    sal_Bool SAL_CALL supportsService(OUString const& ServiceName) override;
+
+    css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+
+    // XDocumentDigitalSignatures
+    sal_Bool SAL_CALL
+    signDocumentContent(const css::uno::Reference<css::embed::XStorage>& xStorage,
+                        const css::uno::Reference<css::io::XStream>& xSignStream) override;
+    css::uno::Sequence<css::security::DocumentSignatureInformation>
+        SAL_CALL verifyDocumentContentSignatures(
+            const css::uno::Reference<css::embed::XStorage>& xStorage,
+            const css::uno::Reference<css::io::XInputStream>& xSignInStream) override;
+    void SAL_CALL showDocumentContentSignatures(
+        const css::uno::Reference<css::embed::XStorage>& xStorage,
+        const css::uno::Reference<css::io::XInputStream>& xSignInStream) override;
+    OUString SAL_CALL getDocumentContentSignatureDefaultStreamName() override;
+    sal_Bool SAL_CALL
+    signScriptingContent(const css::uno::Reference<css::embed::XStorage>& xStorage,
+                         const css::uno::Reference<css::io::XStream>& xSignStream) override;
+    css::uno::Sequence<css::security::DocumentSignatureInformation>
+        SAL_CALL verifyScriptingContentSignatures(
+            const css::uno::Reference<css::embed::XStorage>& xStorage,
+            const css::uno::Reference<css::io::XInputStream>& xSignInStream) override;
+    void SAL_CALL showScriptingContentSignatures(
+        const css::uno::Reference<css::embed::XStorage>& xStorage,
+        const css::uno::Reference<css::io::XInputStream>& xSignInStream) override;
+    OUString SAL_CALL getScriptingContentSignatureDefaultStreamName() override;
+    sal_Bool SAL_CALL
+    signPackage(const css::uno::Reference<css::embed::XStorage>& Storage,
+                const css::uno::Reference<css::io::XStream>& xSignStream) override;
+    css::uno::Sequence<css::security::DocumentSignatureInformation>
+        SAL_CALL verifyPackageSignatures(
+            const css::uno::Reference<css::embed::XStorage>& Storage,
+            const css::uno::Reference<css::io::XInputStream>& xSignInStream) override;
+    void SAL_CALL
+    showPackageSignatures(const css::uno::Reference<css::embed::XStorage>& xStorage,
+                          const css::uno::Reference<css::io::XInputStream>& xSignInStream) override;
+    OUString SAL_CALL getPackageSignatureDefaultStreamName() override;
+    void SAL_CALL
+    showCertificate(const css::uno::Reference<css::security::XCertificate>& Certificate) override;
+    void SAL_CALL manageTrustedSources() override;
+    sal_Bool SAL_CALL
+    isAuthorTrusted(const css::uno::Reference<css::security::XCertificate>& Author) override;
+    sal_Bool SAL_CALL isLocationTrusted(const OUString& Location) override;
+    void SAL_CALL addAuthorToTrustedSources(
+        const css::uno::Reference<css::security::XCertificate>& Author) override;
+    void SAL_CALL addLocationToTrustedSources(const OUString& Location) override;
+
+    css::uno::Reference<css::security::XCertificate>
+        SAL_CALL chooseCertificate(OUString& rDescription) override;
+    css::uno::Reference<css::security::XCertificate>
+        SAL_CALL chooseSigningCertificate(OUString& rDescription) override;
+    css::uno::Sequence<css::uno::Reference<css::security::XCertificate>>
+        SAL_CALL chooseEncryptionCertificate() override;
+    css::uno::Reference<css::security::XCertificate> SAL_CALL chooseCertificateWithProps(
+        css::uno::Sequence<::com::sun::star::beans::PropertyValue>& Properties) override;
+};
+
 DocumentDigitalSignatures::DocumentDigitalSignatures( const Reference< XComponentContext >& rxCtx ):
     mxCtx(rxCtx),
     m_sODFVersion(ODFVER_012_TEXT),
@@ -59,10 +158,6 @@ DocumentDigitalSignatures::DocumentDigitalSignatures( const Reference< XComponen
 {
 }
 
-DocumentDigitalSignatures::~DocumentDigitalSignatures()
-{
-}
-
 void DocumentDigitalSignatures::initialize( const Sequence< Any >& aArguments)
 {
     if (aArguments.getLength() > 2)
@@ -95,7 +190,7 @@ void DocumentDigitalSignatures::initialize( const Sequence< Any >& aArguments)
 
 OUString DocumentDigitalSignatures::getImplementationName()
 {
-    return GetImplementationName();
+    return OUString("com.sun.star.security.DocumentDigitalSignatures");
 }
 
 sal_Bool DocumentDigitalSignatures::supportsService(
@@ -107,7 +202,8 @@ sal_Bool DocumentDigitalSignatures::supportsService(
 css::uno::Sequence<OUString>
 DocumentDigitalSignatures::getSupportedServiceNames()
 {
-    return GetSupportedServiceNames();
+    Sequence<OUString> aRet{ "com.sun.star.security.DocumentDigitalSignatures" };
+    return aRet;
 }
 
 sal_Bool DocumentDigitalSignatures::signDocumentContent(
@@ -560,22 +656,12 @@ void DocumentDigitalSignatures::addLocationToTrustedSources( const OUString& Loc
     aSecOpt.SetSecureURLs( aSecURLs );
 }
 
-OUString DocumentDigitalSignatures::GetImplementationName()
-{
-    return OUString( "com.sun.star.security.DocumentDigitalSignatures" );
-}
-
-Sequence< OUString > DocumentDigitalSignatures::GetSupportedServiceNames()
-{
-    Sequence<OUString> aRet { "com.sun.star.security.DocumentDigitalSignatures" };
-    return aRet;
-}
-
-
-Reference< XInterface > DocumentDigitalSignatures_CreateInstance(
-    const Reference< XComponentContext >& rCtx)
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_security_DocumentDigitalSignatures_get_implementation(
+    uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
 {
-    return static_cast<cppu::OWeakObject*>(new DocumentDigitalSignatures( rCtx ));
+    return cppu::acquire(
+        new DocumentDigitalSignatures(uno::Reference<uno::XComponentContext>(pCtx)));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.hxx b/xmlsecurity/source/component/documentdigitalsignatures.hxx
deleted file mode 100644
index 4bb8de8ebf6d..000000000000
--- a/xmlsecurity/source/component/documentdigitalsignatures.hxx
+++ /dev/null
@@ -1,119 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_XMLSECURITY_SOURCE_COMPONENT_DOCUMENTDIGITALSIGNATURES_HXX
-#define INCLUDED_XMLSECURITY_SOURCE_COMPONENT_DOCUMENTDIGITALSIGNATURES_HXX
-
-#include <cppuhelper/implbase.hxx>
-
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/security/XDocumentDigitalSignatures.hpp>
-#include <com/sun/star/io/XStream.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <certificatechooser.hxx>
-#include <documentsignaturehelper.hxx>
-
-namespace com { namespace  sun { namespace star {
-
-    namespace uno {
-        class XComponentContext;
-    }
-}}}
-
-class DocumentDigitalSignatures : public cppu::WeakImplHelper
-<
-    css::security::XDocumentDigitalSignatures,
-    css::lang::XInitialization,
-    css::lang::XServiceInfo
->
-{
-private:
-    css::uno::Reference< css::uno::XComponentContext > mxCtx;
-    // will be set by XInitialization. If not we assume true. false means an earlier version (whatever that means,
-    // this is a string, not a boolean).
-    // Note that the code talks about "ODF version" even if this class is also used to sign OOXML.
-    OUString m_sODFVersion;
-    //The number of arguments which were passed in XInitialization::initialize
-    int m_nArgumentsCount;
-    //Indicates if the document already contains a document signature
-    bool m_bHasDocumentSignature;
-
-    /// @throws css::uno::RuntimeException
-    bool ImplViewSignatures( const css::uno::Reference< css::embed::XStorage >& rxStorage, const css::uno::Reference< css::io::XStream >& xSignStream, DocumentSignatureMode eMode, bool bReadOnly );
-    /// @throws css::uno::RuntimeException
-    void ImplViewSignatures( const css::uno::Reference< css::embed::XStorage >& rxStorage, const css::uno::Reference< css::io::XInputStream >& xSignStream, DocumentSignatureMode eMode, bool bReadOnly );
-    /// @throws css::uno::RuntimeException
-    css::uno::Sequence< css::security::DocumentSignatureInformation > ImplVerifySignatures( const css::uno::Reference< css::embed::XStorage >& rxStorage, const ::com::sun::star::uno::Reference< css::io::XInputStream >& xSignStream, DocumentSignatureMode eMode );
-
-    css::uno::Sequence< css::uno::Reference< css::security::XCertificate > > chooseCertificatesImpl(std::map<OUString, OUString>& rProperties, const UserAction eAction);
-
-public:
-    explicit DocumentDigitalSignatures( const css::uno::Reference< css::uno::XComponentContext>& rxCtx );
-    virtual ~DocumentDigitalSignatures() override;
-
-    // for service registration...
-    /// @throws css::uno::RuntimeException
-    static OUString GetImplementationName();
-    /// @throws css::uno::RuntimeException
-    static css::uno::Sequence < OUString > GetSupportedServiceNames();
-
-    //XInitialization
-    void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
-
-    OUString SAL_CALL getImplementationName() override;
-
-    sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
-
-    css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
-
-    // XDocumentDigitalSignatures
-    sal_Bool SAL_CALL signDocumentContent( const css::uno::Reference< css::embed::XStorage >& xStorage, const css::uno::Reference< css::io::XStream >& xSignStream ) override;
-    css::uno::Sequence< css::security::DocumentSignatureInformation > SAL_CALL verifyDocumentContentSignatures( const css::uno::Reference< css::embed::XStorage >& xStorage, const css::uno::Reference< css::io::XInputStream >& xSignInStream ) override;
-    void SAL_CALL showDocumentContentSignatures( const css::uno::Reference< css::embed::XStorage >& xStorage, const css::uno::Reference< css::io::XInputStream >& xSignInStream ) override;
-    OUString SAL_CALL getDocumentContentSignatureDefaultStreamName(  ) override;
-    sal_Bool SAL_CALL signScriptingContent( const css::uno::Reference< css::embed::XStorage >& xStorage, const css::uno::Reference< css::io::XStream >& xSignStream ) override;
-    css::uno::Sequence< css::security::DocumentSignatureInformation > SAL_CALL verifyScriptingContentSignatures( const css::uno::Reference< css::embed::XStorage >& xStorage, const css::uno::Reference< css::io::XInputStream >& xSignInStream ) override;
-    void SAL_CALL showScriptingContentSignatures( const css::uno::Reference< css::embed::XStorage >& xStorage, const css::uno::Reference< css::io::XInputStream >& xSignInStream ) override;
-    OUString SAL_CALL getScriptingContentSignatureDefaultStreamName(  ) override;
-    sal_Bool SAL_CALL signPackage( const css::uno::Reference< css::embed::XStorage >& Storage, const css::uno::Reference< css::io::XStream >& xSignStream ) override;
-    css::uno::Sequence< css::security::DocumentSignatureInformation > SAL_CALL verifyPackageSignatures( const css::uno::Reference< css::embed::XStorage >& Storage, const css::uno::Reference< css::io::XInputStream >& xSignInStream ) override;
-    void SAL_CALL showPackageSignatures( const css::uno::Reference< css::embed::XStorage >& xStorage, const css::uno::Reference< css::io::XInputStream >& xSignInStream ) override;
-    OUString SAL_CALL getPackageSignatureDefaultStreamName(  ) override;
-    void SAL_CALL showCertificate( const css::uno::Reference< css::security::XCertificate >& Certificate ) override;
-    void SAL_CALL manageTrustedSources(  ) override;
-    sal_Bool SAL_CALL isAuthorTrusted( const css::uno::Reference< css::security::XCertificate >& Author ) override;
-    sal_Bool SAL_CALL isLocationTrusted( const OUString& Location ) override;
-    void SAL_CALL addAuthorToTrustedSources( const css::uno::Reference< css::security::XCertificate >& Author ) override;
-    void SAL_CALL addLocationToTrustedSources( const OUString& Location ) override;
-
-    css::uno::Reference< css::security::XCertificate > SAL_CALL chooseCertificate(OUString& rDescription) override;
-    css::uno::Reference< css::security::XCertificate > SAL_CALL chooseSigningCertificate(OUString& rDescription) override;
-    css::uno::Sequence<css::uno::Reference< css::security::XCertificate > > SAL_CALL chooseEncryptionCertificate() override;
-    css::uno::Reference< css::security::XCertificate > SAL_CALL chooseCertificateWithProps(css::uno::Sequence<::com::sun::star::beans::PropertyValue>& Properties) override;
-};
-
-/// @throws css::uno::Exception
-css::uno::Reference< css::uno::XInterface > DocumentDigitalSignatures_CreateInstance(
-    const css::uno::Reference< css::uno::XComponentContext >& rCtx);
-
-#endif // INCLUDED_XMLSECURITY_SOURCE_COMPONENT_DOCUMENTDIGITALSIGNATURES_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/component/registerservices.cxx b/xmlsecurity/source/component/registerservices.cxx
index 1ee0290f22b2..9c0c91d7d015 100644
--- a/xmlsecurity/source/component/registerservices.cxx
+++ b/xmlsecurity/source/component/registerservices.cxx
@@ -22,7 +22,6 @@
 
 #include <cppuhelper/factory.hxx>
 
-#include "documentdigitalsignatures.hxx"
 #include "certificatecontainer.hxx"
 
 using namespace ::com::sun::star;
@@ -38,15 +37,7 @@ SAL_DLLPUBLIC_EXPORT void* xmlsecurity_component_getFactory( const sal_Char * pI
     //Decryptor
     OUString implName = OUString::createFromAscii( pImplName );
 
-    if ( pServiceManager && implName == DocumentDigitalSignatures::GetImplementationName() )
-    {
-        // DocumentDigitalSignatures
-        xFactory = cppu::createSingleComponentFactory(
-            DocumentDigitalSignatures_CreateInstance,
-            OUString::createFromAscii( pImplName ),
-            DocumentDigitalSignatures::GetSupportedServiceNames() );
-    }
-    else if ( pServiceManager && implName == CertificateContainer::impl_getStaticImplementationName() )
+    if (pServiceManager && implName == CertificateContainer::impl_getStaticImplementationName())
     {
         // CertificateContainer
         xFactory = cppu::createOneInstanceFactory(
diff --git a/xmlsecurity/util/xmlsecurity.component b/xmlsecurity/util/xmlsecurity.component
index ce19281af5b6..383572bff403 100644
--- a/xmlsecurity/util/xmlsecurity.component
+++ b/xmlsecurity/util/xmlsecurity.component
@@ -22,7 +22,8 @@
   <implementation name="com.sun.star.security.CertificateContainer">
     <service name="com.sun.star.security.CertificateContainer"/>
   </implementation>
-  <implementation name="com.sun.star.security.DocumentDigitalSignatures">
+  <implementation name="com.sun.star.security.DocumentDigitalSignatures"
+      constructor="com_sun_star_security_DocumentDigitalSignatures_get_implementation">
     <service name="com.sun.star.security.DocumentDigitalSignatures"/>
   </implementation>
 </component>


More information about the Libreoffice-commits mailing list