Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hello,

this patch fixes the problem that we are unable to save a password protected
file without a password. The problem is that we don't clear the old
encryption data and copy them from the old ItemSet. We merge two ItemSets
there, and the information about encryption should always come from the
ItemSet filled during the file dialog.

I think we should include this patch in the 3-4 branch. I think this patch
only applies to 3-4 but not to master, so if this patch is accepted I'll
write a second one for master and push it.

Regards,
Markus
From 7d9388266ef08e1ebd393c2ecc81a8116ad90f69 Mon Sep 17 00:00:00 2001
From: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date: Mon, 27 Jun 2011 01:44:42 +0200
Subject: [PATCH] fix for fdo#38561: unable to save protected file without pw

---
 sfx2/source/doc/objstor.cxx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index f0db081..3b29f52 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2811,7 +2811,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl
     // in "SaveAs" title and password will be cleared ( maybe the new itemset contains new values, 
otherwise they will be empty )
     pMergedParams->ClearItem( SID_PASSWORD );
     pMergedParams->ClearItem( SID_DOCINFO_TITLE );
-
+    pMergedParams->ClearItem( SID_ENCRYPTIONDATA );
     pMergedParams->ClearItem( SID_INPUTSTREAM );
     pMergedParams->ClearItem( SID_STREAM );
     pMergedParams->ClearItem( SID_CONTENT );
-- 
1.7.3.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.