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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Nov 14 08:08:34 UTC 2018


 xmlsecurity/source/helper/ooxmlsecexporter.cxx |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit dd6015c2df3716b3db2861c31f00f1cb43b4960d
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Nov 13 21:04:42 2018 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Nov 14 09:08:11 2018 +0100

    xmlsecurity: make members of OOXMLSecExporter::Impl private
    
    Change-Id: I456d9b53fd1168b382a2220716d010556eabbd22
    Reviewed-on: https://gerrit.libreoffice.org/63344
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/xmlsecurity/source/helper/ooxmlsecexporter.cxx b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
index 8e0df5927a37..42a4df0a7792 100644
--- a/xmlsecurity/source/helper/ooxmlsecexporter.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
@@ -32,12 +32,14 @@ using namespace css::xml::sax;
 
 struct OOXMLSecExporter::Impl
 {
+private:
     const uno::Reference<uno::XComponentContext>& m_xComponentContext;
     const uno::Reference<embed::XStorage>& m_xRootStorage;
     const uno::Reference<xml::sax::XDocumentHandler>& m_xDocumentHandler;
     const SignatureInformation& m_rInformation;
     OUString m_aSignatureTimeValue;
 
+public:
     Impl(const uno::Reference<uno::XComponentContext>& xComponentContext,
          const uno::Reference<embed::XStorage>& xRootStorage,
          const uno::Reference<xml::sax::XDocumentHandler>& xDocumentHandler,
@@ -54,6 +56,11 @@ struct OOXMLSecExporter::Impl
     /// Should we intentionally not sign this relation type?
     static bool isOOXMLRelationBlacklist(const OUString& rRelationName);
 
+    const uno::Reference<xml::sax::XDocumentHandler>& getDocumentHandler() const
+    {
+        return m_xDocumentHandler;
+    }
+
     void writeSignedInfo();
     void writeCanonicalizationMethod();
     void writeCanonicalizationTransform();
@@ -467,7 +474,7 @@ void OOXMLSecExporter::writeSignature()
     rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
     pAttributeList->AddAttribute("xmlns", NS_XMLDSIG);
     pAttributeList->AddAttribute("Id", "idPackageSignature");
-    m_pImpl->m_xDocumentHandler->startElement("Signature", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+    m_pImpl->getDocumentHandler()->startElement("Signature", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
 
     m_pImpl->writeSignedInfo();
     m_pImpl->writeSignatureValue();
@@ -477,7 +484,7 @@ void OOXMLSecExporter::writeSignature()
     m_pImpl->writePackageSignature();
     m_pImpl->writeSignatureLineImages();
 
-    m_pImpl->m_xDocumentHandler->endElement("Signature");
+    m_pImpl->getDocumentHandler()->endElement("Signature");
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list