path: root/package/source/xstor/owriteablestream.hxx
diff options
authorMike Kaganski <>2020-01-03 22:40:07 +0300
committerMike Kaganski <>2020-01-04 07:40:21 +0100
commitdd198398b6e5c84ab1255a90ef96e6445b66a64f (patch)
treeb1a8e5e59d1ffbbf8730cda07838ea4e76ff74f3 /package/source/xstor/owriteablestream.hxx
parent8e500c458af5f5ec7c680cd4ad083d8798c459a2 (diff)
tdf#93389: keep encryption information for autorecovered MS formats
The autorecovery data is stored in ODF, regardless of the original document format. When restoring, type detection generates ODF data, which is stored in the media descriptor attached to document, even after real filter was restored (see AutoRecovery::implts_openDocs). If real filter is not ODF, then at the save time, it doesn't find necessary information in encryption data, and makes not encrypted package. This patch adds both MS binary data, and OOXML data, to existing ODF data for recovered password-protected documents (regardless of their real filter). TODO: only add required information to encryption data: pass real filter name to DocPasswordHelper::requestAndVerifyDocPassword from AutoRecovery::implts_openDocs. Change-Id: I4749c5ec028ca61bddf7cd77bc5969a97b1de199 Reviewed-on: Reviewed-by: Mike Kaganski <> Tested-by: Mike Kaganski <>
Diffstat (limited to 'package/source/xstor/owriteablestream.hxx')
1 files changed, 2 insertions, 1 deletions
diff --git a/package/source/xstor/owriteablestream.hxx b/package/source/xstor/owriteablestream.hxx
index 818aec0b7942..718aea3ac77f 100644
--- a/package/source/xstor/owriteablestream.hxx
+++ b/package/source/xstor/owriteablestream.hxx
@@ -55,7 +55,8 @@ namespace com { namespace sun { namespace star { namespace uno {
} } } }
namespace package {
- bool PackageEncryptionDatasEqual( const ::comphelper::SequenceAsHashMap& aHash1, const ::comphelper::SequenceAsHashMap& aHash2 );
+ // all data in aHash1 is contained in aHash2
+ bool PackageEncryptionDataLessOrEqual( const ::comphelper::SequenceAsHashMap& aHash1, const ::comphelper::SequenceAsHashMap& aHash2 );
struct WSInternalData_Impl;