diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2019-09-23 20:48:41 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-12-04 13:43:21 +0100 |
commit | 78149c3847533639542ea55d97c168e0fbcd9822 (patch) | |
tree | dda90afb80aea5731329df9d764ec7b169b23eb3 /oox/source/crypto/DocumentEncryption.cxx | |
parent | 74b6308b8e86da2bd36d241424ff03cae8a52dd2 (diff) |
irm: refactoring of decrypt methods
to allow usage of decryt methods outside of LO we should avoid
direct usage of OleStorage in CryptoEngine: it is not accessible
outside of core.
Change-Id: Id60b338445a5950aa40b84d788c94b8fa025e717
Diffstat (limited to 'oox/source/crypto/DocumentEncryption.cxx')
-rw-r--r-- | oox/source/crypto/DocumentEncryption.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/oox/source/crypto/DocumentEncryption.cxx b/oox/source/crypto/DocumentEncryption.cxx index 6975572193d5..8aac457c67d2 100644 --- a/oox/source/crypto/DocumentEncryption.cxx +++ b/oox/source/crypto/DocumentEncryption.cxx @@ -27,10 +27,12 @@ namespace core { using namespace css::io; using namespace css::uno; -DocumentEncryption::DocumentEncryption(Reference<XStream> const & xDocumentStream, +DocumentEncryption::DocumentEncryption(const css::uno::Reference< css::uno::XComponentContext >& rxContext, + Reference<XStream> const & xDocumentStream, oox::ole::OleStorage& rOleStorage, Sequence<css::beans::NamedValue>& rMediaEncData) - : mxDocumentStream(xDocumentStream) + : mxContext(rxContext) + , mxDocumentStream(xDocumentStream) , mrOleStorage(rOleStorage) , mMediaEncData(rMediaEncData) { @@ -43,11 +45,11 @@ DocumentEncryption::DocumentEncryption(Reference<XStream> const & xDocumentStrea rMediaEncData[i].Value >>= sCryptoType; if (sCryptoType == "IRM") { - mEngine.reset(new IRMEngine); + mEngine.reset(new IRMEngine(mxContext)); } else if (sCryptoType == "Standard" || sCryptoType == "Agile") { - mEngine.reset(new Standard2007Engine); + mEngine.reset(new Standard2007Engine(mxContext)); } else { |