Return-Path: X-Original-To: apmail-incubator-ooo-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DEBC2D34F for ; Tue, 26 Jun 2012 12:05:48 +0000 (UTC) Received: (qmail 35958 invoked by uid 500); 26 Jun 2012 12:05:48 -0000 Delivered-To: apmail-incubator-ooo-dev-archive@incubator.apache.org Received: (qmail 35881 invoked by uid 500); 26 Jun 2012 12:05:48 -0000 Mailing-List: contact ooo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-dev@incubator.apache.org Received: (qmail 35861 invoked by uid 99); 26 Jun 2012 12:05:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2012 12:05:47 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of orwittmann@googlemail.com designates 209.85.214.47 as permitted sender) Received: from [209.85.214.47] (HELO mail-bk0-f47.google.com) (209.85.214.47) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2012 12:05:41 +0000 Received: by bkcjm2 with SMTP id jm2so3888515bkc.6 for ; Tue, 26 Jun 2012 05:05:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=A4/BseXkNacXZN/z7u9gNyu5nNW3W7McBG2nd9O6WVw=; b=Mh9PDdZAvvjuW35j/7m/rez+DxzyiGtxIObkh5MUvagaMIG9OxH19YE3gj+PpzMTuM 7NN1qpiXumSLOvWdrYmjyrTMABOQlWDZmGTALkfO718QvwlRlrfcRZK+xAmvWAQ38p0g Qi3sjVoco3FHlseaY+3Fs2lz/pJ9yFbsLYsMgzKrR/aEIaaDyGWnH255sL+AkE/XZ4mQ wMGOXNGzR5+PWgEmQX4n/hHj4CtIDq760NDUdj3Nn/3Tlgu+ia2C8uK8SQV6pkEL2aKU 1rbfK2/bzepM4sBiK0LNeVQSC6O9lZb8hoOi3BXzYVLV4jrH2B3wt+K6tufNdxi8DB9C MgmA== Received: by 10.204.151.69 with SMTP id b5mr5274615bkw.69.1340712320129; Tue, 26 Jun 2012 05:05:20 -0700 (PDT) Received: from [9.155.131.111] (deibp9eh1--blueice2n2.emea.ibm.com. [195.212.29.172]) by mx.google.com with ESMTPS id o4sm50463627bkv.15.2012.06.26.05.05.16 (version=SSLv3 cipher=OTHER); Tue, 26 Jun 2012 05:05:18 -0700 (PDT) Message-ID: <4FE9A57B.9040300@googlemail.com> Date: Tue, 26 Jun 2012 14:05:15 +0200 From: Oliver-Rainer Wittmann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: ooo-dev@incubator.apache.org Subject: Re: Propose for 3.4.1: Can't remove password from file (119366) References: <4FE080DB.5050406@googlemail.com> <4FE84748.2080508@googlemail.com> <4FE84EFC.3020000@googlemail.com> In-Reply-To: Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, On 26.06.2012 09:53, Fan Zheng wrote: > Root cause: > > Seems the logic of "Save As" and "Save" inside Apache OpenOffice is pretty > weird anyway. > A, inside AOO, the method SfxBaseModel::StoreSelf is the entry for storing > file into the original URL path if it has one. Which means, such method is > responsible to: > > 1. Directly "Save" request, but exclude the very first time on "Save" > without original URL path; > > 2. "SaveAs" request, with the same URL information as former; > > > B, as such method is only focus on storing back into to original file, it > is designed as an incremental saving pattern for certain efficient > consideration. Which means, > such function do not allow external saving parameters except the ones on > changing "Version Comments", "Author", "Interaction Handler" and "status > Indicator". > > C, "Saving with password" is a kind of external saving parameter. The > saving parameters set will contain a password item inside, if users have > enable the check box > "Save with password" in "File Save As" dialog. Otherwise, saving parameters > set wont contain password corresponding items. > > Combine the above 3 conditions, we can take a deeper inside look of > following scenarios: > > 1. In the "Save" request, whatever the password originally enabled or not, > as no further different setting applied, the storing process will directly > apply the former saving parameters set, including the URL path and password > setting stuff. Everything is OK. > > 2. And in the "SaveAs" request with password originally disabled: > 2.1 If the user keep the "Save with password" disabled in "File Save As" > dialog, as no further setting applied, the storing process will directly > apply the former saving parameters set, still with password disabled. Keep > the consistence between UI setting and exact result and high efficiency; > 2.2 If the user change the "Save with password" from disable to enable in > "File Save As" dialog, as external saving parameter was added into saving > parameters set, which do not satisfy the verification of parameters, such > "SaveAs" request will be returned from SfxBaseModel::StoreSelf, and > actually finished inside the common "SaveAs" method with password enabled. > Also keep the consistence between UI setting and exact result; > 3. In the "SaveAs" request with password originally enabled: > 3.1 If the user keep the "Save with password" enabled in "File Save As" > dialog, as external saving parameter was added into saving parameters set, > which do not satisfy the verification of parameters, such "SaveAs" request > will be returned from SfxBaseModel::StoreSelf, and actually finished inside > the common "SaveAs" method with password enabled. Keep the consistence > between UI setting and exact result, but with lower efficiency; > 3.2 If the user change the "Save with password" from enabled to disabled in > "File Save As" dialog, as no further setting applied, the storing process > will directly apply the former saving parameters set, still with password > enabled, as oppose to the UI setting. The issue happens. > > So, a reasonable solution of this issue should be: > > 1. No process and saving parameter change on scenario 1 and 2; > 2. In scenario 3.1, remove the external password parameter as the > originally enabled, and makes it finished in StoreSelf for higher > efficiency; > 3. In scenario 3.2, do not trying to use StoreSelf anyway; > > > For you reference. > > The code patch will be submitted for reviewing later. > Thanks for this really deep and well founded analysis. I am currently reviewing the new patch. Best regards, Oliver.