[Libreoffice-commits] core.git: Branch 'libreoffice-4-2-3' - framework/source
Matúš Kukan
matus.kukan at collabora.com
Tue Mar 25 03:09:27 PDT 2014
framework/source/services/autorecovery.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 7e1d17f1ba3776da70db40d6d1a518dcf3238860
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Fri Mar 14 09:42:02 2014 +0100
fdo#51819: autorecovery: fix saving password in protected documents.
Thanks to sayt at mailinator.com for the idea.
Change-Id: Ib79abafe3d4d3ba21f7914aeb284d86ce662824c
(cherry picked from commit ef87ff6680f79362a431db6e7ef2f40cfc576219)
Reviewed-on: https://gerrit.libreoffice.org/8676
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 8a32d78..3a18af4 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -2305,9 +2305,11 @@ void AutoRecovery::implts_saveOneDoc(const OUString&
// if the document was loaded with a password, it should be
// stored with password
utl::MediaDescriptor lNewArgs;
- OUString sPassword = lOldArgs.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_PASSWORD(), OUString());
- if (!sPassword.isEmpty())
- lNewArgs[utl::MediaDescriptor::PROP_PASSWORD()] <<= sPassword;
+ css::uno::Sequence< css::beans::NamedValue > aEncryptionData =
+ lOldArgs.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_ENCRYPTIONDATA(),
+ css::uno::Sequence< css::beans::NamedValue >());
+ if (aEncryptionData.getLength() > 0)
+ lNewArgs[utl::MediaDescriptor::PROP_ENCRYPTIONDATA()] <<= aEncryptionData;
// Further it must be saved using the default file format of that application.
// Otherwhise we will some data lost.
More information about the Libreoffice-commits
mailing list