[Libreoffice-commits] core.git: xmlsecurity/inc xmlsecurity/source

Miklos Vajna vmiklos at collabora.co.uk
Fri Nov 18 14:55:29 UTC 2016


 xmlsecurity/inc/xmlsignaturehelper.hxx           |   12 
 xmlsecurity/inc/xsecctl.hxx                      |  446 +++++++++++++++++++++++
 xmlsecurity/source/helper/xmlsignaturehelper.cxx |    1 
 xmlsecurity/source/helper/xsecctl.hxx            |  446 -----------------------
 4 files changed, 449 insertions(+), 456 deletions(-)

New commits:
commit 0da4cdeac46117c6b6a4e38b037524a8772325f6
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Nov 18 14:17:25 2016 +0100

    xmlsecurity: clean up unused mxSecurityController
    
    Change-Id: Ife64ab3683479baf152357a6167718f13c9b6089
    Reviewed-on: https://gerrit.libreoffice.org/30964
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/xmlsecurity/inc/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsignaturehelper.hxx
index d8f97e5..79311a7 100644
--- a/xmlsecurity/inc/xmlsignaturehelper.hxx
+++ b/xmlsecurity/inc/xmlsignaturehelper.hxx
@@ -24,7 +24,9 @@
 
 #include <tools/link.hxx>
 #include <rtl/ustring.hxx>
+#include <rtl/ref.hxx>
 #include <sigstruct.hxx>
+#include <xsecctl.hxx>
 #include <xmlsecuritydllapi.h>
 
 #include <com/sun/star/uno/XComponentContext.hpp>
@@ -35,7 +37,6 @@
 #include <com/sun/star/xml/crypto/sax/XSignatureCreationResultListener.hpp>
 #include <com/sun/star/xml/crypto/sax/XSignatureVerifyResultListener.hpp>
 
-class XSecController;
 class Date;
 namespace tools { class Time; }
 
@@ -91,20 +92,13 @@ class XMLSECURITY_DLLPUBLIC XMLSignatureHelper
 {
 private:
     css::uno::Reference< css::uno::XComponentContext > mxCtx;
-    // FIXME: This field appears to be unused (it is only assigned to in the XMLSignatureHelper
-    // constructor), but it can't be removed as it is that very assignment which causes the object
-    // it to be acquired, and otherwise its reference counting will be borked and we get a
-    // crash. This is stupid of course. Probably we should just kill the separate XSecController
-    // class and move its contents inside this class. Nothing else uses XSecController anyway, as
-    // far as I see.
-    css::uno::Reference< css::xml::crypto::sax::XSecurityController > mxSecurityController;
     css::uno::Reference< css::xml::crypto::XUriBinding > mxUriBinding;
 
     std::vector<XMLSignatureCreationResult>
                                 maCreationResults;
     std::vector<XMLSignatureVerifyResult>
                                 maVerifyResults;
-    XSecController*             mpXSecController;
+    rtl::Reference<XSecController> mpXSecController;
     bool                        mbError;
     bool mbODFPre1_2;
     Link<LinkParamNone*,bool>   maStartVerifySignatureHdl;
diff --git a/xmlsecurity/source/helper/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx
similarity index 100%
rename from xmlsecurity/source/helper/xsecctl.hxx
rename to xmlsecurity/inc/xsecctl.hxx
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index a4243d9..36a6117 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -61,7 +61,6 @@ XMLSignatureHelper::XMLSignatureHelper( const uno::Reference< uno::XComponentCon
     : mxCtx(rxCtx), mbODFPre1_2(false)
 {
     mpXSecController = new XSecController(rxCtx);
-    mxSecurityController = mpXSecController;
     mbError = false;
 }
 


More information about the Libreoffice-commits mailing list