[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - xmlsecurity/qa

Vasily Melenchuk (via logerrit) logerrit at kemper.freedesktop.org
Thu Dec 24 10:10:48 UTC 2020


 xmlsecurity/qa/unit/signing/signing2.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit fb309ea661e19ded97f92ad59c6b98b32e8271f8
Author:     Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Thu Dec 24 13:06:17 2020 +0300
Commit:     Vasily Melenchuk <vasily.melenchuk at cib.de>
CommitDate: Thu Dec 24 13:09:57 2020 +0300

    macro signature preservation testcase fixed for LO 6.4
    
    Change-Id: I9446ada6f4deb37760cbecbc01be16e2236dcff7

diff --git a/xmlsecurity/qa/unit/signing/signing2.cxx b/xmlsecurity/qa/unit/signing/signing2.cxx
index 90a8f3b1e6ef..152d62a18974 100644
--- a/xmlsecurity/qa/unit/signing/signing2.cxx
+++ b/xmlsecurity/qa/unit/signing/signing2.cxx
@@ -18,6 +18,7 @@
 #include <com/sun/star/frame/XStorable.hpp>
 #include <com/sun/star/xml/crypto/SEInitializer.hpp>
 
+#include <comphelper/processfactory.hxx>
 #include <comphelper/propertysequence.hxx>
 #include <unotools/tempfile.hxx>
 #include <unotools/ucbstreamhelper.hxx>
@@ -37,6 +38,7 @@ char const DATA_DIRECTORY[] = "/xmlsecurity/qa/unit/signing/data/";
 class SigningTest2 : public test::BootstrapFixture, public unotest::MacrosTest, public XmlTestTools
 {
 protected:
+    uno::Reference<uno::XComponentContext> mxComponentContext;
     uno::Reference<lang::XComponent> mxComponent;
     uno::Reference<xml::crypto::XSEInitializer> mxSEInitializer;
     uno::Reference<xml::crypto::XXMLSecurityContext> mxSecurityContext;
@@ -55,6 +57,7 @@ void SigningTest2::setUp()
     test::BootstrapFixture::setUp();
 
     // Initialize crypto after setting up the environment variables.
+    mxComponentContext.set(comphelper::getComponentContext(getMultiServiceFactory()));
     mxDesktop.set(frame::Desktop::create(mxComponentContext));
 }
 
@@ -105,7 +108,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest2, testPreserveMacroSignatureODB)
         xMetaInf->openStreamElement("macrosignatures.xml", embed::ElementModes::READ),
         uno::UNO_QUERY);
     std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
-    xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+    xmlDocPtr pXmlDoc = parseXmlStream(pStream.get());
 
     // Make sure the signature is still there
     assertXPath(pXmlDoc, "//dsig:Signature", "Id",


More information about the Libreoffice-commits mailing list