Issue 63144

Summary: Still can edit a note after protecting the sheet!
Product: Calc Reporter: lingletcl <cuiling.tong>
Component: codeAssignee: frank
Status: CLOSED FIXED QA Contact: issues@sc <issues>
Severity: Trivial    
Priority: P3 CC: issues, peter.junge, yonggang.mao
Version: OOo 2.0.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: PATCH Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 72764    
Attachments:
Description Flags
The patch for i63144
none
The patch for i63144#
none
The patch file about i63144#
none
The patch for i63144
none
The patch file for issue63144#,please check it.
none
The patch file is about i63144-v5#
none
The patch file of about issue63144#
none
The patch file of about issue63144#
none
The patch file of about issue63144# none

Description lingletcl 2006-03-14 05:48:54 UTC
1.New a spreadsheet file and insert a note;
2.Edit the note and show the note window;
3.Click “Toolsâ€---> "Protect Document"--->"Sheet", and protect the current 
sheet;
4.Double click the note window and can edit the note! It shouldn't be edited!
Comment 1 frank 2006-03-14 08:56:15 UTC
Hi Niklas, 

changed Prio as 2 isn't realistic. Please have a look at this one.

Frank
Comment 2 niklas.nebel 2006-06-23 17:26:57 UTC
Changing target to 2.x
Comment 3 yonggang.mao 2007-06-22 09:16:11 UTC
Created attachment 46167 [details]
The patch for i63144
Comment 4 yonggang.mao 2007-06-27 06:10:50 UTC
Created attachment 46272 [details]
The patch for i63144#
Comment 5 yonggang.mao 2007-06-29 10:00:05 UTC
Created attachment 46350 [details]
The patch file about i63144#
Comment 6 yonggang.mao 2007-07-18 09:17:01 UTC
Created attachment 46871 [details]
The patch for i63144
Comment 7 yonggang.mao 2007-07-20 16:08:54 UTC
Created attachment 46944 [details]
The patch file for issue63144#,please check it.
Comment 8 yonggang.mao 2007-07-25 07:14:50 UTC
Created attachment 47071 [details]
The patch file is about i63144-v5#
Comment 9 niklas.nebel 2007-07-27 17:34:22 UTC
The locking for right-click seems to work now. If the user edits a note's text
on a protected sheet and then clicks outside of the note, the "text object"
function remains active (with the "cross" mouse cursor), and can only be stopped
with the ESC key. The same thing happens if you select "Text" from the Drawing
toolbar on a protected sheet, so it's not strictly related to the note changes,
but it should still be fixed before integrating this. Maybe you want to take a
look at it. FuText::MouseButtonUp should be a good place to start looking.
Comment 10 yonggang.mao 2007-07-27 17:48:43 UTC
Hi niklasn,
Thanks very much for your help.I will have a look at it. 
Comment 11 yonggang.mao 2007-09-26 13:48:54 UTC
Created attachment 48514 [details]
The patch file of about issue63144#
Comment 12 yonggang.mao 2007-09-27 15:34:14 UTC
Hello Niklasn,
Please review the patch file. thanks!
Comment 13 niklas.nebel 2007-10-05 19:16:26 UTC
The change in futext.cxx looks right, but it could use a bit of cleaning up,
instead of leaving the old code in comments.

There's a problem in FuText::StopEditMode (was also in the previous version of
the patch): With the "bProtectDoc || bProtectAttr" condition, the layer isn't
locked again if the note was in an unprotected cell on an unprotected sheet.
Wasn't it intended to always lock the layer again here?

Other than that, it looks like we're very close to integrating this.
Comment 14 yonggang.mao 2007-10-10 10:37:40 UTC
Created attachment 48804 [details]
The patch file of about issue63144#
Comment 15 niklas.nebel 2007-10-10 13:32:22 UTC
But now you changed the condition in FuSelection::TestComment to "bProtectDoc ||
bProtectAttr", so on a protected sheet no note can be edited, even if its cell
is unprotected. Why that change?
Comment 16 yonggang.mao 2007-10-11 04:52:28 UTC
Created attachment 48827 [details]
The patch file of about issue63144#
Comment 17 niklas.nebel 2007-10-15 13:25:34 UTC
This looks good now. I committed the last version of the patch
(issue63144-v8.patch) to CWS "calc45".
Comment 18 yonggang.mao 2007-10-15 15:15:17 UTC
Hello Niklasn,
Thanks for you help!
Comment 19 niklas.nebel 2007-12-03 15:37:49 UTC
back to QA for verification
Comment 20 niklas.nebel 2007-12-03 15:41:03 UTC
really reassign
Comment 21 frank 2007-12-07 14:58:00 UTC
found fixed on cws calc45 using Solaris, Linux and Windows build
Comment 22 frank 2007-12-10 11:45:49 UTC
*** Issue 84425 has been marked as a duplicate of this issue. ***
Comment 23 frank 2008-02-11 13:10:18 UTC
found integrated on master OOHm5 using Solaris, Linux and Windows builds