summaryrefslogtreecommitdiffstats
path: root/xmlsecurity/source/helper/ooxmlsecexporter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmlsecurity/source/helper/ooxmlsecexporter.cxx')
-rw-r--r--xmlsecurity/source/helper/ooxmlsecexporter.cxx11
1 files changed, 9 insertions, 2 deletions
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: */