Apache OpenOffice (AOO) Bugzilla – Issue 63144
Still can edit a note after protecting the sheet!
Last modified: 2013-08-07 15:14:13 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!
Hi Niklas, changed Prio as 2 isn't realistic. Please have a look at this one. Frank
Changing target to 2.x
Created attachment 46167 [details] The patch for i63144
Created attachment 46272 [details] The patch for i63144#
Created attachment 46350 [details] The patch file about i63144#
Created attachment 46871 [details] The patch for i63144
Created attachment 46944 [details] The patch file for issue63144#,please check it.
Created attachment 47071 [details] The patch file is about i63144-v5#
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.
Hi niklasn, Thanks very much for your help.I will have a look at it.
Created attachment 48514 [details] The patch file of about issue63144#
Hello Niklasn, Please review the patch file. thanks!
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.
Created attachment 48804 [details] The patch file of about issue63144#
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?
Created attachment 48827 [details] The patch file of about issue63144#
This looks good now. I committed the last version of the patch (issue63144-v8.patch) to CWS "calc45".
Hello Niklasn, Thanks for you help!
back to QA for verification
really reassign
found fixed on cws calc45 using Solaris, Linux and Windows build
*** Issue 84425 has been marked as a duplicate of this issue. ***
found integrated on master OOHm5 using Solaris, Linux and Windows builds