Issue Details (XML | Word | Printable)

Key: OFFICE-1774
Type: Bug Bug
Status: Applied Applied
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Patrick Durusau
Reporter: Robert Weir
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OASIS Open Document Format for Office Applications (OpenDocument) TC

Editor Note: Section 18.244 style:cell-protect

Created: 28/May/09 01:41 PM   Updated: 16/Oct/09 09:57 AM
Component/s: None
Affects Version/s: ODF 1.2
Fix Version/s: ODF 1.2

Proposal: See comments.
Resolution: See comments.


 Description  « Hide
Transcribed from ODF_Revised_Editorial_Notes_27May2009.odt

Original author: Patrick Durusau
Section 18.244 style:cell-protect

Ed. Note We need to define all these values.




 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Patrick Durusau added a comment - 14/Jul/09 06:56 PM
I need confirmation on the following definitions:

formula-hidden: the formula responsible for the result in a cell is hidden.

hidden-and-protected: the formula responsible for the result in a cell is hidden and cannot be modified.

none: the formula responsible for the result in a cell is visible to the user and can be modified.

protected: the formula responsible for the result in a cell cannot be modified by the user.

OK, so what does protected or formula-hidden as a space-separate list mean?

I can't close this one until

Andreas Guelzow added a comment - 14/Jul/09 07:11 PM
Consider the first two:

formula-hidden: the formula responsible for the result in a cell is hidden.

hidden-and-protected: the formula responsible for the result in a cell is hidden and cannot be modified.

In "formula-hidden" the user can't see the formula, so doesn't this imply that s/he can't modify it? I guess the user may be able to replace the formula (of course once the user replaced the formula, s/he would not be able to see the formula anymore).

This seems strange.

Patrick Durusau added a comment - 14/Jul/09 07:59 PM
Andreas,

Perhaps, perhaps. But then what does it mean for a user to not be able to modify a formula? If they have read/write access to the document, how do we protect something such that they can't reset whatever protection is provided?

Andreas Guelzow added a comment - 14/Jul/09 08:17 PM
Personally I don't see the point in trying to prohibit a determined user from changing cell content (and I fail to see how this could really be successful anyways), but I can see the point of protecting a cell to avoid accidental changes. So "protected" makes sense to me. "formula-hidden-and-protected" is perhaps useful (I can see the formula hidden part be useful to avoid huge formulas to spill over the page confusing users who aren't interested in them, but this should imply protected.)

Having "hidden-but-not-protected" seems to be weird, and I am not sure how a reasonable GUI implementation for that should look like.


Eike Rathke added a comment - 15/Jul/09 10:13 AM
It may seem weird, but there is really formula-hidden that is not protected, and the formula could be overwritten by the user (and if the implementation supported an undo function also restored to the original).

This entire protection schema is merely meant for UI (e.g. user guidance) and API purposes. It is not to be seen as a security measurement, for which encryption/signatures should be used instead. An implementation may (should?) respect them also when modifying a document file programatically. A user having raw document write access of course can modify any of those settings. The feature sometimes is (ab)used by spreadsheet authors who think they could protect their intellectual property of formulas with these settings. The legacy of the protection settings goes back to Excel binary file formats, where modifying them was harder, but not impossible either.

Patrick Durusau added a comment - 25/Sep/09 02:50 PM
Eike,

Here is what I have now:

The defined values for the style:cell-protect attribute are:
formula-hidden: formula responsible for cell content is hidden.
Hidden-and-protected: formula responsible for cell content is both hidden and protected.
none: formula responsible for cell content is neither hidden nor protected.
protected:formula responsible for cell content is protected.
protected or formula-hidden as a space-separated list

Note that I don't have a definition of a list of "protected formula-hidden" Or any clue how that varies from hidden-and-protected.

The schema here reads:

  <attribute name="style:cell-protect">
            <choice>
                <value>none</value>
                <value>hidden-and-protected</value>
                <list>
                    <oneOrMore>
                        <choice>
                            <value>protected</value>
                            <value>formula-hidden</value>
                        </choice>
                    </oneOrMore>
                </list>
            </choice>
        </attribute>

Which I think is generating the: "or white space separated non-empty lists of one of these values: protected, or formula-hidden."

Sure, its possible but why not simply delete it as an option?

Thanks!

Patrick

Andreas Guelzow added a comment - 25/Sep/09 04:11 PM
I would think that something that is hidden cannot be changed, so how do
1) formula-hidden: formula responsible for cell content is hidden.
2) Hidden-and-protected: formula responsible for cell content is both hidden and protected.
differ?

Eike Rathke added a comment - 29/Sep/09 06:24 AM
formula-hidden: formula is hidden (not displayed) in cell and cell content input line. Cell content including formula can be overtyped or changed by API calls. A formula may be replaced by changing the cell content to a fixed value.
formula-hidden protected: formula is hidden (not displayed) in cell and cell content input line. Cell content thus formula can not be changed.

Patrick Durusau added a comment - 29/Sep/09 10:31 AM
Eike,

Just to make sure we are all on the same page:

Here are the values for style:cell-protect with their definitions:

formula-hidden: formula is hidden (not displayed) in cell and cell content input line. Cell content including formula can be overtyped or changed by API calls. A formula may be replaced by changing the cell content to a fixed value. (reflects your latest edits)

hidden-and-protected: formula is hidden (not displayed) in cell and cell content input line. Cell content including formula cannot be changed. (reflects your latest edits)

none: formula responsible for cell content is neither hidden nor protected.

protected: formula responsible for cell content is protected.

Question: What does "protected" mean for the last value? In hidden-and-protected, cell content included the formula. Yes?



Eike Rathke added a comment - 16/Oct/09 09:35 AM
Note this is not only about formulas but also other cell content. Btw, I think we should not talk of a cell content input line. Whether an implementation has an extra input line or edits cells inline or has yet other means is not part of the specification.

Cell protection is only effective if the value of the <table:table> element's table:protected attribute is 'true'.

There is no value 'none' for the style:cell-protect attribute. For no protection at all the attribute is simply missing.

Here my definitions:

hidden-and-protected: Cell content is not displayed and can not be edited. If content is a formula, the formula result is not displayed.

protected: Cell content can not be edited.

formula-hidden: If cell content is a formula, it is not displayed. It can be replaced by changing the cell content.
[Note: not only by replacing it with a fixed value, but also with another formula]

protected formula-hidden: Cell content can not be edited. If content is a formula, it is not displayed. A formula result is displayed.

Patrick Durusau added a comment - 16/Oct/09 09:57 AM
Correction will appear in OpenDocument-v1.2-part-1-cd03-rev03.