framework/source/services/autorecovery.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 15664830235fd3d34dc633affa87824e5c10cb79 Author: Thorsten Behrens <thorsten.behr...@cib.de> AuthorDate: Fri Dec 13 03:01:28 2019 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Sat Feb 8 18:34:27 2020 +0100 tdf#129096 Don't autosave encrypted documents As we cannot generally make sure they stay encrypted. Change-Id: I15ed41fabcc553608e418608ad1166a951daa4b6 (cherry picked from commit aaf91e7c4833689dc11d0b7f3e9f707a9ce206d5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88209 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 0bcd2c6befaf..3dcdfa540e49 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -2389,7 +2389,10 @@ void AutoRecovery::implts_registerDocument(const css::uno::Reference< css::frame // check if this document must be ignored for recovery ! // Some use cases don't wish support for AutoSave/Recovery ... as e.g. OLE-Server / ActiveX Control etcpp. - bool bNoAutoSave = lDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_NOAUTOSAVE(), false); + bool bNoAutoSave = lDescriptor.getUnpackedValueOrDefault( + utl::MediaDescriptor::PROP_NOAUTOSAVE(), false) + || lDescriptor.getValue( + utl::MediaDescriptor::PROP_ENCRYPTIONDATA()).hasValue(); if (bNoAutoSave) return; @@ -2807,7 +2810,10 @@ bool lc_checkIfSaveForbiddenByArguments(AutoRecovery::TDocumentInfo const & rInf return true; utl::MediaDescriptor lDescriptor(rInfo.Document->getArgs()); - bool bNoAutoSave = lDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_NOAUTOSAVE(), false); + bool bNoAutoSave = lDescriptor.getUnpackedValueOrDefault( + utl::MediaDescriptor::PROP_NOAUTOSAVE(), false) + || lDescriptor.getValue( + utl::MediaDescriptor::PROP_ENCRYPTIONDATA()).hasValue(); return bNoAutoSave; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits