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 <[email protected]> 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
_______________________________________________ LibreOffice mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice
