summaryrefslogtreecommitdiff
path: root/oox/source/core/xmlfilterbase.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <quikee@gmail.com>2013-08-24 22:40:54 +0200
committerTomaž Vajngerl <quikee@gmail.com>2013-08-24 22:53:04 +0200
commit4323c66840e4c7dcacda0e33d33d7e67fdb08f09 (patch)
tree5359bfda1a78e99f8fa2f8543b918e0f847ae230 /oox/source/core/xmlfilterbase.cxx
parent4d688beb2b2183ced387270e051dc25ee340fb4b (diff)
fdo#35422 Support to open encrypted Office 2010 and 2013 formats
Additionally encryption and decryption has been refactored. 2 engines have been added: AgileEngine and Standard2007Engine, which contain core functions for encryption and decryption. Standard2007Engine refers to encryption and decryption as used in Office 2007 and AgileEngine refers to encryption and decryption as used in Office 2010 and 2013. AgileEngine does not yet support encryption. Change-Id: Ica1d4d5a109fb204012b92a0c39325fe0b99b793
Diffstat (limited to 'oox/source/core/xmlfilterbase.cxx')
-rw-r--r--oox/source/core/xmlfilterbase.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 0b723a4a3c69..763090ab2b20 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -49,7 +49,7 @@
#include <oox/core/filterdetect.hxx>
#include <comphelper/storagehelper.hxx>
-#include <oox/core/DocumentCrypt.hxx>
+#include <oox/crypto/DocumentEncryption.hxx>
using ::com::sun::star::xml::dom::DocumentBuilder;
using ::com::sun::star::xml::dom::XDocument;
@@ -704,8 +704,8 @@ bool XmlFilterBase::implFinalizeExport( MediaDescriptor& rMediaDescriptor )
Reference< XStream> xDocumentStream (FilterBase::implGetOutputStream(rMediaDescriptor));
oox::ole::OleStorage aOleStorage( getComponentContext(), xDocumentStream, true );
- AesEncoder encoder(getMainDocumentStream(), aOleStorage, aPassword);
- bRet = encoder.encode();
+ DocumentEncryption encryptor(getMainDocumentStream(), aOleStorage, aPassword);
+ bRet = encryptor.encrypt();
if (bRet)
aOleStorage.commit();
}