From d3c189fa742f0b21f99a8f3b1ebafe71c130d8d5 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Tue, 5 Jun 2012 04:20:32 +0200 Subject: Fix fdo#50703 clamp ODF1.2 compatibility-mode to use old encryption. As requested for better interop inside the ODF ecosystem, asking for compatible odf output gets you blowfish/sha1-based encryption unconditionally. --- sfx2/source/doc/objstor.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 9c53e22c1eab..3700d574a8b6 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -370,12 +370,12 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto { } - if ( !aSaveOpt.IsUseSHA1InODF12() ) + if ( !aSaveOpt.IsUseSHA1InODF12() && nDefVersion != SvtSaveOptions::ODFVER_012_EXT_COMPAT ) { aEncryptionAlgs[0].Value <<= xml::crypto::DigestID::SHA256; aEncryptionAlgs[2].Value <<= xml::crypto::DigestID::SHA256_1K; } - if ( !aSaveOpt.IsUseBlowfishInODF12() ) + if ( !aSaveOpt.IsUseBlowfishInODF12() && nDefVersion != SvtSaveOptions::ODFVER_012_EXT_COMPAT ) aEncryptionAlgs[1].Value <<= xml::crypto::CipherID::AES_CBC_W3C_PADDING; } -- cgit