Issue 119552

Summary: [From Symphony] Can't pop up protect password dialog when attempt to unprotect sheet with password for xls file in AOO.
Product: Calc Reporter: binguo <binbjguo>
Component: codeAssignee: Andre <awf.aoo>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: awf.aoo, lijianyuan1983, liushenf, polo8495, sunyingshadesun
Version: 3.4.0 Beta (OOo)   
Target Milestone: 4.0.0   
Hardware: PC   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
sample xls file
none
Patch for this issue. awf.aoo: review+

Description binguo 2012-05-30 05:38:19 UTC
Steps:
   1. Open the attached sample file in Symphony.
   2.Click "Tools->Protect Document->Sheet".

Defect:
   It can't pop up a unprotect sheet dialog.
Comment 1 binguo 2012-05-30 05:39:02 UTC
Created attachment 77764 [details]
sample xls file
Comment 2 binguo 2012-05-30 05:40:07 UTC
(In reply to comment #0)
> Steps:
   1. Open the attached sample file in AOO.
   2.Click
> "Tools->Protect Document->Sheet".

Defect:
   It can't pop up a unprotect
> sheet dialog.
Comment 3 Jianyuan Li 2012-06-25 08:27:01 UTC
I am investigating this issue.
Comment 4 Jianyuan Li 2012-06-26 06:22:12 UTC
Root cause: There is a macro ENABLE_SHEET_PROTECTION defined. Its value is 0. So all blocks controlled by it will not be executed.
Related blocks:
1. Import/export Sheet/Doc protection password for xls file.
2. Import a protected xls file and show password dlg when unprotect a sheet/doc.
2. Import a ods/xls file and export it as a xls/ods file. Show password retype dlg.
Solutions: Due to 1 and 2, password dlg is shown. So here set the macro value as 1.
Comment 5 Jianyuan Li 2012-06-26 06:23:26 UTC
(In reply to comment #4)
> Root cause: There is a macro ENABLE_SHEET_PROTECTION defined. Its value is
> 0. So all blocks controlled by it will not be executed.
> Related blocks:
> 1. Import/export Sheet/Doc protection password for xls file.
> 2. Import a protected xls file and show password dlg when unprotect a
> sheet/doc.
> 2. Import a ods/xls file and export it as a xls/ods file. Show password
> retype dlg.
> Solutions: Due to 1 and 2, password dlg is shown. So here set the macro
password dlg is not shown.
> value as 1.
Comment 6 Jianyuan Li 2012-06-26 06:24:55 UTC
Created attachment 78477 [details]
Patch for this issue.
Comment 7 Terry Yang 2012-06-28 08:30:12 UTC
*** Issue 118952 has been marked as a duplicate of this issue. ***
Comment 8 SunYing 2012-07-09 02:55:15 UTC
The patch resolved this defect and test pass.
Comment 9 SVN Robot 2012-07-10 14:17:47 UTC
"af" committed SVN revision 1359695 into trunk:
#i119552# Fixed sheet protection.
Comment 10 Andre 2012-07-10 14:18:30 UTC
Comment on attachment 78477 [details]
Patch for this issue.

Reviewed and tested: OK
Comment 11 Andre 2012-07-10 14:21:20 UTC
Also verified that bug 102906 is still fixed (which is one candidate that ENABLE_SHEET_PROTECTION was set to 0).
Comment 12 Jianyuan Li 2012-07-19 07:04:42 UTC
*** Issue 120134 has been marked as a duplicate of this issue. ***
Comment 13 Terry Yang 2012-08-20 02:50:11 UTC
Verify fixed on revision 1374181.
Comment 14 Terry Yang 2012-08-20 02:50:35 UTC
Close this bug
Comment 15 Shenfeng Liu 2012-10-10 07:04:45 UTC
set Target Milestone to AOO 3.5.0 for PM purpose.